diff --git a/charts/VisualStudioSetup.png b/charts/VisualStudioSetup.png new file mode 100644 index 0000000..911058b Binary files /dev/null and b/charts/VisualStudioSetup.png differ diff --git a/frontend/assets/plugin_scripts/auxiliaries.js b/frontend/assets/plugin_scripts/auxiliaries.js index b91f16f..29ea7b5 100644 --- a/frontend/assets/plugin_scripts/auxiliaries.js +++ b/frontend/assets/plugin_scripts/auxiliaries.js @@ -198,3 +198,6 @@ window.getOrCreateAnimationClipForGid = function(gid, tiledMapInfo, tilesElListU animationClip: animClip, }; }; + +// Node.js, this is a workaround to avoid accessing the non-existent "TextDecoder class" from "jsexport.js". +window.fs = function() {}; diff --git a/frontend/assets/scenes/login.fire b/frontend/assets/scenes/login.fire index 2d68096..1bc86bc 100644 --- a/frontend/assets/scenes/login.fire +++ b/frontend/assets/scenes/login.fire @@ -362,7 +362,7 @@ "array": [ 0, 0, - 216.6734179122529, + 216.50635094610968, 0, 0, 0, diff --git a/frontend/assets/scenes/offline_map.fire b/frontend/assets/scenes/offline_map.fire index 027a0a5..1b2d48e 100644 --- a/frontend/assets/scenes/offline_map.fire +++ b/frontend/assets/scenes/offline_map.fire @@ -547,7 +547,7 @@ "array": [ 0, 0, - 210.16474188040044, + 216.50635094610968, 0, 0, 0, diff --git a/frontend/assets/scripts/AttackingCharacter.js b/frontend/assets/scripts/AttackingCharacter.js index 3c2a71f..2502546 100644 --- a/frontend/assets/scripts/AttackingCharacter.js +++ b/frontend/assets/scripts/AttackingCharacter.js @@ -75,10 +75,10 @@ cc.Class({ onLoad() { BaseCharacter.prototype.onLoad.call(this); this.effAnimNode = this.animNode.getChildByName(this.speciesName); - this.animComp = this.effAnimNode.getComponent(dragonBones.ArmatureDisplay); - if (!this.animComp) { - this.animComp = this.effAnimNode.getComponent(cc.Animation); - } + //this.animComp = this.effAnimNode.getComponent(dragonBones.ArmatureDisplay); + //if (!this.animComp) { + this.animComp = this.effAnimNode.getComponent(cc.Animation); + //} this.effAnimNode.active = true; }, @@ -107,13 +107,13 @@ cc.Class({ let playingAnimName = null; let underlyingAnimationCtrl = null; - if (this.animComp instanceof dragonBones.ArmatureDisplay) { - underlyingAnimationCtrl = this.animComp._armature.animation; // ALWAYS use the dragonBones api instead of ccc's wrapper! - playingAnimName = underlyingAnimationCtrl.lastAnimationName; - } else { - underlyingAnimationCtrl = this.animComp.currentClip; - playingAnimName = (!underlyingAnimationCtrl ? null : underlyingAnimationCtrl.name); - } + //if (this.animComp instanceof dragonBones.ArmatureDisplay) { + // underlyingAnimationCtrl = this.animComp._armature.animation; // ALWAYS use the dragonBones api instead of ccc's wrapper! + // playingAnimName = underlyingAnimationCtrl.lastAnimationName; + //} else { + underlyingAnimationCtrl = this.animComp.currentClip; + playingAnimName = (!underlyingAnimationCtrl ? null : underlyingAnimationCtrl.name); + //} // It turns out that "prevRdfPlayer.CharacterState" is not useful in this function :) if (newAnimName == playingAnimName && window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(newCharacterState)) { @@ -122,11 +122,11 @@ cc.Class({ return; } - if (this.animComp instanceof dragonBones.ArmatureDisplay) { - this._interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig); - } else { - this._interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName, chConfig); - } + //if (this.animComp instanceof dragonBones.ArmatureDisplay) { + // this._interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig); + //} else { + this._interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName, chConfig); + //} }, _interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig) { diff --git a/frontend/assets/scripts/NetworkDoctor.js b/frontend/assets/scripts/NetworkDoctor.js index 7c37a2e..f542d99 100644 --- a/frontend/assets/scripts/NetworkDoctor.js +++ b/frontend/assets/scripts/NetworkDoctor.js @@ -81,8 +81,11 @@ NetworkDoctor.prototype.logSkippedRenderFrameCnt = function() { NetworkDoctor.prototype.isTooFast = function() { const [sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, skippedRenderFrameCnt] = this.stats(); - if (sendingFps >= this.inputRateThreshold && srvDownsyncFps >= this.inputRateThreshold) { - // At least my network is OK for both TX & RX directions. + if (sendingFps >= this.inputRateThreshold + 2) { + // Don't send too fast + return true; + } else if (sendingFps >= this.inputRateThreshold && srvDownsyncFps >= this.inputRateThreshold) { + // At least my network is OK for both TX & RX directions -- PING value might help as a supplement information here to confirm that the "selfPlayer" is not lagged in RX which results in the "rollbackFrames", but not necessary -- a significant lag within the "inputFrameDownsyncQ" will reduce "srvDownsyncFps". if (rollbackFrames >= this.rollbackFramesThreshold) { // I got many frames rolled back while none of my peers effectively helped my preciction. Deliberately not using "peerUpsyncThreshold" here because when using UDP p2p upsync broadcasting, we expect to receive effective p2p upsyncs from every other player. return true; diff --git a/frontend/assets/plugin_scripts/jsexport.js b/frontend/assets/scripts/modules/jsexport.js similarity index 100% rename from frontend/assets/plugin_scripts/jsexport.js rename to frontend/assets/scripts/modules/jsexport.js diff --git a/frontend/assets/plugin_scripts/jsexport.js.meta b/frontend/assets/scripts/modules/jsexport.js.meta similarity index 89% rename from frontend/assets/plugin_scripts/jsexport.js.meta rename to frontend/assets/scripts/modules/jsexport.js.meta index 1a1b435..1bd227a 100644 --- a/frontend/assets/plugin_scripts/jsexport.js.meta +++ b/frontend/assets/scripts/modules/jsexport.js.meta @@ -1,7 +1,7 @@ { "ver": "1.0.5", "uuid": "40edd08e-316c-44b8-a50f-bd173554c554", - "isPlugin": true, + "isPlugin": false, "loadPluginInWeb": true, "loadPluginInNative": true, "loadPluginInEditor": false, diff --git a/frontend/settings/builder.json b/frontend/settings/builder.json index 21d39aa..189f893 100644 --- a/frontend/settings/builder.json +++ b/frontend/settings/builder.json @@ -15,16 +15,16 @@ "orientation": "portrait", "subContext": "" }, - "encryptJs": true, + "encryptJs": false, "excludeScenes": [ "8491a86c-bec9-4813-968a-128ca01639e0" ], "fb-instant-games": {}, "includeSDKBox": false, "inlineSpriteFrames": true, - "inlineSpriteFrames_native": true, + "inlineSpriteFrames_native": false, "md5Cache": false, - "mergeStartScene": true, + "mergeStartScene": false, "optimizeHotUpdate": false, "orientation": { "landscapeLeft": true, @@ -39,7 +39,7 @@ }, "startScene": "2ff474d9-0c9e-4fe3-87ec-fbff7cae85b4", "title": "DelayNoMore", - "webOrientation": "portrait", + "webOrientation": "landscape", "wechatgame": { "REMOTE_SERVER_ROOT": "https://bgmoba.lokcol.com/static/", "appid": "wxf497c910a2a25edc", @@ -56,5 +56,6 @@ "mac": { "packageName": "org.cocos2d.helloworld" }, - "win32": {} + "win32": {}, + "includeAnySDK": null } diff --git a/frontend/settings/project.json b/frontend/settings/project.json index 47785f7..3b28a1d 100644 --- a/frontend/settings/project.json +++ b/frontend/settings/project.json @@ -33,10 +33,15 @@ "design-resolution-height": 640, "design-resolution-width": 960, "excluded-modules": [ + "Audio", + "AudioSource", "Collider", + "DragonBones", "Geom Utils", + "Intersection", "Mesh", "MotionStreak", + "NodePool", "Physics", "PageView", "PageViewIndicator", diff --git a/jsexport/Makefile b/jsexport/Makefile index 31c4d70..7d5e047 100644 --- a/jsexport/Makefile +++ b/jsexport/Makefile @@ -4,24 +4,25 @@ all: help ## Available proxies for downloading go modules are listed in "https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away". #GOPROXY=https://mirrors.aliyun.com/goproxy GOPROXY=https://goproxy.io +DST=../frontend/assets/scripts/modules serve: gopherjs serve $(PROJECTNAME) clean: gopherjs clean - rm -f ../frontend/assets/plugin_scripts/jsexport.js - #rm -f ../frontend/assets/plugin_scripts/jsexport.js.map + rm -f $(DST)/jsexport.js + #rm -f $(DST)/jsexport.js.map build: clean gopherjs build $(PROJECTNAME) - mv ./jsexport.js ../frontend/assets/plugin_scripts/ - #mv ./jsexport.js.map ../frontend/assets/plugin_scripts/ + mv ./jsexport.js $(DST)/ + #mv ./jsexport.js.map $(DST)/ build-min: clean gopherjs build -m $(PROJECTNAME) - mv ./jsexport.js ../frontend/assets/plugin_scripts/ - #mv ./jsexport.js.map ../frontend/assets/plugin_scripts/ + mv ./jsexport.js $(DST)/ + #mv ./jsexport.js.map $(DST)/ .PHONY: help