Added more animation resources.

This commit is contained in:
genxium 2023-02-06 12:02:44 +08:00
parent f10389bf55
commit 6a0d729dee
14 changed files with 5751 additions and 1483 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 166 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 KiB

After

Width:  |  Height:  |  Size: 314 KiB

View File

@ -0,0 +1,91 @@
{
"__type__": "cc.AnimationClip",
"_name": "Atk4",
"_objFlags": 0,
"_native": "",
"_duration": 0.2,
"sample": 60,
"speed": 0.3,
"wrapMode": 1,
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "a9a10466-1e80-4fb8-9c32-2019ee2c988d"
}
},
{
"frame": 0.016666666666666666,
"value": {
"__uuid__": "e0e3907f-520c-4c4c-991a-ec554e24f368"
}
},
{
"frame": 0.03333333333333333,
"value": {
"__uuid__": "e4bec6fe-db19-4cf6-a8cc-bfcc3e892d5e"
}
},
{
"frame": 0.05,
"value": {
"__uuid__": "c36ceda7-2e5d-42f4-ae7b-02064348a1c2"
}
},
{
"frame": 0.06666666666666667,
"value": {
"__uuid__": "07004da9-abd4-4a05-baee-447235dcdf2d"
}
},
{
"frame": 0.08333333333333333,
"value": {
"__uuid__": "dd047451-9715-4e68-9ae5-4e4556007190"
}
},
{
"frame": 0.1,
"value": {
"__uuid__": "7b2acb5e-3ee8-4c26-b950-f201346cefde"
}
},
{
"frame": 0.11666666666666667,
"value": {
"__uuid__": "b378b873-fae7-49dd-8581-15136046e2f1"
}
},
{
"frame": 0.13333333333333333,
"value": {
"__uuid__": "845b1de6-648f-422a-8289-98222175b787"
}
},
{
"frame": 0.15,
"value": {
"__uuid__": "df09902a-52d8-4dec-9d05-62d3428c4625"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "da55a31c-ce4a-4003-a119-8c76fd6d1a80"
}
},
{
"frame": 0.18333333333333332,
"value": {
"__uuid__": "bd3f63fb-6d6d-47d2-9d96-2b58292fccfa"
}
}
]
}
}
},
"events": []
}

View File

@ -0,0 +1,5 @@
{
"ver": "2.1.0",
"uuid": "168df303-4b6a-4376-940c-3d36fa9e98d8",
"subMetas": {}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 227 KiB

View File

@ -375,7 +375,7 @@
"__id__": 8
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 10
@ -489,6 +489,9 @@
null,
{
"__uuid__": "6e1139d4-03dd-4bd4-9510-606e94f629fe"
},
{
"__uuid__": "168df303-4b6a-4376-940c-3d36fa9e98d8"
}
],
"playOnLoad": false,

View File

@ -83,5 +83,6 @@
"width": 960
},
"use-customize-simulator": true,
"use-project-simulator-setting": false
"use-project-simulator-setting": false,
"start-scene": "current"
}

View File

@ -522,7 +522,31 @@ func deriveOpPattern(currPlayerDownsync, thatPlayerInNextFrame *PlayerDownsync,
return patternId, jumpedOrNot, effDx, effDy
}
// [WARNING] The params of this method is carefully tuned such that only "battle.RoomDownsyncFrame" is a necessary custom struct.
/*
[LONG TERM PERFORMANCE ENHANCEMENT PLAN]
The function "ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame" is creating new heap-memory blocks at 60fps, e.g. nextRenderFramePlayers & nextRenderFrameMeleeBullets & nextRenderFrameFireballBullets & effPushbacks & hardPushbackNorms & jumpedOrNotList & playerColliders & bulletColliders, which would induce "possibly performance impacting garbage collections" when many rooms are running simultaneously.
It's not easy to remove all of the dynamic heap-memory blocks allocation/deallocation, but we can reduce them to some extent. For example, the creation of new "RoomDownsyncFrame" in heap-memory can be avoided by adding
```
func overwriteRoomDownsyncFrame(src *RoomDownsyncFrame, dst *RoomDownsyncFrame) {
// Copy "src" into "dst" down to every primitive field
}
type Room struct {
newRoomDownsyncFrameHolder *RoomDownsyncFrame
}
func (pR *Room) provisionNewRoomDownsyncFrameHolder(src *RoomDownsyncFrame) {
overwriteRoomDownsyncFrame(src, pR.newRoomDownsyncFrameHolder)
}
```
then pass in the whole "renderFrameBuffer *SpecificRingBuffer" to this function and overwrite the target slot IN-PLACE, i.e. need write new "SpecificRingBuffer.Put/SetByFrameId" to use the new function "overwriteRoomDownsyncFrame(src, dst)" to keep "%p of every SpecificRingBuffer.Eles[i]" constant.
However, the enhancement for "playerColliders & bulletColliders" of each room is even more difficult, because the feasibility of doing in-place overwrites depends on the collision library in use.
*/
func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer, currRenderFrame *RoomDownsyncFrame, collisionSys *resolv.Space, collisionSysMap map[int32]*resolv.Object, collisionSpaceOffsetX, collisionSpaceOffsetY float64, chConfigsOrderedByJoinIndex []*CharacterConfig) *RoomDownsyncFrame {
// [WARNING] On backend this function MUST BE called while "InputsBufferLock" is locked!
roomCapacity := len(currRenderFrame.PlayersArr)