mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-26 03:39:00 +00:00
Preparation for native app build.
This commit is contained in:
parent
b5b43bb596
commit
58e60a789f
BIN
charts/VisualStudioSetup.png
Normal file
BIN
charts/VisualStudioSetup.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 191 KiB |
@ -198,3 +198,6 @@ window.getOrCreateAnimationClipForGid = function(gid, tiledMapInfo, tilesElListU
|
|||||||
animationClip: animClip,
|
animationClip: animClip,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Node.js, this is a workaround to avoid accessing the non-existent "TextDecoder class" from "jsexport.js".
|
||||||
|
window.fs = function() {};
|
||||||
|
@ -362,7 +362,7 @@
|
|||||||
"array": [
|
"array": [
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
216.6734179122529,
|
216.50635094610968,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -547,7 +547,7 @@
|
|||||||
"array": [
|
"array": [
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
210.16474188040044,
|
216.50635094610968,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -75,10 +75,10 @@ cc.Class({
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
BaseCharacter.prototype.onLoad.call(this);
|
BaseCharacter.prototype.onLoad.call(this);
|
||||||
this.effAnimNode = this.animNode.getChildByName(this.speciesName);
|
this.effAnimNode = this.animNode.getChildByName(this.speciesName);
|
||||||
this.animComp = this.effAnimNode.getComponent(dragonBones.ArmatureDisplay);
|
//this.animComp = this.effAnimNode.getComponent(dragonBones.ArmatureDisplay);
|
||||||
if (!this.animComp) {
|
//if (!this.animComp) {
|
||||||
this.animComp = this.effAnimNode.getComponent(cc.Animation);
|
this.animComp = this.effAnimNode.getComponent(cc.Animation);
|
||||||
}
|
//}
|
||||||
this.effAnimNode.active = true;
|
this.effAnimNode.active = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -107,13 +107,13 @@ cc.Class({
|
|||||||
let playingAnimName = null;
|
let playingAnimName = null;
|
||||||
let underlyingAnimationCtrl = null;
|
let underlyingAnimationCtrl = null;
|
||||||
|
|
||||||
if (this.animComp instanceof dragonBones.ArmatureDisplay) {
|
//if (this.animComp instanceof dragonBones.ArmatureDisplay) {
|
||||||
underlyingAnimationCtrl = this.animComp._armature.animation; // ALWAYS use the dragonBones api instead of ccc's wrapper!
|
// underlyingAnimationCtrl = this.animComp._armature.animation; // ALWAYS use the dragonBones api instead of ccc's wrapper!
|
||||||
playingAnimName = underlyingAnimationCtrl.lastAnimationName;
|
// playingAnimName = underlyingAnimationCtrl.lastAnimationName;
|
||||||
} else {
|
//} else {
|
||||||
underlyingAnimationCtrl = this.animComp.currentClip;
|
underlyingAnimationCtrl = this.animComp.currentClip;
|
||||||
playingAnimName = (!underlyingAnimationCtrl ? null : underlyingAnimationCtrl.name);
|
playingAnimName = (!underlyingAnimationCtrl ? null : underlyingAnimationCtrl.name);
|
||||||
}
|
//}
|
||||||
|
|
||||||
// It turns out that "prevRdfPlayer.CharacterState" is not useful in this function :)
|
// It turns out that "prevRdfPlayer.CharacterState" is not useful in this function :)
|
||||||
if (newAnimName == playingAnimName && window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(newCharacterState)) {
|
if (newAnimName == playingAnimName && window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(newCharacterState)) {
|
||||||
@ -122,11 +122,11 @@ cc.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.animComp instanceof dragonBones.ArmatureDisplay) {
|
//if (this.animComp instanceof dragonBones.ArmatureDisplay) {
|
||||||
this._interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig);
|
// this._interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig);
|
||||||
} else {
|
//} else {
|
||||||
this._interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName, chConfig);
|
this._interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName, chConfig);
|
||||||
}
|
//}
|
||||||
},
|
},
|
||||||
|
|
||||||
_interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig) {
|
_interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig) {
|
||||||
|
@ -81,8 +81,11 @@ NetworkDoctor.prototype.logSkippedRenderFrameCnt = function() {
|
|||||||
|
|
||||||
NetworkDoctor.prototype.isTooFast = function() {
|
NetworkDoctor.prototype.isTooFast = function() {
|
||||||
const [sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, skippedRenderFrameCnt] = this.stats();
|
const [sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, skippedRenderFrameCnt] = this.stats();
|
||||||
if (sendingFps >= this.inputRateThreshold && srvDownsyncFps >= this.inputRateThreshold) {
|
if (sendingFps >= this.inputRateThreshold + 2) {
|
||||||
// At least my network is OK for both TX & RX directions.
|
// 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) {
|
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.
|
// 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;
|
return true;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"ver": "1.0.5",
|
"ver": "1.0.5",
|
||||||
"uuid": "40edd08e-316c-44b8-a50f-bd173554c554",
|
"uuid": "40edd08e-316c-44b8-a50f-bd173554c554",
|
||||||
"isPlugin": true,
|
"isPlugin": false,
|
||||||
"loadPluginInWeb": true,
|
"loadPluginInWeb": true,
|
||||||
"loadPluginInNative": true,
|
"loadPluginInNative": true,
|
||||||
"loadPluginInEditor": false,
|
"loadPluginInEditor": false,
|
@ -15,16 +15,16 @@
|
|||||||
"orientation": "portrait",
|
"orientation": "portrait",
|
||||||
"subContext": ""
|
"subContext": ""
|
||||||
},
|
},
|
||||||
"encryptJs": true,
|
"encryptJs": false,
|
||||||
"excludeScenes": [
|
"excludeScenes": [
|
||||||
"8491a86c-bec9-4813-968a-128ca01639e0"
|
"8491a86c-bec9-4813-968a-128ca01639e0"
|
||||||
],
|
],
|
||||||
"fb-instant-games": {},
|
"fb-instant-games": {},
|
||||||
"includeSDKBox": false,
|
"includeSDKBox": false,
|
||||||
"inlineSpriteFrames": true,
|
"inlineSpriteFrames": true,
|
||||||
"inlineSpriteFrames_native": true,
|
"inlineSpriteFrames_native": false,
|
||||||
"md5Cache": false,
|
"md5Cache": false,
|
||||||
"mergeStartScene": true,
|
"mergeStartScene": false,
|
||||||
"optimizeHotUpdate": false,
|
"optimizeHotUpdate": false,
|
||||||
"orientation": {
|
"orientation": {
|
||||||
"landscapeLeft": true,
|
"landscapeLeft": true,
|
||||||
@ -39,7 +39,7 @@
|
|||||||
},
|
},
|
||||||
"startScene": "2ff474d9-0c9e-4fe3-87ec-fbff7cae85b4",
|
"startScene": "2ff474d9-0c9e-4fe3-87ec-fbff7cae85b4",
|
||||||
"title": "DelayNoMore",
|
"title": "DelayNoMore",
|
||||||
"webOrientation": "portrait",
|
"webOrientation": "landscape",
|
||||||
"wechatgame": {
|
"wechatgame": {
|
||||||
"REMOTE_SERVER_ROOT": "https://bgmoba.lokcol.com/static/",
|
"REMOTE_SERVER_ROOT": "https://bgmoba.lokcol.com/static/",
|
||||||
"appid": "wxf497c910a2a25edc",
|
"appid": "wxf497c910a2a25edc",
|
||||||
@ -56,5 +56,6 @@
|
|||||||
"mac": {
|
"mac": {
|
||||||
"packageName": "org.cocos2d.helloworld"
|
"packageName": "org.cocos2d.helloworld"
|
||||||
},
|
},
|
||||||
"win32": {}
|
"win32": {},
|
||||||
|
"includeAnySDK": null
|
||||||
}
|
}
|
||||||
|
@ -33,10 +33,15 @@
|
|||||||
"design-resolution-height": 640,
|
"design-resolution-height": 640,
|
||||||
"design-resolution-width": 960,
|
"design-resolution-width": 960,
|
||||||
"excluded-modules": [
|
"excluded-modules": [
|
||||||
|
"Audio",
|
||||||
|
"AudioSource",
|
||||||
"Collider",
|
"Collider",
|
||||||
|
"DragonBones",
|
||||||
"Geom Utils",
|
"Geom Utils",
|
||||||
|
"Intersection",
|
||||||
"Mesh",
|
"Mesh",
|
||||||
"MotionStreak",
|
"MotionStreak",
|
||||||
|
"NodePool",
|
||||||
"Physics",
|
"Physics",
|
||||||
"PageView",
|
"PageView",
|
||||||
"PageViewIndicator",
|
"PageViewIndicator",
|
||||||
|
@ -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".
|
## 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://mirrors.aliyun.com/goproxy
|
||||||
GOPROXY=https://goproxy.io
|
GOPROXY=https://goproxy.io
|
||||||
|
DST=../frontend/assets/scripts/modules
|
||||||
|
|
||||||
serve:
|
serve:
|
||||||
gopherjs serve $(PROJECTNAME)
|
gopherjs serve $(PROJECTNAME)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
gopherjs clean
|
gopherjs clean
|
||||||
rm -f ../frontend/assets/plugin_scripts/jsexport.js
|
rm -f $(DST)/jsexport.js
|
||||||
#rm -f ../frontend/assets/plugin_scripts/jsexport.js.map
|
#rm -f $(DST)/jsexport.js.map
|
||||||
|
|
||||||
build: clean
|
build: clean
|
||||||
gopherjs build $(PROJECTNAME)
|
gopherjs build $(PROJECTNAME)
|
||||||
mv ./jsexport.js ../frontend/assets/plugin_scripts/
|
mv ./jsexport.js $(DST)/
|
||||||
#mv ./jsexport.js.map ../frontend/assets/plugin_scripts/
|
#mv ./jsexport.js.map $(DST)/
|
||||||
|
|
||||||
build-min: clean
|
build-min: clean
|
||||||
gopherjs build -m $(PROJECTNAME)
|
gopherjs build -m $(PROJECTNAME)
|
||||||
mv ./jsexport.js ../frontend/assets/plugin_scripts/
|
mv ./jsexport.js $(DST)/
|
||||||
#mv ./jsexport.js.map ../frontend/assets/plugin_scripts/
|
#mv ./jsexport.js.map $(DST)/
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user