Compare commits
37 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ca5ba83b07 | ||
|
b1f0cf2c57 | ||
|
1b43e6d760 | ||
|
e0fb21f3fb | ||
|
9bce561441 | ||
|
52be2a6a79 | ||
|
fa491b357d | ||
|
695eacaabc | ||
|
0324b584a5 | ||
|
70e552f5f0 | ||
|
c58e690a47 | ||
|
1593965950 | ||
|
2a1105efa4 | ||
|
04de4666d5 | ||
|
2290c57c1c | ||
|
24d5ad9dc8 | ||
|
fdc296531a | ||
|
becc56f672 | ||
|
58c18ab7ae | ||
|
024d527f3d | ||
|
9b29edaaa1 | ||
|
360f2fc22b | ||
|
2dbc529978 | ||
|
d21f59cafa | ||
|
335fef66ef | ||
|
52480ab29f | ||
|
971f6461ab | ||
|
061aa449c9 | ||
|
78dd9ecd85 | ||
|
d4226137b6 | ||
|
e432026fec | ||
|
3e7718ed04 | ||
|
b78dd54431 | ||
|
22fb72afbc | ||
|
7b9172c27b | ||
|
7e12853a73 | ||
|
95dcc2ef17 |
24
README.md
@@ -1,6 +1,17 @@
|
||||
# Preface
|
||||
|
||||
This project is a demo for a websocket-based input synchronization method inspired by [GGPO](https://www.ggpo.net/).
|
||||
This project is a demo for a websocket-based rollback netcode inspired by [GGPO](https://github.com/pond3r/ggpo/blob/master/doc/README.md).
|
||||
|
||||
_(the following gif is sped up to ~1.5x for file size reduction, kindly note that around ~11s countdown, the attack animation is resumed from a partial progress)_
|
||||
|
||||

|
||||
|
||||
Please also checkout [this demo video](https://pan.baidu.com/s/1U1wb7KWyHorZElNWcS5HHA?pwd=30wh) to see how this demo carries out a full 60fps synchronization with the help of _batched input upsync/downsync_ for satisfying network I/O performance.
|
||||
|
||||
The video mainly shows the following features.
|
||||
- The backend receives inputs from frontend peers and broadcasts back for synchronization.
|
||||
- The game is recovered for a player upon reconnection.
|
||||
- Both backend(Golang) and frontend(JavaScript) execute collision detection and handle collision contacts by the same algorithm. The backend dynamics is togglable by [Room.BackendDynamicsEnabled](https://github.com/genxium/DelayNoMore/blob/v0.5.2/battle_srv/models/room.go#L813), but **when turned off the game couldn't support recovery upon reconnection**.
|
||||
|
||||
_(how input delay roughly works)_
|
||||
|
||||
@@ -11,17 +22,6 @@ _(how rollback-and-chase in this project roughly works)_
|
||||

|
||||

|
||||
|
||||
_(in game screenshot)_
|
||||
|
||||

|
||||
|
||||
Please checkout [this demo video](https://pan.baidu.com/s/1YkfuHjNLzlFVnKiEj6wrDQ?pwd=tkr5) to see whether the source codes are doing what you expect for synchronization.
|
||||
|
||||
The video mainly shows the following features.
|
||||
- The backend receives inputs from frontend peers and [by a GGPO-alike manner](https://github.com/pond3r/ggpo/blob/master/doc/README.md) broadcasts back for synchronization.
|
||||
- The game is recovered for a player upon reconnection.
|
||||
- Both backend(Golang) and frontend(JavaScript) execute collision detection and handle collision contacts by the same algorithm. The backend dynamics can be toggled off by [Room.BackendDynamicsEnabled](https://github.com/genxium/DelayNoMore/blob/v0.5.2/battle_srv/models/room.go#L813), but **when turned off the game couldn't support recovery upon reconnection**.
|
||||
|
||||
# 1. Building & running
|
||||
|
||||
## 1.1 Tools to install
|
||||
|
@@ -5,6 +5,7 @@ import (
|
||||
. "battle_srv/common"
|
||||
"battle_srv/common/utils"
|
||||
"battle_srv/models"
|
||||
. "battle_srv/protos"
|
||||
"battle_srv/storage"
|
||||
"bytes"
|
||||
"crypto/sha256"
|
||||
@@ -526,8 +527,10 @@ func (p *playerController) maybeCreatePlayerWechatAuthBinding(userInfo utils.Use
|
||||
}
|
||||
if player != nil {
|
||||
updateInfo := models.Player{
|
||||
Avatar: userInfo.HeadImgURL,
|
||||
DisplayName: userInfo.Nickname,
|
||||
PlayerDownsync: PlayerDownsync{
|
||||
Avatar: userInfo.HeadImgURL,
|
||||
DisplayName: userInfo.Nickname,
|
||||
},
|
||||
}
|
||||
tx := storage.MySQLManagerIns.MustBegin()
|
||||
defer tx.Rollback()
|
||||
@@ -542,10 +545,12 @@ func (p *playerController) maybeCreatePlayerWechatAuthBinding(userInfo utils.Use
|
||||
}
|
||||
now := utils.UnixtimeMilli()
|
||||
player := models.Player{
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
DisplayName: userInfo.Nickname,
|
||||
Avatar: userInfo.HeadImgURL,
|
||||
PlayerDownsync: PlayerDownsync{
|
||||
DisplayName: userInfo.Nickname,
|
||||
Avatar: userInfo.HeadImgURL,
|
||||
},
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
}
|
||||
return p.createNewPlayer(player, userInfo.OpenID, int(Constants.AuthChannel.Wechat))
|
||||
}
|
||||
@@ -562,8 +567,10 @@ func (p *playerController) maybeCreatePlayerWechatGameAuthBinding(userInfo utils
|
||||
}
|
||||
if player != nil {
|
||||
updateInfo := models.Player{
|
||||
Avatar: userInfo.HeadImgURL,
|
||||
DisplayName: userInfo.Nickname,
|
||||
PlayerDownsync: PlayerDownsync{
|
||||
Avatar: userInfo.HeadImgURL,
|
||||
DisplayName: userInfo.Nickname,
|
||||
},
|
||||
}
|
||||
tx := storage.MySQLManagerIns.MustBegin()
|
||||
defer tx.Rollback()
|
||||
@@ -578,10 +585,12 @@ func (p *playerController) maybeCreatePlayerWechatGameAuthBinding(userInfo utils
|
||||
}
|
||||
now := utils.UnixtimeMilli()
|
||||
player := models.Player{
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
DisplayName: userInfo.Nickname,
|
||||
Avatar: userInfo.HeadImgURL,
|
||||
PlayerDownsync: PlayerDownsync{
|
||||
DisplayName: userInfo.Nickname,
|
||||
Avatar: userInfo.HeadImgURL,
|
||||
},
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
}
|
||||
return p.createNewPlayer(player, userInfo.OpenID, int(Constants.AuthChannel.WechatGame))
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@ import (
|
||||
. "battle_srv/common"
|
||||
"battle_srv/common/utils"
|
||||
"battle_srv/models"
|
||||
. "battle_srv/protos"
|
||||
"battle_srv/storage"
|
||||
. "dnmshared"
|
||||
sq "github.com/Masterminds/squirrel"
|
||||
@@ -71,7 +72,6 @@ func createMysqlData(rows *sqlx.Rows, v string) {
|
||||
}
|
||||
}
|
||||
|
||||
// 加上tableName参数, 用于pre_conf_data.sqlite里bot_player表的复用 --kobako
|
||||
func maybeCreateNewPlayerFromBotTable(db *sqlx.DB, tableName string) {
|
||||
var ls []*dbBotPlayer
|
||||
err := db.Select(&ls, "SELECT name, magic_phone_country_code, magic_phone_num, display_name FROM "+tableName)
|
||||
@@ -88,7 +88,6 @@ func maybeCreateNewPlayerFromBotTable(db *sqlx.DB, tableName string) {
|
||||
panic(err)
|
||||
}
|
||||
query = storage.MySQLManagerIns.Rebind(query)
|
||||
// existNames := make([]string, len(ls), len(ls))
|
||||
var existPlayers []*models.Player
|
||||
err = storage.MySQLManagerIns.Select(&existPlayers, query, args...)
|
||||
if nil != err {
|
||||
@@ -99,13 +98,11 @@ func maybeCreateNewPlayerFromBotTable(db *sqlx.DB, tableName string) {
|
||||
var flag bool
|
||||
for _, v := range existPlayers {
|
||||
if botPlayer.Name == v.Name {
|
||||
// 已有数据,合并处理
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !flag {
|
||||
// 找不到,新增
|
||||
Logger.Debug("create", zap.Any(tableName, botPlayer))
|
||||
err := createNewBotPlayer(botPlayer)
|
||||
if err != nil {
|
||||
@@ -120,11 +117,14 @@ func createNewBotPlayer(p *dbBotPlayer) error {
|
||||
defer tx.Rollback()
|
||||
now := utils.UnixtimeMilli()
|
||||
player := models.Player{
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
Name: p.Name,
|
||||
DisplayName: p.DisplayName,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
PlayerDownsync: PlayerDownsync{
|
||||
Name: p.Name,
|
||||
DisplayName: p.DisplayName,
|
||||
},
|
||||
}
|
||||
|
||||
err := player.Insert(tx)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@@ -4,6 +4,7 @@ import (
|
||||
. "battle_srv/common"
|
||||
"battle_srv/common/utils"
|
||||
"battle_srv/models"
|
||||
. "battle_srv/protos"
|
||||
"battle_srv/storage"
|
||||
. "dnmshared"
|
||||
|
||||
@@ -75,9 +76,11 @@ func createNewPlayer(p *dbTestPlayer) error {
|
||||
defer tx.Rollback()
|
||||
now := utils.UnixtimeMilli()
|
||||
player := models.Player{
|
||||
PlayerDownsync: PlayerDownsync{
|
||||
Name: p.Name,
|
||||
},
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
Name: p.Name,
|
||||
}
|
||||
err := player.Insert(tx)
|
||||
if err != nil {
|
||||
|
@@ -2,10 +2,9 @@ package models
|
||||
|
||||
import (
|
||||
. "battle_srv/protos"
|
||||
. "dnmshared/sharedprotos"
|
||||
)
|
||||
|
||||
func toPbPlayers(modelInstances map[int32]*Player) map[int32]*PlayerDownsync {
|
||||
func toPbPlayers(modelInstances map[int32]*Player, withMetaInfo bool) map[int32]*PlayerDownsync {
|
||||
toRet := make(map[int32]*PlayerDownsync, 0)
|
||||
if nil == modelInstances {
|
||||
return toRet
|
||||
@@ -13,18 +12,22 @@ func toPbPlayers(modelInstances map[int32]*Player) map[int32]*PlayerDownsync {
|
||||
|
||||
for k, last := range modelInstances {
|
||||
toRet[k] = &PlayerDownsync{
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
Dir: &Direction{
|
||||
Dx: last.Dir.Dx,
|
||||
Dy: last.Dir.Dy,
|
||||
},
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
JoinIndex: last.JoinIndex,
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
JoinIndex: last.JoinIndex,
|
||||
}
|
||||
if withMetaInfo {
|
||||
toRet[k].Name = last.Name
|
||||
toRet[k].DisplayName = last.DisplayName
|
||||
toRet[k].Avatar = last.Avatar
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,11 +1,13 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
. "dnmshared/sharedprotos"
|
||||
. "battle_srv/protos"
|
||||
"battle_srv/storage"
|
||||
. "dnmshared"
|
||||
"fmt"
|
||||
sq "github.com/Masterminds/squirrel"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type PlayerBattleState struct {
|
||||
@@ -33,12 +35,7 @@ func InitPlayerBattleStateIns() {
|
||||
}
|
||||
|
||||
type Player struct {
|
||||
// Meta info fields
|
||||
Id int32 `json:"id,omitempty" db:"id"`
|
||||
Name string `json:"name,omitempty" db:"name"`
|
||||
DisplayName string `json:"displayName,omitempty" db:"display_name"`
|
||||
Avatar string `json:"avatar,omitempty"`
|
||||
ColliderRadius float64 `json:"-"`
|
||||
PlayerDownsync
|
||||
|
||||
// DB only fields
|
||||
CreatedAt int64 `db:"created_at"`
|
||||
@@ -46,19 +43,10 @@ type Player struct {
|
||||
DeletedAt NullInt64 `db:"deleted_at"`
|
||||
TutorialStage int `db:"tutorial_stage"`
|
||||
|
||||
// in-battle info fields
|
||||
VirtualGridX int32
|
||||
VirtualGridY int32
|
||||
Dir *Direction
|
||||
Speed int32
|
||||
BattleState int32
|
||||
LastMoveGmtMillis int32
|
||||
Score int32
|
||||
Removed bool
|
||||
JoinIndex int32
|
||||
// other in-battle info fields
|
||||
LastSentInputFrameId int32
|
||||
AckingFrameId int32
|
||||
AckingInputFrameId int32
|
||||
LastSentInputFrameId int32
|
||||
}
|
||||
|
||||
func ExistPlayerByName(name string) (bool, error) {
|
||||
@@ -74,15 +62,43 @@ func GetPlayerById(id int) (*Player, error) {
|
||||
}
|
||||
|
||||
func getPlayer(cond sq.Eq) (*Player, error) {
|
||||
var p Player
|
||||
err := getObj("player", cond, &p)
|
||||
if err == sql.ErrNoRows {
|
||||
return nil, nil
|
||||
p := Player{}
|
||||
pd := PlayerDownsync{}
|
||||
query, args, err := sq.Select("*").From("player").Where(cond).Limit(1).ToSql()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.Dir = &Direction{
|
||||
Dx: 0,
|
||||
Dy: 0,
|
||||
rows, err := storage.MySQLManagerIns.Queryx(query, args...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cols, err := rows.Columns()
|
||||
if nil != err {
|
||||
panic(err)
|
||||
}
|
||||
for rows.Next() {
|
||||
// TODO: Do it more elegantly, but by now I don't have time to learn reflection of Golang
|
||||
vals := rowValues(rows, cols)
|
||||
for i, col := range cols {
|
||||
val := *vals[i].(*interface{})
|
||||
if "id" == col {
|
||||
pd.Id = int32(val.(int64))
|
||||
}
|
||||
if "name" == col {
|
||||
switch v := val.(type) {
|
||||
case []byte:
|
||||
pd.Name = string(v)
|
||||
default:
|
||||
pd.Name = fmt.Sprintf("%v", v)
|
||||
}
|
||||
}
|
||||
if "created_at" == col {
|
||||
p.CreatedAt = int64(val.(int64))
|
||||
}
|
||||
}
|
||||
Logger.Debug("Queried player from db", zap.Any("cond", cond), zap.Any("p", p), zap.Any("pd", pd), zap.Any("cols", cols), zap.Any("rowValues", vals))
|
||||
}
|
||||
p.PlayerDownsync = pd
|
||||
return &p, nil
|
||||
}
|
||||
|
||||
@@ -113,8 +129,6 @@ func Update(tx *sqlx.Tx, id int32, p *Player) (bool, error) {
|
||||
}
|
||||
result, err := tx.Exec(query, args...)
|
||||
if err != nil {
|
||||
fmt.Println("ERRRRRRR: ")
|
||||
fmt.Println(err)
|
||||
return false, err
|
||||
}
|
||||
rowsAffected, err := result.RowsAffected()
|
||||
|
@@ -10,6 +10,17 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func rowValues(rows *sqlx.Rows, cols []string) []interface{} {
|
||||
results := make([]interface{}, len(cols))
|
||||
for i := range results {
|
||||
results[i] = new(interface{})
|
||||
}
|
||||
if err := rows.Scan(results[:]...); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return results
|
||||
}
|
||||
|
||||
func exist(t string, cond sq.Eq) (bool, error) {
|
||||
c, err := getCount(t, cond)
|
||||
if err != nil {
|
||||
|
@@ -54,6 +54,7 @@ const (
|
||||
|
||||
COLLISION_PLAYER_INDEX_PREFIX = (1 << 17)
|
||||
COLLISION_BARRIER_INDEX_PREFIX = (1 << 16)
|
||||
COLLISION_BULLET_INDEX_PREFIX = (1 << 15)
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -61,6 +62,17 @@ const (
|
||||
MAGIC_LAST_SENT_INPUT_FRAME_ID_READDED = -2
|
||||
)
|
||||
|
||||
const (
|
||||
ATK_CHARACTER_STATE_IDLE1 = 0
|
||||
ATK_CHARACTER_STATE_WALKING = 1
|
||||
ATK_CHARACTER_STATE_ATK1 = 2
|
||||
ATK_CHARACTER_STATE_ATKED1 = 3
|
||||
)
|
||||
|
||||
const (
|
||||
DEFAULT_PLAYER_RADIUS = float64(12)
|
||||
)
|
||||
|
||||
// These directions are chosen such that when speed is changed to "(speedX+delta, speedY+delta)" for any of them, the direction is unchanged.
|
||||
var DIRECTION_DECODER = [][]int32{
|
||||
{0, 0},
|
||||
@@ -116,6 +128,7 @@ type Room struct {
|
||||
collisionSpaceOffsetY float64
|
||||
Players map[int32]*Player
|
||||
PlayersArr []*Player // ordered by joinIndex
|
||||
Space *resolv.Space
|
||||
CollisionSysMap map[int32]*resolv.Object
|
||||
/**
|
||||
* The following `PlayerDownsyncSessionDict` is NOT individually put
|
||||
@@ -142,11 +155,6 @@ type Room struct {
|
||||
Index int
|
||||
RenderFrameId int32
|
||||
CurDynamicsRenderFrameId int32 // [WARNING] The dynamics of backend is ALWAYS MOVING FORWARD BY ALL-CONFIRMED INPUTFRAMES (either by upsync or forced), i.e. no rollback
|
||||
ServerFps int32
|
||||
BattleDurationFrames int32
|
||||
BattleDurationNanos int64
|
||||
InputFrameUpsyncDelayTolerance int32
|
||||
MaxChasingRenderFramesPerUpdate int32
|
||||
EffectivePlayerCount int32
|
||||
DismissalWaitGroup sync.WaitGroup
|
||||
Barriers map[int32]*Barrier
|
||||
@@ -156,27 +164,15 @@ type Room struct {
|
||||
LastAllConfirmedInputFrameId int32
|
||||
LastAllConfirmedInputFrameIdWithChange int32
|
||||
LastAllConfirmedInputList []uint64
|
||||
InputDelayFrames int32 // in the count of render frames
|
||||
NstDelayFrames int32 // network-single-trip delay in the count of render frames, proposed to be (InputDelayFrames >> 1) because we expect a round-trip delay to be exactly "InputDelayFrames"
|
||||
InputScaleFrames uint32 // inputDelayedAndScaledFrameId = ((originalFrameId - InputDelayFrames) >> InputScaleFrames)
|
||||
JoinIndexBooleanArr []bool
|
||||
RollbackEstimatedDtMillis float64
|
||||
RollbackEstimatedDtNanos int64
|
||||
LastRenderFrameIdTriggeredAt int64
|
||||
|
||||
WorldToVirtualGridRatio float64
|
||||
VirtualGridToWorldRatio float64
|
||||
BackendDynamicsEnabled bool
|
||||
LastRenderFrameIdTriggeredAt int64
|
||||
PlayerDefaultSpeed int32
|
||||
|
||||
PlayerDefaultSpeed int32
|
||||
|
||||
StageName string
|
||||
StageDiscreteW int32
|
||||
StageDiscreteH int32
|
||||
StageTileW int32
|
||||
StageTileH int32
|
||||
RawBattleStrToVec2DListMap StrToVec2DListMap
|
||||
RawBattleStrToPolygon2DListMap StrToPolygon2DListMap
|
||||
BackendDynamicsEnabled bool
|
||||
BulletBattleLocalIdCounter int32
|
||||
dilutedRollbackEstimatedDtNanos int64
|
||||
BattleColliderInfo // Compositing to send centralized magic numbers
|
||||
}
|
||||
|
||||
func (pR *Room) updateScore() {
|
||||
@@ -200,8 +196,8 @@ func (pR *Room) AddPlayerIfPossible(pPlayerFromDbInit *Player, session *websocke
|
||||
pPlayerFromDbInit.AckingInputFrameId = -1
|
||||
pPlayerFromDbInit.LastSentInputFrameId = MAGIC_LAST_SENT_INPUT_FRAME_ID_NORMAL_ADDED
|
||||
pPlayerFromDbInit.BattleState = PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK
|
||||
pPlayerFromDbInit.Speed = pR.PlayerDefaultSpeed // Hardcoded
|
||||
pPlayerFromDbInit.ColliderRadius = float64(24) // Hardcoded
|
||||
pPlayerFromDbInit.Speed = pR.PlayerDefaultSpeed // Hardcoded
|
||||
pPlayerFromDbInit.ColliderRadius = DEFAULT_PLAYER_RADIUS // Hardcoded
|
||||
|
||||
pR.Players[playerId] = pPlayerFromDbInit
|
||||
pR.PlayerDownsyncSessionDict[playerId] = session
|
||||
@@ -226,15 +222,16 @@ func (pR *Room) ReAddPlayerIfPossible(pTmpPlayerInstance *Player, session *webso
|
||||
* -- YFLu
|
||||
*/
|
||||
defer pR.onPlayerReAdded(playerId)
|
||||
pR.PlayerDownsyncSessionDict[playerId] = session
|
||||
pR.PlayerSignalToCloseDict[playerId] = signalToCloseConnOfThisPlayer
|
||||
pEffectiveInRoomPlayerInstance := pR.Players[playerId]
|
||||
pEffectiveInRoomPlayerInstance.AckingFrameId = -1
|
||||
pEffectiveInRoomPlayerInstance.AckingInputFrameId = -1
|
||||
pEffectiveInRoomPlayerInstance.LastSentInputFrameId = MAGIC_LAST_SENT_INPUT_FRAME_ID_READDED
|
||||
pEffectiveInRoomPlayerInstance.BattleState = PlayerBattleStateIns.READDED_PENDING_BATTLE_COLLIDER_ACK
|
||||
pEffectiveInRoomPlayerInstance.Speed = pR.PlayerDefaultSpeed // Hardcoded
|
||||
pEffectiveInRoomPlayerInstance.ColliderRadius = float64(16) // Hardcoded
|
||||
pEffectiveInRoomPlayerInstance.Speed = pR.PlayerDefaultSpeed // Hardcoded
|
||||
pEffectiveInRoomPlayerInstance.ColliderRadius = DEFAULT_PLAYER_RADIUS // Hardcoded
|
||||
|
||||
pR.PlayerDownsyncSessionDict[playerId] = session
|
||||
pR.PlayerSignalToCloseDict[playerId] = signalToCloseConnOfThisPlayer
|
||||
|
||||
Logger.Warn("ReAddPlayerIfPossible finished.", zap.Any("roomId", pR.Id), zap.Any("playerId", playerId), zap.Any("joinIndex", pEffectiveInRoomPlayerInstance.JoinIndex), zap.Any("playerBattleState", pEffectiveInRoomPlayerInstance.BattleState), zap.Any("roomState", pR.State), zap.Any("roomEffectivePlayerCount", pR.EffectivePlayerCount), zap.Any("AckingFrameId", pEffectiveInRoomPlayerInstance.AckingFrameId), zap.Any("AckingInputFrameId", pEffectiveInRoomPlayerInstance.AckingInputFrameId), zap.Any("LastSentInputFrameId", pEffectiveInRoomPlayerInstance.LastSentInputFrameId))
|
||||
return true
|
||||
@@ -252,7 +249,7 @@ func (pR *Room) ChooseStage() error {
|
||||
}
|
||||
|
||||
rand.Seed(time.Now().Unix())
|
||||
stageNameList := []string{"simple" /* "richsoil" */}
|
||||
stageNameList := []string{"dungeon" /*"dungeon", "simple", "richsoil" */}
|
||||
chosenStageIndex := rand.Int() % len(stageNameList) // Hardcoded temporarily. -- YFLu
|
||||
|
||||
pR.StageName = stageNameList[chosenStageIndex]
|
||||
@@ -277,8 +274,8 @@ func (pR *Room) ChooseStage() error {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// Obtain the content of `gidBoundariesMapInB2World`.
|
||||
gidBoundariesMapInB2World := make(map[int]StrToPolygon2DListMap, 0)
|
||||
// Obtain the content of `gidBoundariesMap`.
|
||||
gidBoundariesMap := make(map[int]StrToPolygon2DListMap, 0)
|
||||
for _, tileset := range pTmxMapIns.Tilesets {
|
||||
relativeTsxFilePath := fmt.Sprintf("%s/%s", filepath.Join(pwd, relativePathForChosenStage), tileset.Source) // Note that "TmxTileset.Source" can be a string of "relative path".
|
||||
absTsxFilePath, err := filepath.Abs(relativeTsxFilePath)
|
||||
@@ -294,10 +291,10 @@ func (pR *Room) ChooseStage() error {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
DeserializeTsxToColliderDict(pTmxMapIns, byteArrOfTsxFile, int(tileset.FirstGid), gidBoundariesMapInB2World)
|
||||
DeserializeTsxToColliderDict(pTmxMapIns, byteArrOfTsxFile, int(tileset.FirstGid), gidBoundariesMap)
|
||||
}
|
||||
|
||||
stageDiscreteW, stageDiscreteH, stageTileW, stageTileH, toRetStrToVec2DListMap, toRetStrToPolygon2DListMap, err := ParseTmxLayersAndGroups(pTmxMapIns, gidBoundariesMapInB2World)
|
||||
stageDiscreteW, stageDiscreteH, stageTileW, stageTileH, strToVec2DListMap, strToPolygon2DListMap, err := ParseTmxLayersAndGroups(pTmxMapIns, gidBoundariesMap)
|
||||
if nil != err {
|
||||
panic(err)
|
||||
}
|
||||
@@ -306,10 +303,10 @@ func (pR *Room) ChooseStage() error {
|
||||
pR.StageDiscreteH = stageDiscreteH
|
||||
pR.StageTileW = stageTileW
|
||||
pR.StageTileH = stageTileH
|
||||
pR.RawBattleStrToVec2DListMap = toRetStrToVec2DListMap
|
||||
pR.RawBattleStrToPolygon2DListMap = toRetStrToPolygon2DListMap
|
||||
pR.StrToVec2DListMap = strToVec2DListMap
|
||||
pR.StrToPolygon2DListMap = strToPolygon2DListMap
|
||||
|
||||
barrierPolygon2DList := *(toRetStrToPolygon2DListMap["Barrier"])
|
||||
barrierPolygon2DList := *(strToPolygon2DListMap["Barrier"])
|
||||
|
||||
var barrierLocalIdInBattle int32 = 0
|
||||
for _, polygon2DUnaligned := range barrierPolygon2DList.Eles {
|
||||
@@ -345,13 +342,6 @@ func (pR *Room) ConvertToLastUsedRenderFrameId(inputFrameId int32, inputDelayFra
|
||||
return ((inputFrameId << pR.InputScaleFrames) + inputDelayFrames + (1 << pR.InputScaleFrames) - 1)
|
||||
}
|
||||
|
||||
func (pR *Room) EncodeUpsyncCmd(upsyncCmd *InputFrameUpsync) uint64 {
|
||||
var ret uint64 = 0
|
||||
// There're 13 possible directions, occupying the first 4 bits, no need to shift
|
||||
ret += uint64(upsyncCmd.EncodedDir)
|
||||
return ret
|
||||
}
|
||||
|
||||
func (pR *Room) RenderFrameBufferString() string {
|
||||
return fmt.Sprintf("{renderFrameId: %d, stRenderFrameId: %d, edRenderFrameId: %d, lastAllConfirmedRenderFrameId: %d}", pR.RenderFrameId, pR.RenderFrameBuffer.StFrameId, pR.RenderFrameBuffer.EdFrameId, pR.CurDynamicsRenderFrameId)
|
||||
}
|
||||
@@ -370,6 +360,7 @@ func (pR *Room) InputsBufferString(allDetails bool) string {
|
||||
break
|
||||
}
|
||||
f := tmp.(*InputFrameDownsync)
|
||||
//s = append(s, fmt.Sprintf("{inputFrameId: %v, inputList: %v, &inputList: %p, confirmedList: %v}", f.InputFrameId, f.InputList, &(f.InputList), f.ConfirmedList))
|
||||
s = append(s, fmt.Sprintf("{inputFrameId: %v, inputList: %v, confirmedList: %v}", f.InputFrameId, f.InputList, f.ConfirmedList))
|
||||
}
|
||||
|
||||
@@ -385,15 +376,13 @@ func (pR *Room) StartBattle() {
|
||||
return
|
||||
}
|
||||
|
||||
// Always instantiates a new channel and let the old one die out due to not being retained by any root reference.
|
||||
nanosPerFrame := 1000000000 / int64(pR.ServerFps)
|
||||
pR.RenderFrameId = 0
|
||||
|
||||
// Initialize the "collisionSys" as well as "RenderFrameBuffer"
|
||||
pR.CurDynamicsRenderFrameId = 0
|
||||
kickoffFrame := &RoomDownsyncFrame{
|
||||
Id: pR.RenderFrameId,
|
||||
Players: toPbPlayers(pR.Players),
|
||||
Players: toPbPlayers(pR.Players, false),
|
||||
CountdownNanos: pR.BattleDurationNanos,
|
||||
}
|
||||
pR.RenderFrameBuffer.Put(kickoffFrame)
|
||||
@@ -426,7 +415,7 @@ func (pR *Room) StartBattle() {
|
||||
stCalculation := utils.UnixtimeNano()
|
||||
|
||||
elapsedNanosSinceLastFrameIdTriggered := stCalculation - pR.LastRenderFrameIdTriggeredAt
|
||||
if elapsedNanosSinceLastFrameIdTriggered < pR.RollbackEstimatedDtNanos {
|
||||
if elapsedNanosSinceLastFrameIdTriggered < pR.dilutedRollbackEstimatedDtNanos {
|
||||
Logger.Debug(fmt.Sprintf("Avoiding too fast frame@roomId=%v, renderFrameId=%v: elapsedNanosSinceLastFrameIdTriggered=%v", pR.Id, pR.RenderFrameId, elapsedNanosSinceLastFrameIdTriggered))
|
||||
continue
|
||||
}
|
||||
@@ -487,7 +476,7 @@ func (pR *Room) StartBattle() {
|
||||
|
||||
for playerId, player := range pR.Players {
|
||||
if swapped := atomic.CompareAndSwapInt32(&player.BattleState, PlayerBattleStateIns.ACTIVE, PlayerBattleStateIns.ACTIVE); !swapped {
|
||||
// [WARNING] DON'T send anything if the player is disconnected, because it could jam the channel and cause significant delay upon "battle recovery for reconnected player".
|
||||
// [WARNING] DON'T send anything if the player is not yet active, because it could jam the channel and cause significant delay upon "battle recovery for reconnected player".
|
||||
continue
|
||||
}
|
||||
if 0 == pR.RenderFrameId {
|
||||
@@ -537,8 +526,8 @@ func (pR *Room) StartBattle() {
|
||||
2. reconnection
|
||||
*/
|
||||
shouldResync1 := (MAGIC_LAST_SENT_INPUT_FRAME_ID_READDED == player.LastSentInputFrameId)
|
||||
// shouldResync2 := (0 < (unconfirmedMask & uint64(1 << uint32(player.JoinIndex-1)))) // This condition is critical, if we don't send resync upon this condition, the "reconnected or slowly-clocking player" might never get its input synced
|
||||
shouldResync2 := (0 < unconfirmedMask) // An easier version of the above, might keep sending "refRenderFrame"s to still connected players when any player is disconnected
|
||||
shouldResync2 := (0 < (unconfirmedMask & uint64(1<<uint32(player.JoinIndex-1)))) // This condition is critical, if we don't send resync upon this condition, the "reconnected or slowly-clocking player" might never get its input synced
|
||||
// shouldResync2 := (0 < unconfirmedMask) // An easier version of the above, might keep sending "refRenderFrame"s to still connected players when any player is disconnected
|
||||
if pR.BackendDynamicsEnabled && (shouldResync1 || shouldResync2) {
|
||||
tmp := pR.RenderFrameBuffer.GetByFrameId(refRenderFrameId)
|
||||
if nil == tmp {
|
||||
@@ -560,35 +549,38 @@ func (pR *Room) StartBattle() {
|
||||
}
|
||||
}
|
||||
|
||||
toApplyInputFrameId := pR.ConvertToInputFrameId(refRenderFrameId, pR.InputDelayFrames)
|
||||
minToKeepInputFrameId := pR.ConvertToInputFrameId(refRenderFrameId, pR.InputDelayFrames) - pR.SpAtkLookupFrames
|
||||
/*
|
||||
[WARNING]
|
||||
The following updates to "toApplyInputFrameId" is necessary because when "false == pR.BackendDynamicsEnabled", the variable "refRenderFrameId" is not well defined.
|
||||
The following updates to "minToKeepInputFrameId" is necessary because when "false == pR.BackendDynamicsEnabled", the variable "refRenderFrameId" is not well defined.
|
||||
*/
|
||||
minLastSentInputFrameId := int32(math.MaxInt32)
|
||||
for _, player := range pR.Players {
|
||||
if PlayerBattleStateIns.ACTIVE != player.BattleState {
|
||||
continue
|
||||
}
|
||||
if player.LastSentInputFrameId >= minLastSentInputFrameId {
|
||||
continue
|
||||
}
|
||||
minLastSentInputFrameId = player.LastSentInputFrameId
|
||||
}
|
||||
if minLastSentInputFrameId < toApplyInputFrameId {
|
||||
toApplyInputFrameId = minLastSentInputFrameId
|
||||
if minLastSentInputFrameId < minToKeepInputFrameId {
|
||||
minToKeepInputFrameId = minLastSentInputFrameId
|
||||
}
|
||||
for pR.InputsBuffer.N < pR.InputsBuffer.Cnt || (0 < pR.InputsBuffer.Cnt && pR.InputsBuffer.StFrameId < toApplyInputFrameId) {
|
||||
for pR.InputsBuffer.N < pR.InputsBuffer.Cnt || (0 < pR.InputsBuffer.Cnt && pR.InputsBuffer.StFrameId < minToKeepInputFrameId) {
|
||||
f := pR.InputsBuffer.Pop().(*InputFrameDownsync)
|
||||
if pR.inputFrameIdDebuggable(f.InputFrameId) {
|
||||
// Popping of an "inputFrame" would be AFTER its being all being confirmed, because it requires the "inputFrame" to be all acked
|
||||
Logger.Debug("inputFrame lifecycle#4[popped]:", zap.Any("roomId", pR.Id), zap.Any("inputFrameId", f.InputFrameId), zap.Any("toApplyInputFrameId", toApplyInputFrameId), zap.Any("InputsBuffer", pR.InputsBufferString(false)))
|
||||
Logger.Debug("inputFrame lifecycle#4[popped]:", zap.Any("roomId", pR.Id), zap.Any("inputFrameId", f.InputFrameId), zap.Any("minToKeepInputFrameId", minToKeepInputFrameId), zap.Any("InputsBuffer", pR.InputsBufferString(false)))
|
||||
}
|
||||
}
|
||||
|
||||
pR.RenderFrameId++
|
||||
elapsedInCalculation := (utils.UnixtimeNano() - stCalculation)
|
||||
if elapsedInCalculation > nanosPerFrame {
|
||||
Logger.Warn(fmt.Sprintf("SLOW FRAME! Elapsed time statistics: roomId=%v, room.RenderFrameId=%v, elapsedInCalculation=%v ns, dynamicsDuration=%v ns, expected nanosPerFrame=%v", pR.Id, pR.RenderFrameId, elapsedInCalculation, dynamicsDuration, nanosPerFrame))
|
||||
if elapsedInCalculation > pR.dilutedRollbackEstimatedDtNanos {
|
||||
Logger.Warn(fmt.Sprintf("SLOW FRAME! Elapsed time statistics: roomId=%v, room.RenderFrameId=%v, elapsedInCalculation=%v ns, dynamicsDuration=%v ns, dilutedRollbackEstimatedDtNanos=%v", pR.Id, pR.RenderFrameId, elapsedInCalculation, dynamicsDuration, pR.dilutedRollbackEstimatedDtNanos))
|
||||
}
|
||||
time.Sleep(time.Duration(nanosPerFrame - elapsedInCalculation))
|
||||
time.Sleep(time.Duration(pR.dilutedRollbackEstimatedDtNanos - elapsedInCalculation))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -632,7 +624,6 @@ func (pR *Room) OnBattleCmdReceived(pReq *WsReq) {
|
||||
Logger.Debug(fmt.Sprintf("Omitting obsolete inputFrameUpsync: roomId=%v, playerId=%v, clientInputFrameId=%v, InputsBuffer=%v", pR.Id, playerId, clientInputFrameId, pR.InputsBufferString(false)))
|
||||
continue
|
||||
}
|
||||
|
||||
bufIndex := pR.toDiscreteInputsBufferIndex(clientInputFrameId, pReq.JoinIndex)
|
||||
pR.DiscreteInputsBuffer.Store(bufIndex, inputFrameUpsync)
|
||||
|
||||
@@ -684,7 +675,7 @@ func (pR *Room) StopBattleForSettlement() {
|
||||
for playerId, _ := range pR.Players {
|
||||
assembledFrame := RoomDownsyncFrame{
|
||||
Id: pR.RenderFrameId,
|
||||
Players: toPbPlayers(pR.Players),
|
||||
Players: toPbPlayers(pR.Players, false),
|
||||
CountdownNanos: -1, // TODO: Replace this magic constant!
|
||||
}
|
||||
pR.sendSafely(&assembledFrame, nil, DOWNSYNC_MSG_ACT_BATTLE_STOPPED, playerId)
|
||||
@@ -708,22 +699,9 @@ func (pR *Room) onBattlePrepare(cb BattleStartCbType) {
|
||||
pR.State = RoomBattleStateIns.PREPARE
|
||||
Logger.Info("Battle state transitted to RoomBattleStateIns.PREPARE for:", zap.Any("roomId", pR.Id))
|
||||
|
||||
playerMetas := make(map[int32]*PlayerDownsyncMeta, 0)
|
||||
for _, player := range pR.Players {
|
||||
playerMetas[player.Id] = &PlayerDownsyncMeta{
|
||||
Id: player.Id,
|
||||
Name: player.Name,
|
||||
DisplayName: player.DisplayName,
|
||||
Avatar: player.Avatar,
|
||||
ColliderRadius: player.ColliderRadius, // hardcoded for now
|
||||
JoinIndex: player.JoinIndex,
|
||||
}
|
||||
}
|
||||
|
||||
battleReadyToStartFrame := &RoomDownsyncFrame{
|
||||
Id: DOWNSYNC_MSG_ACT_BATTLE_READY_TO_START,
|
||||
Players: toPbPlayers(pR.Players),
|
||||
PlayerMetas: playerMetas,
|
||||
Players: toPbPlayers(pR.Players, true),
|
||||
CountdownNanos: pR.BattleDurationNanos,
|
||||
}
|
||||
|
||||
@@ -790,9 +768,11 @@ func (pR *Room) Dismiss() {
|
||||
func (pR *Room) OnDismissed() {
|
||||
|
||||
// Always instantiates new HeapRAM blocks and let the old blocks die out due to not being retained by any root reference.
|
||||
pR.BulletBattleLocalIdCounter = 0
|
||||
pR.WorldToVirtualGridRatio = float64(1000)
|
||||
pR.VirtualGridToWorldRatio = float64(1.0) / pR.WorldToVirtualGridRatio // this is a one-off computation, should avoid division in iterations
|
||||
pR.PlayerDefaultSpeed = int32(float64(2) * pR.WorldToVirtualGridRatio) // in virtual grids per frame
|
||||
pR.SpAtkLookupFrames = 5
|
||||
pR.PlayerDefaultSpeed = int32(float64(1) * pR.WorldToVirtualGridRatio) // in virtual grids per frame
|
||||
pR.Players = make(map[int32]*Player)
|
||||
pR.PlayersArr = make([]*Player, pR.Capacity)
|
||||
pR.CollisionSysMap = make(map[int32]*resolv.Object)
|
||||
@@ -800,9 +780,10 @@ func (pR *Room) OnDismissed() {
|
||||
pR.PlayerSignalToCloseDict = make(map[int32]SignalToCloseConnCbType)
|
||||
pR.JoinIndexBooleanArr = make([]bool, pR.Capacity)
|
||||
pR.Barriers = make(map[int32]*Barrier)
|
||||
pR.InputsBuffer = NewRingBuffer(1024)
|
||||
pR.RenderCacheSize = 1024
|
||||
pR.RenderFrameBuffer = NewRingBuffer(pR.RenderCacheSize)
|
||||
pR.DiscreteInputsBuffer = sync.Map{}
|
||||
pR.RenderFrameBuffer = NewRingBuffer(1024)
|
||||
pR.InputsBuffer = NewRingBuffer((pR.RenderCacheSize >> 2) + 1)
|
||||
|
||||
pR.LastAllConfirmedInputFrameId = -1
|
||||
pR.LastAllConfirmedInputFrameIdWithChange = -1
|
||||
@@ -811,17 +792,45 @@ func (pR *Room) OnDismissed() {
|
||||
pR.RenderFrameId = 0
|
||||
pR.CurDynamicsRenderFrameId = 0
|
||||
pR.InputDelayFrames = 8
|
||||
pR.NstDelayFrames = 8
|
||||
pR.NstDelayFrames = 4
|
||||
pR.InputScaleFrames = uint32(2)
|
||||
pR.ServerFps = 60
|
||||
pR.RollbackEstimatedDtMillis = 16.667 // Use fixed-and-low-precision to mitigate the inconsistent floating-point-number issue between Golang and JavaScript
|
||||
pR.RollbackEstimatedDtNanos = 16666666 // A little smaller than the actual per frame time, just for preventing FAST FRAME
|
||||
dilutionFactor := 12
|
||||
pR.dilutedRollbackEstimatedDtNanos = int64(16666666 * (dilutionFactor) / (dilutionFactor - 1)) // [WARNING] Only used in controlling "battleMainLoop" to be keep a frame rate lower than that of the frontends, such that upon resync(i.e. BackendDynamicsEnabled=true), the frontends would have bigger chances to keep up with or even surpass the backend calculation
|
||||
pR.BattleDurationFrames = 30 * pR.ServerFps
|
||||
pR.BattleDurationNanos = int64(pR.BattleDurationFrames) * (pR.RollbackEstimatedDtNanos + 1)
|
||||
pR.InputFrameUpsyncDelayTolerance = 2
|
||||
pR.MaxChasingRenderFramesPerUpdate = 5
|
||||
|
||||
pR.BackendDynamicsEnabled = true // [WARNING] When "false", recovery upon reconnection wouldn't work!
|
||||
punchSkillId := int32(1)
|
||||
pR.MeleeSkillConfig = make(map[int32]*MeleeBullet, 0)
|
||||
pR.MeleeSkillConfig[punchSkillId] = &MeleeBullet{
|
||||
// for offender
|
||||
StartupFrames: int32(10),
|
||||
ActiveFrames: int32(3),
|
||||
RecoveryFrames: int32(34),
|
||||
RecoveryFramesOnBlock: int32(34),
|
||||
RecoveryFramesOnHit: int32(34),
|
||||
Moveforward: &Vec2D{
|
||||
X: 0,
|
||||
Y: 0,
|
||||
},
|
||||
HitboxOffset: float64(12.0), // should be about the radius of the PlayerCollider
|
||||
HitboxSize: &Vec2D{
|
||||
X: float64(23.0),
|
||||
Y: float64(32.0),
|
||||
},
|
||||
|
||||
// for defender
|
||||
HitStunFrames: int32(18),
|
||||
BlockStunFrames: int32(9),
|
||||
Pushback: float64(8.0),
|
||||
ReleaseTriggerType: int32(1), // 1: rising-edge, 2: falling-edge
|
||||
Damage: int32(5),
|
||||
}
|
||||
|
||||
pR.ChooseStage()
|
||||
pR.EffectivePlayerCount = 0
|
||||
@@ -931,7 +940,7 @@ func (pR *Room) onPlayerAdded(playerId int32) {
|
||||
pR.JoinIndexBooleanArr[index] = true
|
||||
|
||||
// Lazily assign the initial position of "Player" for "RoomDownsyncFrame".
|
||||
playerPosList := *(pR.RawBattleStrToVec2DListMap["PlayerStartingPos"])
|
||||
playerPosList := *(pR.StrToVec2DListMap["PlayerStartingPos"])
|
||||
if index > len(playerPosList.Eles) {
|
||||
panic(fmt.Sprintf("onPlayerAdded error, index >= len(playerPosList), roomId=%v, playerId=%v, roomState=%v, roomEffectivePlayerCount=%v", pR.Id, playerId, pR.State, pR.EffectivePlayerCount))
|
||||
}
|
||||
@@ -941,6 +950,14 @@ func (pR *Room) onPlayerAdded(playerId int32) {
|
||||
panic(fmt.Sprintf("onPlayerAdded error, nil == playerPos, roomId=%v, playerId=%v, roomState=%v, roomEffectivePlayerCount=%v", pR.Id, playerId, pR.State, pR.EffectivePlayerCount))
|
||||
}
|
||||
pR.Players[playerId].VirtualGridX, pR.Players[playerId].VirtualGridY = WorldToVirtualGridPos(playerPos.X, playerPos.Y, pR.WorldToVirtualGridRatio)
|
||||
// Hardcoded initial character orientation/facing
|
||||
if 0 == (pR.Players[playerId].JoinIndex % 2) {
|
||||
pR.Players[playerId].DirX = -2
|
||||
pR.Players[playerId].DirY = 0
|
||||
} else {
|
||||
pR.Players[playerId].DirX = +2
|
||||
pR.Players[playerId].DirY = 0
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
@@ -968,18 +985,6 @@ func (pR *Room) OnPlayerBattleColliderAcked(playerId int32) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
playerMetas := make(map[int32]*PlayerDownsyncMeta, 0)
|
||||
for _, eachPlayer := range pR.Players {
|
||||
playerMetas[eachPlayer.Id] = &PlayerDownsyncMeta{
|
||||
Id: eachPlayer.Id,
|
||||
Name: eachPlayer.Name,
|
||||
DisplayName: eachPlayer.DisplayName,
|
||||
Avatar: eachPlayer.Avatar,
|
||||
JoinIndex: eachPlayer.JoinIndex,
|
||||
ColliderRadius: eachPlayer.ColliderRadius,
|
||||
}
|
||||
}
|
||||
|
||||
// Broadcast added or readded player info to all players in the same room
|
||||
for _, eachPlayer := range pR.Players {
|
||||
/*
|
||||
@@ -990,19 +995,23 @@ func (pR *Room) OnPlayerBattleColliderAcked(playerId int32) bool {
|
||||
|
||||
This function is triggered by an upsync message via WebSocket, thus downsync sending is also available by now.
|
||||
*/
|
||||
currPlayerBattleState := atomic.LoadInt32(&(eachPlayer.BattleState))
|
||||
if PlayerBattleStateIns.DISCONNECTED == currPlayerBattleState || PlayerBattleStateIns.LOST == currPlayerBattleState {
|
||||
// [WARNING] DON'T try to send any message to an inactive player!
|
||||
continue
|
||||
}
|
||||
|
||||
switch targetPlayer.BattleState {
|
||||
case PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK:
|
||||
playerAckedFrame := &RoomDownsyncFrame{
|
||||
Id: pR.RenderFrameId,
|
||||
Players: toPbPlayers(pR.Players),
|
||||
PlayerMetas: playerMetas,
|
||||
Id: pR.RenderFrameId,
|
||||
Players: toPbPlayers(pR.Players, true),
|
||||
}
|
||||
pR.sendSafely(playerAckedFrame, nil, DOWNSYNC_MSG_ACT_PLAYER_ADDED_AND_ACKED, eachPlayer.Id)
|
||||
case PlayerBattleStateIns.READDED_PENDING_BATTLE_COLLIDER_ACK:
|
||||
playerAckedFrame := &RoomDownsyncFrame{
|
||||
Id: pR.RenderFrameId,
|
||||
Players: toPbPlayers(pR.Players),
|
||||
PlayerMetas: playerMetas,
|
||||
Id: pR.RenderFrameId,
|
||||
Players: toPbPlayers(pR.Players, true),
|
||||
}
|
||||
pR.sendSafely(playerAckedFrame, nil, DOWNSYNC_MSG_ACT_PLAYER_READDED_AND_ACKED, eachPlayer.Id)
|
||||
default:
|
||||
@@ -1073,12 +1082,15 @@ func (pR *Room) prefabInputFrameDownsync(inputFrameId int32) *InputFrameDownsync
|
||||
ConfirmedList: uint64(0),
|
||||
}
|
||||
} else {
|
||||
tmp := pR.InputsBuffer.GetByFrameId(inputFrameId - 1)
|
||||
tmp := pR.InputsBuffer.GetByFrameId(inputFrameId - 1) // There's no need for the backend to find the "lastAllConfirmed inputs" for prefabbing, either "BackendDynamicsEnabled" is true or false
|
||||
if nil == tmp {
|
||||
panic(fmt.Sprintf("Error prefabbing inputFrameDownsync: roomId=%v, InputsBuffer=%v", pR.Id, pR.InputsBufferString(false)))
|
||||
}
|
||||
prevInputFrameDownsync := tmp.(*InputFrameDownsync)
|
||||
currInputList := prevInputFrameDownsync.InputList // Would be a clone of the values
|
||||
currInputList := make([]uint64, pR.Capacity) // Would be a clone of the values
|
||||
for i, _ := range currInputList {
|
||||
currInputList[i] = (prevInputFrameDownsync.InputList[i] & uint64(15)) // Don't predict attack input!
|
||||
}
|
||||
currInputFrameDownsync = &InputFrameDownsync{
|
||||
InputFrameId: inputFrameId,
|
||||
InputList: currInputList,
|
||||
@@ -1092,18 +1104,12 @@ func (pR *Room) prefabInputFrameDownsync(inputFrameId int32) *InputFrameDownsync
|
||||
|
||||
func (pR *Room) markConfirmationIfApplicable() {
|
||||
inputFrameId1 := pR.LastAllConfirmedInputFrameId + 1
|
||||
gap := int32(4) // This value is hardcoded and doesn't need be much bigger, because the backend side is supposed to never lag when "false == BackendDynamicsEnabled".
|
||||
inputFrameId2 := inputFrameId1 + gap
|
||||
if inputFrameId2 > pR.InputsBuffer.EdFrameId {
|
||||
inputFrameId2 = pR.InputsBuffer.EdFrameId
|
||||
}
|
||||
|
||||
totPlayerCnt := uint32(pR.Capacity)
|
||||
allConfirmedMask := uint64((1 << totPlayerCnt) - 1)
|
||||
for inputFrameId := inputFrameId1; inputFrameId < inputFrameId2; inputFrameId++ {
|
||||
for inputFrameId := inputFrameId1; inputFrameId < pR.InputsBuffer.EdFrameId; inputFrameId++ {
|
||||
tmp := pR.InputsBuffer.GetByFrameId(inputFrameId)
|
||||
if nil == tmp {
|
||||
panic(fmt.Sprintf("inputFrameId=%v doesn't exist for roomId=%v, this is abnormal because the server should prefab inputFrameDownsync in a most advanced pace, check the prefab logic! InputsBuffer=%v", inputFrameId, pR.Id, pR.InputsBufferString(false)))
|
||||
panic(fmt.Sprintf("inputFrameId=%v doesn't exist for roomId=%v, this is abnormal because the server should prefab inputFrameDownsync in a most advanced pace, check the prefab logic (Or maybe you're having a 'Room.RenderCacheSize' too small)! InputsBuffer=%v", inputFrameId, pR.Id, pR.InputsBufferString(false)))
|
||||
}
|
||||
inputFrameDownsync := tmp.(*InputFrameDownsync)
|
||||
for _, player := range pR.Players {
|
||||
@@ -1114,7 +1120,7 @@ func (pR *Room) markConfirmationIfApplicable() {
|
||||
}
|
||||
inputFrameUpsync := tmp.(*InputFrameUpsync)
|
||||
indiceInJoinIndexBooleanArr := uint32(player.JoinIndex - 1)
|
||||
inputFrameDownsync.InputList[indiceInJoinIndexBooleanArr] = pR.EncodeUpsyncCmd(inputFrameUpsync)
|
||||
inputFrameDownsync.InputList[indiceInJoinIndexBooleanArr] = inputFrameUpsync.Encoded
|
||||
inputFrameDownsync.ConfirmedList |= (1 << indiceInJoinIndexBooleanArr)
|
||||
}
|
||||
|
||||
@@ -1193,13 +1199,6 @@ func (pR *Room) applyInputFrameDownsyncDynamics(fromRenderFrameId int32, toRende
|
||||
}
|
||||
|
||||
nextRenderFrame := pR.applyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputFrame, currRenderFrame, pR.CollisionSysMap)
|
||||
// Update in the latest player pointers
|
||||
for playerId, playerDownsync := range nextRenderFrame.Players {
|
||||
pR.Players[playerId].VirtualGridX = playerDownsync.VirtualGridX
|
||||
pR.Players[playerId].VirtualGridY = playerDownsync.VirtualGridY
|
||||
pR.Players[playerId].Dir.Dx = playerDownsync.Dir.Dx
|
||||
pR.Players[playerId].Dir.Dy = playerDownsync.Dir.Dy
|
||||
}
|
||||
pR.RenderFrameBuffer.Put(nextRenderFrame)
|
||||
pR.CurDynamicsRenderFrameId++
|
||||
}
|
||||
@@ -1207,22 +1206,28 @@ func (pR *Room) applyInputFrameDownsyncDynamics(fromRenderFrameId int32, toRende
|
||||
|
||||
// TODO: Write unit-test for this function to compare with its frontend counter part
|
||||
func (pR *Room) applyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputFrame *InputFrameDownsync, currRenderFrame *RoomDownsyncFrame, collisionSysMap map[int32]*resolv.Object) *RoomDownsyncFrame {
|
||||
// TODO: Derive "nextRenderFramePlayers[*].CharacterState" as the frontend counter-part!
|
||||
nextRenderFramePlayers := make(map[int32]*PlayerDownsync, pR.Capacity)
|
||||
// Make a copy first
|
||||
for playerId, currPlayerDownsync := range currRenderFrame.Players {
|
||||
nextRenderFramePlayers[playerId] = &PlayerDownsync{
|
||||
Id: playerId,
|
||||
VirtualGridX: currPlayerDownsync.VirtualGridX,
|
||||
VirtualGridY: currPlayerDownsync.VirtualGridY,
|
||||
Dir: &Direction{
|
||||
Dx: currPlayerDownsync.Dir.Dx,
|
||||
Dy: currPlayerDownsync.Dir.Dy,
|
||||
},
|
||||
Speed: currPlayerDownsync.Speed,
|
||||
BattleState: currPlayerDownsync.BattleState,
|
||||
Score: currPlayerDownsync.Score,
|
||||
Removed: currPlayerDownsync.Removed,
|
||||
JoinIndex: currPlayerDownsync.JoinIndex,
|
||||
Id: playerId,
|
||||
VirtualGridX: currPlayerDownsync.VirtualGridX,
|
||||
VirtualGridY: currPlayerDownsync.VirtualGridY,
|
||||
DirX: currPlayerDownsync.DirX,
|
||||
DirY: currPlayerDownsync.DirY,
|
||||
CharacterState: currPlayerDownsync.CharacterState,
|
||||
Speed: currPlayerDownsync.Speed,
|
||||
BattleState: currPlayerDownsync.BattleState,
|
||||
Score: currPlayerDownsync.Score,
|
||||
Removed: currPlayerDownsync.Removed,
|
||||
JoinIndex: currPlayerDownsync.JoinIndex,
|
||||
FramesToRecover: currPlayerDownsync.FramesToRecover - 1,
|
||||
Hp: currPlayerDownsync.Hp,
|
||||
MaxHp: currPlayerDownsync.MaxHp,
|
||||
}
|
||||
if nextRenderFramePlayers[playerId].FramesToRecover < 0 {
|
||||
nextRenderFramePlayers[playerId].FramesToRecover = 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1230,32 +1235,167 @@ func (pR *Room) applyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputF
|
||||
Id: currRenderFrame.Id + 1,
|
||||
Players: nextRenderFramePlayers,
|
||||
CountdownNanos: (pR.BattleDurationNanos - int64(currRenderFrame.Id)*pR.RollbackEstimatedDtNanos),
|
||||
MeleeBullets: make([]*MeleeBullet, 0), // Is there any better way to reduce malloc/free impact, e.g. smart prediction for fixed memory allocation?
|
||||
}
|
||||
|
||||
bulletPushbacks := make([]Vec2D, pR.Capacity) // Guaranteed determinism regardless of traversal order
|
||||
effPushbacks := make([]Vec2D, pR.Capacity) // Guaranteed determinism regardless of traversal order
|
||||
|
||||
// Reset playerCollider position from the "virtual grid position"
|
||||
for playerId, player := range pR.Players {
|
||||
joinIndex := player.JoinIndex
|
||||
bulletPushbacks[joinIndex-1].X, bulletPushbacks[joinIndex-1].Y = float64(0), float64(0)
|
||||
effPushbacks[joinIndex-1].X, effPushbacks[joinIndex-1].Y = float64(0), float64(0)
|
||||
currPlayerDownsync := currRenderFrame.Players[playerId]
|
||||
newVx, newVy := currPlayerDownsync.VirtualGridX, currPlayerDownsync.VirtualGridY
|
||||
collisionPlayerIndex := COLLISION_PLAYER_INDEX_PREFIX + joinIndex
|
||||
playerCollider := collisionSysMap[collisionPlayerIndex]
|
||||
playerCollider.X, playerCollider.Y = VirtualGridToPolygonColliderAnchorPos(newVx, newVy, player.ColliderRadius, player.ColliderRadius, pR.collisionSpaceOffsetX, pR.collisionSpaceOffsetY, pR.VirtualGridToWorldRatio)
|
||||
}
|
||||
|
||||
// Check bullet-anything collisions first, because the pushbacks caused by bullets might later be reverted by player-barrier collision
|
||||
bulletColliders := make(map[int32]*resolv.Object, 0) // Will all be removed at the end of `applyInputFrameDownsyncDynamicsOnSingleRenderFrame` due to the need for being rollback-compatible
|
||||
removedBulletsAtCurrFrame := make(map[int32]int32, 0)
|
||||
for _, meleeBullet := range currRenderFrame.MeleeBullets {
|
||||
if (meleeBullet.OriginatedRenderFrameId+meleeBullet.StartupFrames <= currRenderFrame.Id) && (meleeBullet.OriginatedRenderFrameId+meleeBullet.StartupFrames+meleeBullet.ActiveFrames > currRenderFrame.Id) {
|
||||
collisionBulletIndex := COLLISION_BULLET_INDEX_PREFIX + meleeBullet.BattleLocalId
|
||||
collisionOffenderIndex := COLLISION_PLAYER_INDEX_PREFIX + meleeBullet.OffenderJoinIndex
|
||||
offenderCollider := collisionSysMap[collisionOffenderIndex]
|
||||
offender := currRenderFrame.Players[meleeBullet.OffenderPlayerId]
|
||||
|
||||
xfac := float64(1.0) // By now, straight Punch offset doesn't respect "y-axis"
|
||||
if 0 > offender.DirX {
|
||||
xfac = float64(-1.0)
|
||||
}
|
||||
offenderWx, offenderWy := VirtualGridToWorldPos(offender.VirtualGridX, offender.VirtualGridY, pR.VirtualGridToWorldRatio)
|
||||
bulletWx, bulletWy := offenderWx+xfac*meleeBullet.HitboxOffset, offenderWy
|
||||
|
||||
newBulletCollider := GenerateRectCollider(bulletWx, bulletWy, meleeBullet.HitboxSize.X, meleeBullet.HitboxSize.Y, pR.collisionSpaceOffsetX, pR.collisionSpaceOffsetY, "MeleeBullet")
|
||||
newBulletCollider.Data = meleeBullet
|
||||
pR.Space.Add(newBulletCollider)
|
||||
collisionSysMap[collisionBulletIndex] = newBulletCollider
|
||||
bulletColliders[collisionBulletIndex] = newBulletCollider
|
||||
|
||||
Logger.Debug(fmt.Sprintf("roomId=%v, a meleeBullet is added to collisionSys at currRenderFrame.id=%v as start-up frames ended and active frame is not yet ended: %v, from offenderCollider=%v, xfac=%v", pR.Id, currRenderFrame.Id, ConvexPolygonStr(newBulletCollider.Shape.(*resolv.ConvexPolygon)), ConvexPolygonStr(offenderCollider.Shape.(*resolv.ConvexPolygon)), xfac))
|
||||
}
|
||||
}
|
||||
|
||||
for _, bulletCollider := range bulletColliders {
|
||||
shouldRemove := false
|
||||
meleeBullet := bulletCollider.Data.(*MeleeBullet)
|
||||
collisionBulletIndex := COLLISION_BULLET_INDEX_PREFIX + meleeBullet.BattleLocalId
|
||||
bulletShape := bulletCollider.Shape.(*resolv.ConvexPolygon)
|
||||
if collision := bulletCollider.Check(0, 0); collision != nil {
|
||||
offender := currRenderFrame.Players[meleeBullet.OffenderPlayerId]
|
||||
for _, obj := range collision.Objects {
|
||||
defenderShape := obj.Shape.(*resolv.ConvexPolygon)
|
||||
switch t := obj.Data.(type) {
|
||||
case *Player:
|
||||
if meleeBullet.OffenderPlayerId != t.Id {
|
||||
if overlapped, _, _, _ := CalcPushbacks(0, 0, bulletShape, defenderShape); overlapped {
|
||||
xfac := float64(1.0) // By now, straight Punch offset doesn't respect "y-axis"
|
||||
if 0 > offender.DirX {
|
||||
xfac = float64(-1.0)
|
||||
}
|
||||
bulletPushbacks[t.JoinIndex-1].X += xfac * meleeBullet.Pushback
|
||||
nextRenderFramePlayers[t.Id].CharacterState = ATK_CHARACTER_STATE_ATKED1
|
||||
oldFramesToRecover := nextRenderFramePlayers[t.Id].FramesToRecover
|
||||
if meleeBullet.HitStunFrames > oldFramesToRecover {
|
||||
nextRenderFramePlayers[t.Id].FramesToRecover = meleeBullet.HitStunFrames
|
||||
}
|
||||
Logger.Debug(fmt.Sprintf("roomId=%v, a meleeBullet collides w/ player at currRenderFrame.id=%v: b=%v, p=%v", pR.Id, currRenderFrame.Id, ConvexPolygonStr(bulletShape), ConvexPolygonStr(defenderShape)))
|
||||
}
|
||||
}
|
||||
default:
|
||||
Logger.Debug(fmt.Sprintf("Bullet %v collided with non-player %v: roomId=%v, currRenderFrame.Id=%v, delayedInputFrame.Id=%v, objDataType=%t, objData=%v", ConvexPolygonStr(bulletShape), ConvexPolygonStr(defenderShape), pR.Id, currRenderFrame.Id, delayedInputFrame.InputFrameId, obj.Data, obj.Data))
|
||||
}
|
||||
}
|
||||
shouldRemove = true
|
||||
}
|
||||
if shouldRemove {
|
||||
removedBulletsAtCurrFrame[collisionBulletIndex] = 1
|
||||
}
|
||||
}
|
||||
|
||||
for _, meleeBullet := range currRenderFrame.MeleeBullets {
|
||||
collisionBulletIndex := COLLISION_BULLET_INDEX_PREFIX + meleeBullet.BattleLocalId
|
||||
if bulletCollider, existent := collisionSysMap[collisionBulletIndex]; existent {
|
||||
bulletCollider.Space.Remove(bulletCollider)
|
||||
delete(collisionSysMap, collisionBulletIndex)
|
||||
}
|
||||
if _, existent := removedBulletsAtCurrFrame[collisionBulletIndex]; existent {
|
||||
continue
|
||||
}
|
||||
toRet.MeleeBullets = append(toRet.MeleeBullets, meleeBullet)
|
||||
}
|
||||
|
||||
if nil != delayedInputFrame {
|
||||
var delayedInputFrameForPrevRenderFrame *InputFrameDownsync = nil
|
||||
tmp := pR.InputsBuffer.GetByFrameId(pR.ConvertToInputFrameId(currRenderFrame.Id-1, pR.InputDelayFrames))
|
||||
if nil != tmp {
|
||||
delayedInputFrameForPrevRenderFrame = tmp.(*InputFrameDownsync)
|
||||
}
|
||||
inputList := delayedInputFrame.InputList
|
||||
effPushbacks := make([]Vec2D, pR.Capacity) // Guaranteed determinism regardless of traversal order
|
||||
// Process player inputs
|
||||
for playerId, player := range pR.Players {
|
||||
joinIndex := player.JoinIndex
|
||||
effPushbacks[joinIndex-1].X, effPushbacks[joinIndex-1].Y = float64(0), float64(0)
|
||||
currPlayerDownsync := currRenderFrame.Players[playerId]
|
||||
encodedInput := inputList[joinIndex-1]
|
||||
decodedInput := DIRECTION_DECODER[encodedInput]
|
||||
proposedVirtualGridDx, proposedVirtualGridDy := (decodedInput[0] + decodedInput[0]*currPlayerDownsync.Speed), (decodedInput[1] + decodedInput[1]*currPlayerDownsync.Speed)
|
||||
newVx, newVy := (currPlayerDownsync.VirtualGridX + proposedVirtualGridDx), (currPlayerDownsync.VirtualGridY + proposedVirtualGridDy)
|
||||
// Reset playerCollider position from the "virtual grid position"
|
||||
collisionPlayerIndex := COLLISION_PLAYER_INDEX_PREFIX + joinIndex
|
||||
playerCollider := collisionSysMap[collisionPlayerIndex]
|
||||
playerCollider.X, playerCollider.Y = VirtualGridToPolygonColliderAnchorPos(newVx, newVy, player.ColliderRadius, player.ColliderRadius, pR.collisionSpaceOffsetX, pR.collisionSpaceOffsetY, pR.VirtualGridToWorldRatio)
|
||||
thatPlayerInNextFrame := nextRenderFramePlayers[playerId]
|
||||
if 0 < thatPlayerInNextFrame.FramesToRecover {
|
||||
// No need to process inputs for this player, but there might be bullet pushbacks on this player
|
||||
// Also note that in this case we keep "CharacterState" of this player from last render frame
|
||||
playerCollider.X += bulletPushbacks[joinIndex-1].X
|
||||
playerCollider.Y += bulletPushbacks[joinIndex-1].Y
|
||||
// Update in the collision system
|
||||
playerCollider.Update()
|
||||
if 0 != bulletPushbacks[joinIndex-1].X || 0 != bulletPushbacks[joinIndex-1].Y {
|
||||
Logger.Info(fmt.Sprintf("roomId=%v, playerId=%v is pushed back by (%.2f, %.2f) by bullet impacts, now its framesToRecover is %d at currRenderFrame.id=%v", pR.Id, playerId, bulletPushbacks[joinIndex-1].X, bulletPushbacks[joinIndex-1].Y, thatPlayerInNextFrame.FramesToRecover, currRenderFrame.Id))
|
||||
}
|
||||
continue
|
||||
}
|
||||
currPlayerDownsync := currRenderFrame.Players[playerId]
|
||||
decodedInput := pR.decodeInput(inputList[joinIndex-1])
|
||||
prevBtnALevel := int32(0)
|
||||
if nil != delayedInputFrameForPrevRenderFrame {
|
||||
prevDecodedInput := pR.decodeInput(delayedInputFrameForPrevRenderFrame.InputList[joinIndex-1])
|
||||
prevBtnALevel = prevDecodedInput.BtnALevel
|
||||
}
|
||||
|
||||
if decodedInput.BtnALevel > prevBtnALevel {
|
||||
punchSkillId := int32(1)
|
||||
punchConfig := pR.MeleeSkillConfig[punchSkillId]
|
||||
var newMeleeBullet MeleeBullet = *punchConfig
|
||||
newMeleeBullet.BattleLocalId = pR.BulletBattleLocalIdCounter
|
||||
pR.BulletBattleLocalIdCounter += 1
|
||||
newMeleeBullet.OffenderJoinIndex = joinIndex
|
||||
newMeleeBullet.OffenderPlayerId = playerId
|
||||
newMeleeBullet.OriginatedRenderFrameId = currRenderFrame.Id
|
||||
toRet.MeleeBullets = append(toRet.MeleeBullets, &newMeleeBullet)
|
||||
thatPlayerInNextFrame.FramesToRecover = newMeleeBullet.RecoveryFrames
|
||||
thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_ATK1
|
||||
Logger.Info(fmt.Sprintf("roomId=%v, playerId=%v triggered a rising-edge of btnA at currRenderFrame.id=%v, delayedInputFrame.id=%v", pR.Id, playerId, currRenderFrame.Id, delayedInputFrame.InputFrameId))
|
||||
|
||||
} else if decodedInput.BtnALevel < prevBtnALevel {
|
||||
Logger.Debug(fmt.Sprintf("roomId=%v, playerId=%v triggered a falling-edge of btnA at currRenderFrame.id=%v, delayedInputFrame.id=%v", pR.Id, playerId, currRenderFrame.Id, delayedInputFrame.InputFrameId))
|
||||
} else {
|
||||
// No bullet trigger, process movement inputs
|
||||
// Note that by now "0 == thatPlayerInNextFrame.FramesToRecover", we should change "CharacterState" to "WALKING" or "IDLE" depending on player inputs
|
||||
if 0 != decodedInput.Dx || 0 != decodedInput.Dy {
|
||||
thatPlayerInNextFrame.DirX = decodedInput.Dx
|
||||
thatPlayerInNextFrame.DirY = decodedInput.Dy
|
||||
thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_WALKING
|
||||
} else {
|
||||
thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_IDLE1
|
||||
}
|
||||
}
|
||||
|
||||
movementX, movementY := VirtualGridToWorldPos(decodedInput.Dx+decodedInput.Dx*currPlayerDownsync.Speed, decodedInput.Dy+decodedInput.Dy*currPlayerDownsync.Speed, pR.VirtualGridToWorldRatio)
|
||||
playerCollider.X += movementX
|
||||
playerCollider.Y += movementY
|
||||
|
||||
// Update in the collision system
|
||||
playerCollider.Update()
|
||||
|
||||
if 0 < encodedInput {
|
||||
Logger.Debug(fmt.Sprintf("Checking collision for playerId=%v: virtual (%d, %d) -> (%d, %d), now playerShape=%v", playerId, currPlayerDownsync.VirtualGridX, currPlayerDownsync.VirtualGridY, newVx, newVy, ConvexPolygonStr(playerCollider.Shape.(*resolv.ConvexPolygon))))
|
||||
nextRenderFramePlayers[playerId].Dir.Dx = decodedInput[0]
|
||||
nextRenderFramePlayers[playerId].Dir.Dy = decodedInput[1]
|
||||
}
|
||||
}
|
||||
|
||||
// handle pushbacks upon collision after all movements treated as simultaneous
|
||||
@@ -1285,16 +1425,26 @@ func (pR *Room) applyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputF
|
||||
|
||||
// Update "virtual grid position"
|
||||
newVx, newVy := PolygonColliderAnchorToVirtualGridPos(playerCollider.X-effPushbacks[joinIndex-1].X, playerCollider.Y-effPushbacks[joinIndex-1].Y, player.ColliderRadius, player.ColliderRadius, pR.collisionSpaceOffsetX, pR.collisionSpaceOffsetY, pR.WorldToVirtualGridRatio)
|
||||
nextRenderFramePlayers[playerId].VirtualGridX = newVx
|
||||
nextRenderFramePlayers[playerId].VirtualGridY = newVy
|
||||
thatPlayerInNextFrame := nextRenderFramePlayers[playerId]
|
||||
thatPlayerInNextFrame.VirtualGridX, thatPlayerInNextFrame.VirtualGridY = newVx, newVy
|
||||
}
|
||||
|
||||
Logger.Debug(fmt.Sprintf("After applyInputFrameDownsyncDynamicsOnSingleRenderFrame: currRenderFrame.Id=%v, inputList=%v, currRenderFrame.Players=%v, nextRenderFramePlayers=%v, toRet.Players=%v", currRenderFrame.Id, inputList, currRenderFrame.Players, nextRenderFramePlayers, toRet.Players))
|
||||
Logger.Debug(fmt.Sprintf("After applyInputFrameDownsyncDynamicsOnSingleRenderFrame: currRenderFrame.Id=%v, inputList=%v, currRenderFrame.Players=%v, nextRenderFramePlayers=%v", currRenderFrame.Id, inputList, currRenderFrame.Players, nextRenderFramePlayers))
|
||||
}
|
||||
|
||||
return toRet
|
||||
}
|
||||
|
||||
func (pR *Room) decodeInput(encodedInput uint64) *InputFrameDecoded {
|
||||
encodedDirection := (encodedInput & uint64(15))
|
||||
btnALevel := int32((encodedInput >> 4) & 1)
|
||||
return &InputFrameDecoded{
|
||||
Dx: DIRECTION_DECODER[encodedDirection][0],
|
||||
Dy: DIRECTION_DECODER[encodedDirection][1],
|
||||
BtnALevel: btnALevel,
|
||||
}
|
||||
}
|
||||
|
||||
func (pR *Room) inputFrameIdDebuggable(inputFrameId int32) bool {
|
||||
return 0 == (inputFrameId % 10)
|
||||
}
|
||||
@@ -1302,12 +1452,14 @@ func (pR *Room) inputFrameIdDebuggable(inputFrameId int32) bool {
|
||||
func (pR *Room) refreshColliders(spaceW, spaceH int32) {
|
||||
// Kindly note that by now, we've already got all the shapes in the tmx file into "pR.(Players | Barriers)" from "ParseTmxLayersAndGroups"
|
||||
|
||||
minStep := (int(float64(pR.PlayerDefaultSpeed)*pR.VirtualGridToWorldRatio) << 2) // the approx minimum distance a player can move per frame in world coordinate
|
||||
space := resolv.NewSpace(int(spaceW), int(spaceH), minStep, minStep) // allocate a new collision space everytime after a battle is settled
|
||||
minStep := (int(float64(pR.PlayerDefaultSpeed)*pR.VirtualGridToWorldRatio) << 1) // the approx minimum distance a player can move per frame in world coordinate
|
||||
pR.Space = resolv.NewSpace(int(spaceW), int(spaceH), minStep, minStep) // allocate a new collision space everytime after a battle is settled
|
||||
for _, player := range pR.Players {
|
||||
wx, wy := VirtualGridToWorldPos(player.VirtualGridX, player.VirtualGridY, pR.VirtualGridToWorldRatio)
|
||||
playerCollider := GenerateRectCollider(wx, wy, player.ColliderRadius*2, player.ColliderRadius*2, pR.collisionSpaceOffsetX, pR.collisionSpaceOffsetY, "Player")
|
||||
space.Add(playerCollider)
|
||||
colliderWidth, colliderHeight := player.ColliderRadius*2, player.ColliderRadius*3
|
||||
playerCollider := GenerateRectCollider(wx, wy, colliderWidth, colliderHeight, pR.collisionSpaceOffsetX, pR.collisionSpaceOffsetY, "Player")
|
||||
playerCollider.Data = player
|
||||
pR.Space.Add(playerCollider)
|
||||
// Keep track of the collider in "pR.CollisionSysMap"
|
||||
joinIndex := player.JoinIndex
|
||||
pR.PlayersArr[joinIndex-1] = player
|
||||
@@ -1318,7 +1470,7 @@ func (pR *Room) refreshColliders(spaceW, spaceH int32) {
|
||||
for _, barrier := range pR.Barriers {
|
||||
boundaryUnaligned := barrier.Boundary
|
||||
barrierCollider := GenerateConvexPolygonCollider(boundaryUnaligned, pR.collisionSpaceOffsetX, pR.collisionSpaceOffsetY, "Barrier")
|
||||
space.Add(barrierCollider)
|
||||
pR.Space.Add(barrierCollider)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -5,6 +5,7 @@ import (
|
||||
. "dnmshared"
|
||||
"fmt"
|
||||
"go.uber.org/zap"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
@@ -21,11 +22,13 @@ var (
|
||||
|
||||
func (pPq *RoomHeap) PrintInOrder() {
|
||||
pq := *pPq
|
||||
fmt.Printf("The RoomHeap instance now contains:\n")
|
||||
s := make([]string, 0)
|
||||
s = append(s, fmt.Sprintf("The RoomHeap instance now contains:"))
|
||||
for i := 0; i < len(pq); i++ {
|
||||
fmt.Printf("{index: %d, roomID: %d, score: %.2f} ", i, pq[i].Id, pq[i].Score)
|
||||
s = append(s, fmt.Sprintf("{index: %d, roomID: %d, score: %.2f} ", i, pq[i].Id, pq[i].Score))
|
||||
}
|
||||
fmt.Printf("\n")
|
||||
|
||||
Logger.Debug(strings.Join(s, "\n"))
|
||||
}
|
||||
|
||||
func (pq RoomHeap) Len() int { return len(pq) }
|
||||
|
@@ -16,7 +16,6 @@ import (
|
||||
"time"
|
||||
|
||||
. "dnmshared"
|
||||
"runtime/debug"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -47,9 +46,8 @@ func Serve(c *gin.Context) {
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
Logger.Info("Finding PlayerLogin record for ws authentication:", zap.Any("intAuthToken", token))
|
||||
boundRoomId := 0
|
||||
expectRoomId := 0
|
||||
expectedRoomId := 0
|
||||
var err error
|
||||
if boundRoomIdStr, hasBoundRoomId := c.GetQuery("boundRoomId"); hasBoundRoomId {
|
||||
boundRoomId, err = strconv.Atoi(boundRoomIdStr)
|
||||
@@ -58,27 +56,28 @@ func Serve(c *gin.Context) {
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
Logger.Info("Finding PlayerLogin record for ws authentication:", zap.Any("intAuthToken", token), zap.Any("boundRoomId", boundRoomId))
|
||||
}
|
||||
if expectRoomIdStr, hasExpectRoomId := c.GetQuery("expectedRoomId"); hasExpectRoomId {
|
||||
expectRoomId, err = strconv.Atoi(expectRoomIdStr)
|
||||
Logger.Debug("Finding PlayerLogin record for ws authentication:", zap.Any("intAuthToken", token), zap.Any("boundRoomId", boundRoomId))
|
||||
} else if expectedRoomIdStr, hasExpectRoomId := c.GetQuery("expectedRoomId"); hasExpectRoomId {
|
||||
expectedRoomId, err = strconv.Atoi(expectedRoomIdStr)
|
||||
if err != nil {
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
Logger.Info("Finding PlayerLogin record for ws authentication:", zap.Any("intAuthToken", token), zap.Any("expectedRoomId", expectRoomId))
|
||||
Logger.Debug("Finding PlayerLogin record for ws authentication:", zap.Any("intAuthToken", token), zap.Any("expectedRoomId", expectedRoomId))
|
||||
} else {
|
||||
Logger.Debug("Finding PlayerLogin record for ws authentication:", zap.Any("intAuthToken", token))
|
||||
}
|
||||
|
||||
// TODO: Wrap the following 2 stmts by sql transaction!
|
||||
playerId, err := models.GetPlayerIdByToken(token)
|
||||
if err != nil || playerId == 0 {
|
||||
// TODO: Abort with specific message.
|
||||
Logger.Info("PlayerLogin record not found for ws authentication:", zap.Any("intAuthToken", token))
|
||||
Logger.Warn("PlayerLogin record not found for ws authentication:", zap.Any("intAuthToken", token))
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
Logger.Info("PlayerLogin record has been found for ws authentication:", zap.Any("playerId", playerId))
|
||||
Logger.Info("PlayerLogin record has been found for ws authentication:", zap.Any("playerId", playerId), zap.Any("intAuthToken", token), zap.Any("boundRoomId", boundRoomId), zap.Any("expectedRoomId", expectedRoomId))
|
||||
|
||||
conn, err := upgrader.Upgrade(c.Writer, c.Request, nil)
|
||||
if err != nil {
|
||||
@@ -160,14 +159,14 @@ func Serve(c *gin.Context) {
|
||||
signalToCloseConnOfThisPlayer(Constants.RetCode.PlayerNotFound, "")
|
||||
}
|
||||
|
||||
Logger.Info("Player has logged in and its profile is found from persistent storage:", zap.Any("playerId", playerId), zap.Any("play", pPlayer))
|
||||
Logger.Debug("Player has logged in and its profile is found from persistent storage:", zap.Any("playerId", playerId), zap.Any("player", pPlayer))
|
||||
|
||||
// Find a room to join.
|
||||
Logger.Info("About to acquire RoomHeapMux for player:", zap.Any("playerId", playerId))
|
||||
Logger.Debug("About to acquire RoomHeapMux for player:", zap.Any("playerId", playerId))
|
||||
(*(models.RoomHeapMux)).Lock()
|
||||
defer func() {
|
||||
(*(models.RoomHeapMux)).Unlock()
|
||||
Logger.Info("Released RoomHeapMux for player:", zap.Any("playerId", playerId))
|
||||
Logger.Debug("Released RoomHeapMux for player:", zap.Any("playerId", playerId))
|
||||
}()
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
@@ -175,13 +174,12 @@ func Serve(c *gin.Context) {
|
||||
signalToCloseConnOfThisPlayer(Constants.RetCode.UnknownError, "")
|
||||
}
|
||||
}()
|
||||
Logger.Info("Acquired RoomHeapMux for player:", zap.Any("playerId", playerId))
|
||||
Logger.Debug("Acquired RoomHeapMux for player:", zap.Any("playerId", playerId))
|
||||
// Logger.Info("The RoomHeapManagerIns has:", zap.Any("addr", fmt.Sprintf("%p", models.RoomHeapManagerIns)), zap.Any("size", len(*(models.RoomHeapManagerIns))))
|
||||
playerSuccessfullyAddedToRoom := false
|
||||
if 0 < boundRoomId {
|
||||
if tmpPRoom, existent := (*models.RoomMapManagerIns)[int32(boundRoomId)]; existent {
|
||||
pRoom = tmpPRoom
|
||||
Logger.Info("Successfully got:\n", zap.Any("roomId", pRoom.Id), zap.Any("playerId", playerId), zap.Any("forBoundRoomId", boundRoomId))
|
||||
res := pRoom.ReAddPlayerIfPossible(pPlayer, conn, signalToCloseConnOfThisPlayer)
|
||||
if !res {
|
||||
Logger.Warn("Failed to get:\n", zap.Any("roomId", pRoom.Id), zap.Any("playerId", playerId), zap.Any("forBoundRoomId", boundRoomId))
|
||||
@@ -189,19 +187,16 @@ func Serve(c *gin.Context) {
|
||||
playerSuccessfullyAddedToRoom = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if 0 < expectRoomId {
|
||||
if tmpRoom, existent := (*models.RoomMapManagerIns)[int32(expectRoomId)]; existent {
|
||||
} else if 0 < expectedRoomId {
|
||||
if tmpRoom, existent := (*models.RoomMapManagerIns)[int32(expectedRoomId)]; existent {
|
||||
pRoom = tmpRoom
|
||||
Logger.Info("Successfully got:\n", zap.Any("roomId", pRoom.Id), zap.Any("playerId", playerId), zap.Any("forExpectedRoomId", expectRoomId))
|
||||
|
||||
if pRoom.ReAddPlayerIfPossible(pPlayer, conn, signalToCloseConnOfThisPlayer) {
|
||||
playerSuccessfullyAddedToRoom = true
|
||||
} else if pRoom.AddPlayerIfPossible(pPlayer, conn, signalToCloseConnOfThisPlayer) {
|
||||
playerSuccessfullyAddedToRoom = true
|
||||
} else {
|
||||
Logger.Warn("Failed to get:\n", zap.Any("roomId", pRoom.Id), zap.Any("playerId", playerId), zap.Any("forExpectedRoomId", expectRoomId))
|
||||
Logger.Warn("Failed to get:\n", zap.Any("roomId", pRoom.Id), zap.Any("playerId", playerId), zap.Any("forExpectedRoomId", expectedRoomId))
|
||||
playerSuccessfullyAddedToRoom = false
|
||||
}
|
||||
|
||||
@@ -221,7 +216,7 @@ func Serve(c *gin.Context) {
|
||||
signalToCloseConnOfThisPlayer(Constants.RetCode.LocallyNoAvailableRoom, fmt.Sprintf("Cannot pop a (*Room) for playerId == %v!", playerId))
|
||||
} else {
|
||||
pRoom = tmpRoom
|
||||
Logger.Info("Successfully popped:\n", zap.Any("roomId", pRoom.Id), zap.Any("playerId", playerId))
|
||||
Logger.Info("Successfully popped:\n", zap.Any("roomId", pRoom.Id), zap.Any("forPlayerId", playerId))
|
||||
res := pRoom.AddPlayerIfPossible(pPlayer, conn, signalToCloseConnOfThisPlayer)
|
||||
if !res {
|
||||
signalToCloseConnOfThisPlayer(Constants.RetCode.PlayerNotAddableToRoom, fmt.Sprintf("AddPlayerIfPossible returns false for roomId == %v, playerId == %v!", pRoom.Id, playerId))
|
||||
@@ -247,8 +242,8 @@ func Serve(c *gin.Context) {
|
||||
bciFrame := &pb.BattleColliderInfo{
|
||||
BoundRoomId: pRoom.Id,
|
||||
StageName: pRoom.StageName,
|
||||
StrToVec2DListMap: pRoom.RawBattleStrToVec2DListMap,
|
||||
StrToPolygon2DListMap: pRoom.RawBattleStrToPolygon2DListMap,
|
||||
StrToVec2DListMap: pRoom.StrToVec2DListMap,
|
||||
StrToPolygon2DListMap: pRoom.StrToPolygon2DListMap,
|
||||
StageDiscreteW: pRoom.StageDiscreteW,
|
||||
StageDiscreteH: pRoom.StageDiscreteH,
|
||||
StageTileW: pRoom.StageTileW,
|
||||
@@ -269,6 +264,10 @@ func Serve(c *gin.Context) {
|
||||
|
||||
WorldToVirtualGridRatio: pRoom.WorldToVirtualGridRatio,
|
||||
VirtualGridToWorldRatio: pRoom.VirtualGridToWorldRatio,
|
||||
|
||||
SpAtkLookupFrames: pRoom.SpAtkLookupFrames,
|
||||
RenderCacheSize: pRoom.RenderCacheSize,
|
||||
MeleeSkillConfig: pRoom.MeleeSkillConfig,
|
||||
}
|
||||
|
||||
resp := &pb.WsResp{
|
||||
@@ -357,7 +356,7 @@ func Serve(c *gin.Context) {
|
||||
receivingLoopAgainstPlayer := func() error {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Logger.Error("Goroutine `receivingLoopAgainstPlayer`, recovery spot#1, recovered from: ", zap.Any("panic", r), zap.Any("callstack", debug.Stack()))
|
||||
Logger.Error("Goroutine `receivingLoopAgainstPlayer`, recovery spot#1, recovered from: ", zap.Any("panic", r))
|
||||
}
|
||||
Logger.Info("Goroutine `receivingLoopAgainstPlayer` is stopped for:", zap.Any("playerId", playerId), zap.Any("roomId", pRoom.Id))
|
||||
}()
|
||||
|
BIN
charts/AttackTriggerCases.jpg
Normal file
After Width: | Height: | Size: 176 KiB |
9
charts/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Double playback speed of a video
|
||||
```
|
||||
ffmpeg -i input.mp4 -filter:v "setpts=0.5*PTS" output.mp4
|
||||
```
|
||||
|
||||
# GIF creation cmd reference
|
||||
```
|
||||
ffmpeg -ss 12 -t 13 -i input.mp4 -vf "fps=10,scale=480:-1" -loop 0 output.gif
|
||||
```
|
BIN
charts/melee_attack_fractional_anim_resume_spedup.gif
Normal file
After Width: | Height: | Size: 5.7 MiB |
Before Width: | Height: | Size: 430 KiB |
@@ -4,6 +4,7 @@ go 1.19
|
||||
|
||||
require (
|
||||
dnmshared v0.0.0
|
||||
battle_srv v0.0.0
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
|
||||
github.com/hajimehoshi/ebiten/v2 v2.4.7
|
||||
github.com/solarlune/resolv v0.5.1
|
||||
@@ -26,3 +27,4 @@ require (
|
||||
)
|
||||
|
||||
replace dnmshared => ../dnmshared
|
||||
replace battle_srv => ../battle_srv
|
||||
|
@@ -85,8 +85,9 @@ type Game struct {
|
||||
|
||||
func NewGame() *Game {
|
||||
|
||||
stageName := "simple" // Use this for calibration
|
||||
// stageName := "simple" // Use this for calibration in isometric orientation
|
||||
// stageName := "richsoil"
|
||||
stageName := "dungeon"
|
||||
stageDiscreteW, stageDiscreteH, stageTileW, stageTileH, playerPosMap, barrierMap, err := parseStage(stageName)
|
||||
if nil != err {
|
||||
panic(err)
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
. "battle_srv/protos"
|
||||
. "dnmshared"
|
||||
. "dnmshared/sharedprotos"
|
||||
"fmt"
|
||||
@@ -56,7 +57,7 @@ func NewWorldColliderDisplay(game *Game, stageDiscreteW, stageDiscreteH, stageTi
|
||||
|
||||
world.Space = space
|
||||
|
||||
moveToCollide := true
|
||||
moveToCollide := false
|
||||
if moveToCollide {
|
||||
newVx, newVy := int32(-2959), int32(-2261)
|
||||
effPushback := Vec2D{X: float64(0), Y: float64(0)}
|
||||
@@ -84,6 +85,75 @@ func NewWorldColliderDisplay(game *Game, stageDiscreteW, stageDiscreteH, stageTi
|
||||
Logger.Info(fmt.Sprintf("effPushback={%v, %v}", effPushback.X, effPushback.Y))
|
||||
}
|
||||
}
|
||||
meleeBullet := &MeleeBullet{
|
||||
// for offender
|
||||
StartupFrames: int32(18),
|
||||
ActiveFrames: int32(1),
|
||||
RecoveryFrames: int32(61),
|
||||
RecoveryFramesOnBlock: int32(61),
|
||||
RecoveryFramesOnHit: int32(61),
|
||||
Moveforward: &Vec2D{
|
||||
X: 0,
|
||||
Y: 0,
|
||||
},
|
||||
HitboxOffset: float64(24.0),
|
||||
HitboxSize: &Vec2D{
|
||||
X: float64(45.0),
|
||||
Y: float64(32.0),
|
||||
},
|
||||
|
||||
// for defender
|
||||
HitStunFrames: int32(18),
|
||||
BlockStunFrames: int32(9),
|
||||
Pushback: float64(22.0),
|
||||
ReleaseTriggerType: int32(1), // 1: rising-edge, 2: falling-edge
|
||||
Damage: int32(5),
|
||||
}
|
||||
bulletLeftToRight := true
|
||||
if bulletLeftToRight {
|
||||
xfac := float64(1.0)
|
||||
offenderWx, offenderWy := playerPosList.Eles[0].X, playerPosList.Eles[0].Y
|
||||
bulletWx, bulletWy := offenderWx+xfac*meleeBullet.HitboxOffset, offenderWy
|
||||
|
||||
newBulletCollider := GenerateRectCollider(bulletWx, bulletWy, meleeBullet.HitboxSize.X, meleeBullet.HitboxSize.Y, spaceOffsetX, spaceOffsetY, "MeleeBullet")
|
||||
space.Add(newBulletCollider)
|
||||
bulletShape := newBulletCollider.Shape.(*resolv.ConvexPolygon)
|
||||
Logger.Warn(fmt.Sprintf("bullet ->: Added bullet collider to space: a=%v", ConvexPolygonStr(bulletShape)))
|
||||
|
||||
if collision := newBulletCollider.Check(0, 0); collision != nil {
|
||||
for _, obj := range collision.Objects {
|
||||
objShape := obj.Shape.(*resolv.ConvexPolygon)
|
||||
if overlapped, pushbackX, pushbackY, overlapResult := CalcPushbacks(0, 0, bulletShape, objShape); overlapped {
|
||||
Logger.Warn(fmt.Sprintf("bullet ->: Overlapped: a=%v, b=%v, pushbackX=%v, pushbackY=%v", ConvexPolygonStr(bulletShape), ConvexPolygonStr(objShape), pushbackX, pushbackY))
|
||||
} else {
|
||||
Logger.Warn(fmt.Sprintf("bullet ->: Collided BUT not overlapped: a=%v, b=%v, overlapResult=%v", ConvexPolygonStr(bulletShape), ConvexPolygonStr(objShape), overlapResult))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bulletRightToLeft := true
|
||||
if bulletRightToLeft {
|
||||
xfac := float64(-1.0)
|
||||
offenderWx, offenderWy := playerPosList.Eles[1].X, playerPosList.Eles[1].Y
|
||||
bulletWx, bulletWy := offenderWx+xfac*meleeBullet.HitboxOffset, offenderWy
|
||||
|
||||
newBulletCollider := GenerateRectCollider(bulletWx, bulletWy, meleeBullet.HitboxSize.X, meleeBullet.HitboxSize.Y, spaceOffsetX, spaceOffsetY, "MeleeBullet")
|
||||
space.Add(newBulletCollider)
|
||||
bulletShape := newBulletCollider.Shape.(*resolv.ConvexPolygon)
|
||||
Logger.Warn(fmt.Sprintf("bullet <-: Added bullet collider to space: a=%v", ConvexPolygonStr(bulletShape)))
|
||||
|
||||
if collision := newBulletCollider.Check(0, 0); collision != nil {
|
||||
for _, obj := range collision.Objects {
|
||||
objShape := obj.Shape.(*resolv.ConvexPolygon)
|
||||
if overlapped, pushbackX, pushbackY, overlapResult := CalcPushbacks(0, 0, bulletShape, objShape); overlapped {
|
||||
Logger.Warn(fmt.Sprintf("bullet <-: Overlapped: a=%v, b=%v, pushbackX=%v, pushbackY=%v", ConvexPolygonStr(bulletShape), ConvexPolygonStr(objShape), pushbackX, pushbackY))
|
||||
} else {
|
||||
Logger.Warn(fmt.Sprintf("bullet <-: Collided BUT not overlapped: a=%v, b=%v, overlapResult=%v", ConvexPolygonStr(bulletShape), ConvexPolygonStr(objShape), overlapResult))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return world
|
||||
}
|
||||
@@ -98,6 +168,9 @@ func (world *WorldColliderDisplay) Draw(screen *ebiten.Image) {
|
||||
if o.HasTags("Player") {
|
||||
drawColor := color.RGBA{0, 255, 0, 255}
|
||||
DrawPolygon(screen, o.Shape.(*resolv.ConvexPolygon), drawColor)
|
||||
} else if o.HasTags("MeleeBullet") {
|
||||
drawColor := color.RGBA{0, 0, 255, 255}
|
||||
DrawPolygon(screen, o.Shape.(*resolv.ConvexPolygon), drawColor)
|
||||
} else {
|
||||
drawColor := color.RGBA{60, 60, 60, 255}
|
||||
DrawPolygon(screen, o.Shape.(*resolv.ConvexPolygon), drawColor)
|
||||
|
@@ -20,6 +20,10 @@ func ConvexPolygonStr(body *resolv.ConvexPolygon) string {
|
||||
|
||||
func GenerateRectCollider(origX, origY, w, h, spaceOffsetX, spaceOffsetY float64, tag string) *resolv.Object {
|
||||
cx, cy := WorldToPolygonColliderAnchorPos(origX, origY, w*0.5, h*0.5, spaceOffsetX, spaceOffsetY)
|
||||
return GenerateRectColliderInCollisionSpace(cx, cy, w, h, tag)
|
||||
}
|
||||
|
||||
func GenerateRectColliderInCollisionSpace(cx, cy, w, h float64, tag string) *resolv.Object {
|
||||
collider := resolv.NewObject(cx, cy, w, h, tag)
|
||||
shape := resolv.NewRectangle(0, 0, w, h)
|
||||
collider.SetShape(shape)
|
||||
|
@@ -406,6 +406,12 @@ type TileRectilinearSize struct {
|
||||
}
|
||||
|
||||
func (pTmxMapIns *TmxMap) continuousObjLayerVecToContinuousMapNodeVec(continuousObjLayerVec *Vec2D) Vec2D {
|
||||
if "orthogonal" == pTmxMapIns.Orientation {
|
||||
return Vec2D{
|
||||
X: continuousObjLayerVec.X,
|
||||
Y: -continuousObjLayerVec.Y,
|
||||
}
|
||||
}
|
||||
var tileRectilinearSize TileRectilinearSize
|
||||
tileRectilinearSize.Width = float64(pTmxMapIns.TileWidth)
|
||||
tileRectilinearSize.Height = float64(pTmxMapIns.TileHeight)
|
||||
@@ -428,18 +434,24 @@ func (pTmxMapIns *TmxMap) continuousObjLayerVecToContinuousMapNodeVec(continuous
|
||||
}
|
||||
|
||||
func (pTmxMapIns *TmxMap) continuousObjLayerOffsetToContinuousMapNodePos(continuousObjLayerOffset *Vec2D) Vec2D {
|
||||
layerOffset := Vec2D{
|
||||
X: 0,
|
||||
Y: float64(pTmxMapIns.Height*pTmxMapIns.TileHeight) * 0.5,
|
||||
var layerOffset Vec2D
|
||||
if "orthogonal" == pTmxMapIns.Orientation {
|
||||
layerOffset = Vec2D{
|
||||
X: -float64(pTmxMapIns.Width*pTmxMapIns.TileWidth) * 0.5,
|
||||
Y: float64(pTmxMapIns.Height*pTmxMapIns.TileHeight) * 0.5,
|
||||
}
|
||||
} else {
|
||||
// "isometric" == pTmxMapIns.Orientation
|
||||
layerOffset = Vec2D{
|
||||
X: 0,
|
||||
Y: float64(pTmxMapIns.Height*pTmxMapIns.TileHeight) * 0.5,
|
||||
}
|
||||
}
|
||||
|
||||
calibratedVec := continuousObjLayerOffset
|
||||
convertedVec := pTmxMapIns.continuousObjLayerVecToContinuousMapNodeVec(calibratedVec)
|
||||
convertedVec := pTmxMapIns.continuousObjLayerVecToContinuousMapNodeVec(continuousObjLayerOffset)
|
||||
|
||||
toRet := Vec2D{
|
||||
return Vec2D{
|
||||
X: layerOffset.X + convertedVec.X,
|
||||
Y: layerOffset.Y + convertedVec.Y,
|
||||
}
|
||||
|
||||
return toRet
|
||||
}
|
||||
|
BIN
dragonBonesProjects/SoldierElf.dbproj
Normal file
BIN
dragonBonesProjects/SoldierFireGhost.dbproj
Normal file
BIN
dragonBonesProjects/SoldierWaterGhost.dbproj
Normal file
1
dragonBonesProjects/library/SoldierElf.json
Normal file
@@ -0,0 +1 @@
|
||||
{"width":128,"imagePath":"SoldierElf_tex.png","height":128,"name":"SoldierElf","SubTexture":[{"frameHeight":45,"y":1,"frameX":0,"width":34,"frameY":0,"height":44,"name":"cape","frameWidth":34,"x":70},{"width":10,"y":107,"height":14,"name":"shouder_l","x":74},{"width":11,"y":107,"height":14,"name":"forearm_l","x":61},{"width":15,"y":93,"height":16,"name":"hand_l","x":1},{"width":30,"y":61,"height":30,"name":"weapon_hand_l","x":1},{"width":8,"y":101,"height":11,"name":"thigh_l","x":86},{"width":12,"y":93,"height":17,"name":"calf_l","x":18},{"width":20,"y":113,"height":8,"name":"foot_l","x":39},{"width":28,"y":61,"height":31,"name":"pelvis","x":33},{"width":8,"y":88,"height":11,"name":"thigh_r","x":77},{"width":12,"y":88,"height":17,"name":"calf_r","x":63},{"width":20,"y":113,"height":8,"name":"foot_r","x":17},{"width":13,"y":94,"height":12,"name":"shouder_r","x":45},{"width":67,"y":1,"height":58,"name":"chest","x":1},{"width":11,"y":94,"height":17,"name":"forearm_r","x":32},{"width":14,"y":111,"height":13,"name":"hand_r","x":1},{"frameHeight":39,"y":47,"frameX":-2,"width":34,"frameY":0,"height":39,"name":"we_bl_4_f_1","frameWidth":36,"x":70}]}
|
BIN
dragonBonesProjects/library/SoldierElf.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
1
dragonBonesProjects/library/SoldierFireGhost.json
Normal file
@@ -0,0 +1 @@
|
||||
{"imagePath":"Soldier_02_tex.png","width":128,"name":"Soldier_02","SubTexture":[{"x":53,"y":44,"width":23,"name":"biu","height":22},{"x":76,"y":68,"width":9,"name":"rightArm","height":14},{"y":35,"frameY":0,"height":32,"frameWidth":29,"frameX":-1,"frameHeight":32,"width":27,"name":"yinmoqe00","x":89},{"x":53,"y":1,"width":34,"name":"body","height":41},{"x":78,"y":44,"width":9,"name":"rightShoulder","height":13},{"y":50,"frameY":0,"height":18,"frameWidth":19,"frameX":0,"frameHeight":18,"width":19,"name":"rightFrontArm","x":23},{"x":23,"y":70,"width":14,"name":"rightHand","height":14},{"y":68,"frameY":0,"height":12,"frameWidth":12,"frameX":0,"frameHeight":12,"width":12,"name":"leftArm","x":62},{"x":1,"y":73,"width":13,"name":"leftShoulder","height":12},{"x":1,"y":50,"width":20,"name":"leftFrontArm","height":21},{"x":89,"y":1,"width":33,"name":"head","height":32},{"x":1,"y":1,"width":50,"name":"head2","height":47},{"x":44,"y":68,"width":16,"name":"leftHand","height":14},{"y":59,"frameY":-2,"height":4,"frameWidth":8,"frameX":-1,"frameHeight":8,"width":4,"name":"huomiao01","x":78}],"height":128}
|
BIN
dragonBonesProjects/library/SoldierFireGhost.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
1
dragonBonesProjects/library/SoldierWaterGhost.json
Normal file
@@ -0,0 +1 @@
|
||||
{"width":128,"SubTexture":[{"frameWidth":23,"y":50,"frameX":-2,"frameHeight":22,"frameY":-2,"width":19,"height":19,"name":"biu","x":1},{"width":9,"y":50,"height":14,"name":"rightArm","x":42},{"frameWidth":29,"y":34,"frameX":-6,"frameHeight":32,"frameY":0,"width":20,"height":32,"name":"yinmoqe00","x":88},{"frameWidth":34,"y":1,"frameX":0,"frameHeight":41,"frameY":0,"width":33,"height":39,"name":"body","x":53},{"width":9,"y":56,"height":13,"name":"rightShoulder","x":74},{"frameWidth":19,"y":50,"frameX":0,"frameHeight":18,"frameY":0,"width":18,"height":17,"name":"rightFrontArm","x":22},{"width":14,"y":50,"height":14,"name":"rightHand","x":110},{"width":12,"y":42,"height":12,"name":"leftArm","x":74},{"width":13,"y":66,"height":12,"name":"leftShoulder","x":110},{"frameWidth":20,"y":42,"frameX":-1,"frameHeight":21,"frameY":0,"width":19,"height":21,"name":"leftFrontArm","x":53},{"width":50,"y":1,"height":47,"name":"head2","x":1},{"frameWidth":33,"y":1,"frameX":-1,"frameHeight":32,"frameY":0,"width":32,"height":31,"name":"head","x":88},{"width":16,"y":34,"height":14,"name":"leftHand","x":110},{"frameWidth":8,"y":1,"frameX":-2,"frameHeight":8,"frameY":-3,"width":2,"height":2,"name":"huomiao01","x":122}],"height":128,"name":"SoldierWaterGhost","imagePath":"SoldierWaterGhost_tex.png"}
|
BIN
dragonBonesProjects/library/SoldierWaterGhost.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Bottom",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "783f1240-d608-40be-8108-3013ab53cfe6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "393e649b-addb-4f91-b687-438433026c8d"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "115ea7bb-d47f-4d3c-a52a-f46584346c3f",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "BottomLeft",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "748c55f0-e761-40f6-b13b-e416b3d8a55c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "6164bac7-9882-43ce-b3d0-9d062d6d0b49"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "a1bf7c7c-b9f7-4b65-86e3-f86a9e798fb6",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "BottomRight",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "34cf9fbb-8def-4faf-a56e-123b4c45706c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "b6709dd6-6ba7-4222-af38-de79ac80ce8b"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "d5af527a-9f0c-4398-b2dd-84426be7bd32",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Left",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "02cd24e3-1c4a-46d7-85af-9034c9445ba7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "1f121837-a493-4a41-90e5-74ea560930ad"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "b60618d7-569d-4f13-bdeb-f20341fbadb6",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Right",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "a6ec6a1c-dde5-459d-84f9-7b2b8a163e7b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "b5d11244-f30a-4b0d-b67b-23648d253d44"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "0b3fb38e-9110-4191-9b72-6b64a224d049",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Top",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "8967d249-e9cf-4e44-85e8-6b9377129d9e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "492a57fb-6a5c-423a-bcfe-0695a7828881"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "1bc6de53-800b-4da3-ab8e-4a45e3aa4230",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "TopLeft",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "96187689-85df-46e8-b4db-410eae03c135"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "6b002583-7688-43d3-b3fa-102ae0046628"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "ee0d670c-893e-4e4d-96dd-5571db18ee97",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "TopRight",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "ba89046f-8b70-4edb-9f61-534dff476325"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "bc1ef316-d6ad-4538-b223-a0fed8094609"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "596df84a-2e4e-4f1d-967c-a82649f564a8",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "attackedLeft",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.3333333333333333,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "02cd24e3-1c4a-46d7-85af-9034c9445ba7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "8c522ad3-ee82-41a7-892e-05c05442e2e3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "1f121837-a493-4a41-90e5-74ea560930ad"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "1c0ec5ec-51cb-467d-b597-8e69ce580cfd"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "8acc4e9f-3c47-4b66-9a9d-d012709680f6",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "attackedRight",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.3333333333333333,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "a6ec6a1c-dde5-459d-84f9-7b2b8a163e7b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "d5ec0aaf-d4a9-4b2e-b9c1-bdc54b355b73"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "b5d11244-f30a-4b0d-b67b-23648d253d44"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "360dfc7d-4ed1-4fb9-8d2f-7533d05a4830"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "c7cda0cd-dbce-4722-abd2-aeca28263a21",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Bottom",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "c79694bc-ff6f-416b-9047-b82f41fe791a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "609c77a2-bdfe-4967-8de6-646532302c97"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "28194c48-ae3b-4197-8263-0d474ae8b9bc",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "BottomLeft",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "07b6d385-3f51-48c1-8165-38756b3d84fa"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "c627bf3b-0e97-4423-aeea-54c7511894d6"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "e1c45a36-2022-4b18-a2db-b5e2e0a120ed",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "BottomRight",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "d0327836-1910-4c6a-9291-c8bb044c54f5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "1d3e614a-bb2a-4b1d-87ca-0cddd6e03fff"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "126dff26-0ace-439d-89b5-b888aa52d159",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Left",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "c9528117-c878-41aa-ad5d-641fefcaa89f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "c0e5d042-8bc1-449b-9a2d-7844129c5188"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "95c2d541-8f99-446a-a7e0-094130ce6d41",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Right",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "1054cf4c-69a5-4834-8966-03bc613d4483"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "b88522bd-8b6b-44a1-9c84-5518ae7f5c2c"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "380f5fa0-f77f-434a-8f39-d545ee6823c5",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Top",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "9702ca76-66c8-4ea9-a976-45f86e15830a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "6390f1c3-b4cc-41df-acfb-645e8f90fb36"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "a306c6de-ccd8-492b-bfec-c6be0a4cbde2",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "TopLeft",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "a669112a-f263-443d-9757-60d0372e0fe8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "3ed70f56-3b60-4bda-9d2a-8d4b5ecb12f9"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "f496072b-51fd-4406-abbd-9885ac23f7a9",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "TopRight",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "3d84f335-85c4-4dd0-a5d3-38f4da1e1611"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "6d36877f-dc27-4ebc-9407-14fbcf2314df"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "6405ad8b-3084-4b67-8c2e-9b4d34fa3d09",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "attackedLeft",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.3333333333333333,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "c9528117-c878-41aa-ad5d-641fefcaa89f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "987c7dc0-e81f-4891-979d-0998794e6889"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "c0e5d042-8bc1-449b-9a2d-7844129c5188"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "9205c378-c50c-4303-af32-dbf9422375cf"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "af16cdcb-6e82-4be6-806d-9fc52ae99fff",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "attackedRight",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.3333333333333333,
|
||||
"sample": 12,
|
||||
"speed": 1,
|
||||
"wrapMode": "2",
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "1054cf4c-69a5-4834-8966-03bc613d4483"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "8f3cf81e-1251-4013-b684-13f2830c7425"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "b88522bd-8b6b-44a1-9c84-5518ae7f5c2c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "69f1bd37-6628-4fd1-b0f2-08073d1edb29"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "02eba566-4d22-4fa7-99d7-f032f5845421",
|
||||
"subMetas": {}
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "135f388e-7e75-4ece-b267-4e07835cba74",
|
||||
"uuid": "8f2f76c7-649c-414a-80be-b2daef4ed580",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
@@ -0,0 +1 @@
|
||||
{"imagePath":"SoldierWaterGhost_tex.png","width":64,"height":64,"name":"SoldierWaterGhost","SubTexture":[{"frameY":-1,"y":27,"frameWidth":12,"frameHeight":11,"width":10,"height":10,"name":"biu","frameX":-1,"x":1},{"width":5,"y":23,"height":7,"name":"rightArm","x":40},{"frameY":0,"y":19,"frameWidth":15,"frameHeight":16,"width":10,"height":16,"name":"yinmoqe00","frameX":-3,"x":47},{"frameY":0,"y":1,"frameWidth":17,"frameHeight":21,"width":17,"height":20,"name":"body","frameX":0,"x":28},{"width":5,"y":37,"height":7,"name":"rightShoulder","x":42},{"frameY":0,"y":27,"frameWidth":10,"frameHeight":9,"width":9,"height":9,"name":"rightFrontArm","frameX":0,"x":13},{"width":7,"y":38,"height":7,"name":"rightHand","x":13},{"width":6,"y":36,"height":6,"name":"leftArm","x":34},{"width":7,"y":39,"height":6,"name":"leftShoulder","x":1},{"frameY":0,"y":23,"frameWidth":10,"frameHeight":11,"width":10,"height":11,"name":"leftFrontArm","frameX":-1,"x":28},{"width":25,"y":1,"height":24,"name":"head2","x":1},{"frameY":0,"y":1,"frameWidth":17,"frameHeight":16,"width":16,"height":16,"name":"head","frameX":-1,"x":47},{"width":8,"y":36,"height":7,"name":"leftHand","x":24},{"frameY":-2,"y":32,"frameWidth":4,"frameHeight":4,"width":1,"height":1,"name":"huomiao01","frameX":-1,"x":42}]}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.0",
|
||||
"uuid": "e9e703e9-3589-4713-b889-28b23406d220",
|
||||
"atlasJson": "{\"imagePath\":\"SoldierWaterGhost_tex.png\",\"width\":64,\"height\":64,\"name\":\"SoldierWaterGhost\",\"SubTexture\":[{\"frameY\":-1,\"y\":27,\"frameWidth\":12,\"frameHeight\":11,\"width\":10,\"height\":10,\"name\":\"biu\",\"frameX\":-1,\"x\":1},{\"width\":5,\"y\":23,\"height\":7,\"name\":\"rightArm\",\"x\":40},{\"frameY\":0,\"y\":19,\"frameWidth\":15,\"frameHeight\":16,\"width\":10,\"height\":16,\"name\":\"yinmoqe00\",\"frameX\":-3,\"x\":47},{\"frameY\":0,\"y\":1,\"frameWidth\":17,\"frameHeight\":21,\"width\":17,\"height\":20,\"name\":\"body\",\"frameX\":0,\"x\":28},{\"width\":5,\"y\":37,\"height\":7,\"name\":\"rightShoulder\",\"x\":42},{\"frameY\":0,\"y\":27,\"frameWidth\":10,\"frameHeight\":9,\"width\":9,\"height\":9,\"name\":\"rightFrontArm\",\"frameX\":0,\"x\":13},{\"width\":7,\"y\":38,\"height\":7,\"name\":\"rightHand\",\"x\":13},{\"width\":6,\"y\":36,\"height\":6,\"name\":\"leftArm\",\"x\":34},{\"width\":7,\"y\":39,\"height\":6,\"name\":\"leftShoulder\",\"x\":1},{\"frameY\":0,\"y\":23,\"frameWidth\":10,\"frameHeight\":11,\"width\":10,\"height\":11,\"name\":\"leftFrontArm\",\"frameX\":-1,\"x\":28},{\"width\":25,\"y\":1,\"height\":24,\"name\":\"head2\",\"x\":1},{\"frameY\":0,\"y\":1,\"frameWidth\":17,\"frameHeight\":16,\"width\":16,\"height\":16,\"name\":\"head\",\"frameX\":-1,\"x\":47},{\"width\":8,\"y\":36,\"height\":7,\"name\":\"leftHand\",\"x\":24},{\"frameY\":-2,\"y\":32,\"frameWidth\":4,\"frameHeight\":4,\"width\":1,\"height\":1,\"name\":\"huomiao01\",\"frameX\":-1,\"x\":42}]}",
|
||||
"texture": "def168c3-3f07-43f9-a460-36b397c70a57",
|
||||
"subMetas": {}
|
||||
}
|
After Width: | Height: | Size: 4.6 KiB |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ver": "2.3.3",
|
||||
"uuid": "c30bd4d7-efdc-410c-8bdf-4a3dfc77bebd",
|
||||
"uuid": "def168c3-3f07-43f9-a460-36b397c70a57",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
@@ -9,21 +9,21 @@
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"Tile_W300_H300_S01": {
|
||||
"SoldierWaterGhost_tex": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "66b49304-7b5b-442c-92a5-d2b368abf659",
|
||||
"rawTextureUuid": "c30bd4d7-efdc-410c-8bdf-4a3dfc77bebd",
|
||||
"uuid": "52fb0606-bbea-433c-803b-bf5ce936a0df",
|
||||
"rawTextureUuid": "def168c3-3f07-43f9-a460-36b397c70a57",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 4,
|
||||
"offsetY": -24.5,
|
||||
"trimX": 97,
|
||||
"trimY": 85,
|
||||
"width": 114,
|
||||
"height": 179,
|
||||
"rawWidth": 300,
|
||||
"rawHeight": 300,
|
||||
"offsetX": 0,
|
||||
"offsetY": 9,
|
||||
"trimX": 1,
|
||||
"trimY": 1,
|
||||
"width": 62,
|
||||
"height": 44,
|
||||
"rawWidth": 64,
|
||||
"rawHeight": 64,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "0e243c83-a137-4880-9bfe-9e1b57adc453",
|
||||
"uuid": "2202f4f4-b792-4dea-8302-633315aded66",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
@@ -0,0 +1 @@
|
||||
{"width":128,"SubTexture":[{"frameWidth":34,"y":1,"frameHeight":45,"width":34,"frameX":0,"height":44,"name":"cape","frameY":0,"x":70},{"width":10,"y":107,"height":14,"name":"shouder_l","x":74},{"width":11,"y":107,"height":14,"name":"forearm_l","x":61},{"width":15,"y":93,"height":16,"name":"hand_l","x":1},{"width":30,"y":61,"height":30,"name":"weapon_hand_l","x":1},{"width":8,"y":88,"height":11,"name":"thigh_l","x":77},{"width":12,"y":93,"height":17,"name":"calf_l","x":18},{"width":20,"y":113,"height":8,"name":"foot_l","x":39},{"width":28,"y":61,"height":31,"name":"pelvis","x":33},{"width":8,"y":101,"height":11,"name":"thigh_r","x":86},{"width":12,"y":88,"height":17,"name":"calf_r","x":63},{"width":20,"y":113,"height":8,"name":"foot_r","x":17},{"width":13,"y":94,"height":12,"name":"shouder_r","x":45},{"width":67,"y":1,"height":58,"name":"chest","x":1},{"width":11,"y":94,"height":17,"name":"forearm_r","x":32},{"width":14,"y":111,"height":13,"name":"hand_r","x":1},{"frameWidth":36,"y":47,"frameHeight":39,"width":34,"frameX":-2,"height":39,"name":"we_bl_4_f_1","frameY":0,"x":70}],"height":128,"name":"SoldierElf","imagePath":"SoldierElf_tex.png"}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.0",
|
||||
"uuid": "24d7bb8f-577c-4e5d-b730-56613ca8685d",
|
||||
"atlasJson": "{\"width\":128,\"SubTexture\":[{\"frameWidth\":34,\"y\":1,\"frameHeight\":45,\"width\":34,\"frameX\":0,\"height\":44,\"name\":\"cape\",\"frameY\":0,\"x\":70},{\"width\":10,\"y\":107,\"height\":14,\"name\":\"shouder_l\",\"x\":74},{\"width\":11,\"y\":107,\"height\":14,\"name\":\"forearm_l\",\"x\":61},{\"width\":15,\"y\":93,\"height\":16,\"name\":\"hand_l\",\"x\":1},{\"width\":30,\"y\":61,\"height\":30,\"name\":\"weapon_hand_l\",\"x\":1},{\"width\":8,\"y\":88,\"height\":11,\"name\":\"thigh_l\",\"x\":77},{\"width\":12,\"y\":93,\"height\":17,\"name\":\"calf_l\",\"x\":18},{\"width\":20,\"y\":113,\"height\":8,\"name\":\"foot_l\",\"x\":39},{\"width\":28,\"y\":61,\"height\":31,\"name\":\"pelvis\",\"x\":33},{\"width\":8,\"y\":101,\"height\":11,\"name\":\"thigh_r\",\"x\":86},{\"width\":12,\"y\":88,\"height\":17,\"name\":\"calf_r\",\"x\":63},{\"width\":20,\"y\":113,\"height\":8,\"name\":\"foot_r\",\"x\":17},{\"width\":13,\"y\":94,\"height\":12,\"name\":\"shouder_r\",\"x\":45},{\"width\":67,\"y\":1,\"height\":58,\"name\":\"chest\",\"x\":1},{\"width\":11,\"y\":94,\"height\":17,\"name\":\"forearm_r\",\"x\":32},{\"width\":14,\"y\":111,\"height\":13,\"name\":\"hand_r\",\"x\":1},{\"frameWidth\":36,\"y\":47,\"frameHeight\":39,\"width\":34,\"frameX\":-2,\"height\":39,\"name\":\"we_bl_4_f_1\",\"frameY\":0,\"x\":70}],\"height\":128,\"name\":\"SoldierElf\",\"imagePath\":\"SoldierElf_tex.png\"}",
|
||||
"texture": "050fb016-1a1f-4341-8367-283bfeddc4a8",
|
||||
"subMetas": {}
|
||||
}
|
After Width: | Height: | Size: 7.1 KiB |
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"ver": "2.3.3",
|
||||
"uuid": "050fb016-1a1f-4341-8367-283bfeddc4a8",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"SoldierElf_tex": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "c62e1779-f92b-40d3-bf4f-7ab747e33d6e",
|
||||
"rawTextureUuid": "050fb016-1a1f-4341-8367-283bfeddc4a8",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": -11.5,
|
||||
"offsetY": 1.5,
|
||||
"trimX": 1,
|
||||
"trimY": 1,
|
||||
"width": 103,
|
||||
"height": 123,
|
||||
"rawWidth": 128,
|
||||
"rawHeight": 128,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "51c54820-d753-4be8-a855-5760eed8f7ef",
|
||||
"uuid": "f1176719-d1d6-4af5-89c6-ddff16ab85fd",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
@@ -0,0 +1 @@
|
||||
{"width":64,"imagePath":"SoldierFireGhost_tex.png","SubTexture":[{"frameWidth":12,"y":42,"frameHeight":11,"width":11,"frameX":-1,"height":11,"name":"biu","frameY":0,"x":16},{"width":5,"y":42,"height":7,"name":"rightArm","x":29},{"frameWidth":15,"y":27,"frameHeight":16,"width":13,"frameX":-1,"height":16,"name":"yinmoqe00","frameY":0,"x":1},{"width":17,"y":1,"height":21,"name":"body","x":28},{"width":5,"y":42,"height":7,"name":"rightShoulder","x":36},{"width":10,"y":45,"height":9,"name":"rightFrontArm","x":1},{"width":7,"y":56,"height":7,"name":"rightHand","x":1},{"width":6,"y":55,"height":6,"name":"leftArm","x":32},{"width":7,"y":55,"height":6,"name":"leftShoulder","x":23},{"width":10,"y":27,"height":11,"name":"leftFrontArm","x":16},{"width":17,"y":24,"height":16,"name":"head","x":28},{"width":25,"y":1,"height":24,"name":"head2","x":1},{"width":8,"y":55,"height":7,"name":"leftHand","x":13},{"frameWidth":4,"y":51,"frameHeight":4,"width":2,"frameX":-1,"height":2,"name":"huomiao01","frameY":-1,"x":29}],"height":64,"name":"SoldierFireGhost"}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.0",
|
||||
"uuid": "4a9187d5-a9ad-4464-a03c-d2f3cc277051",
|
||||
"atlasJson": "{\"width\":64,\"imagePath\":\"SoldierFireGhost_tex.png\",\"SubTexture\":[{\"frameWidth\":12,\"y\":42,\"frameHeight\":11,\"width\":11,\"frameX\":-1,\"height\":11,\"name\":\"biu\",\"frameY\":0,\"x\":16},{\"width\":5,\"y\":42,\"height\":7,\"name\":\"rightArm\",\"x\":29},{\"frameWidth\":15,\"y\":27,\"frameHeight\":16,\"width\":13,\"frameX\":-1,\"height\":16,\"name\":\"yinmoqe00\",\"frameY\":0,\"x\":1},{\"width\":17,\"y\":1,\"height\":21,\"name\":\"body\",\"x\":28},{\"width\":5,\"y\":42,\"height\":7,\"name\":\"rightShoulder\",\"x\":36},{\"width\":10,\"y\":45,\"height\":9,\"name\":\"rightFrontArm\",\"x\":1},{\"width\":7,\"y\":56,\"height\":7,\"name\":\"rightHand\",\"x\":1},{\"width\":6,\"y\":55,\"height\":6,\"name\":\"leftArm\",\"x\":32},{\"width\":7,\"y\":55,\"height\":6,\"name\":\"leftShoulder\",\"x\":23},{\"width\":10,\"y\":27,\"height\":11,\"name\":\"leftFrontArm\",\"x\":16},{\"width\":17,\"y\":24,\"height\":16,\"name\":\"head\",\"x\":28},{\"width\":25,\"y\":1,\"height\":24,\"name\":\"head2\",\"x\":1},{\"width\":8,\"y\":55,\"height\":7,\"name\":\"leftHand\",\"x\":13},{\"frameWidth\":4,\"y\":51,\"frameHeight\":4,\"width\":2,\"frameX\":-1,\"height\":2,\"name\":\"huomiao01\",\"frameY\":-1,\"x\":29}],\"height\":64,\"name\":\"SoldierFireGhost\"}",
|
||||
"texture": "700d963b-2192-4219-a066-8be5b3db7453",
|
||||
"subMetas": {}
|
||||
}
|
After Width: | Height: | Size: 5.3 KiB |
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"ver": "2.3.3",
|
||||
"uuid": "700d963b-2192-4219-a066-8be5b3db7453",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"SoldierFireGhost_tex": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "8ef8a6b3-0bac-4cf1-bba0-ab090f4d9e52",
|
||||
"rawTextureUuid": "700d963b-2192-4219-a066-8be5b3db7453",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": -9,
|
||||
"offsetY": 0,
|
||||
"trimX": 1,
|
||||
"trimY": 1,
|
||||
"width": 44,
|
||||
"height": 62,
|
||||
"rawWidth": 64,
|
||||
"rawHeight": 64,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "3b7d864f-c9fd-4030-a6dc-9814ee12fec1",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
@@ -0,0 +1,229 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Atk1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5833333333333334,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "7fedc57f-6998-45fc-899d-ea5edd41ab13"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "d55c2f3c-9110-4627-b8b2-0f9395f0d145"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "1228879d-d28e-48e4-a3ce-5ceda0d1831f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "e88dd5c4-cc5d-46e0-88de-e382e2bcadd7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "df069f5c-7fc0-4731-bb7f-9d2032498e4c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "4815763d-64e1-4b15-b795-38900861c651"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "0dca4f06-bf25-4e7f-ac3a-1687e284f5d6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "de8db3c9-affd-45ef-a536-e2d28ebc8094"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "baaafb8b-9c1a-45ea-ba80-eb8048b61b57"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "9ffa7db6-1aec-4a1e-a8a9-118f2a6e50dc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "f2f296ad-0e19-4b00-b061-8c9edff98d0d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "3e546607-d27f-40fa-9967-771c55a12590"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "fece0129-e8ae-45be-b963-e2b821add0d3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "f5f48bec-3d2a-49de-9416-26cc75d34e32"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "b083cfc9-a439-4600-b336-b50ca08b68c4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "d04003f5-16c1-4510-898b-9148b76eb958"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "2159f038-bffa-480c-a2bd-c305868f2fd9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "1d3de292-7dd4-4e28-b1d2-23fc38318390"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3,
|
||||
"value": {
|
||||
"__uuid__": "3031ca7c-e1f7-4d14-b29e-5a7102cab245"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "987e9d14-b6fc-46c7-93ed-8914e42bfa8b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "327db66e-2136-4d52-9727-399d60715a86"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.35,
|
||||
"value": {
|
||||
"__uuid__": "82ab2dcd-22e9-490f-96c4-4786018c91d0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.36666666666666664,
|
||||
"value": {
|
||||
"__uuid__": "36812959-85a6-40fb-9a38-1b4d871eba92"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.38333333333333336,
|
||||
"value": {
|
||||
"__uuid__": "2941d74c-7b9c-43dc-a5c4-45952220d9a2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4,
|
||||
"value": {
|
||||
"__uuid__": "4aed2032-25d5-42fd-983a-4473e2985a99"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "3db216c1-3362-4404-8db6-11615bfa6e64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.43333333333333335,
|
||||
"value": {
|
||||
"__uuid__": "2cf0cb17-cbb0-4d64-9c91-83639a363158"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.45,
|
||||
"value": {
|
||||
"__uuid__": "9c057e2c-1dc4-4c6c-adb7-85bf691cefb5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "49c07a7f-2ace-4e2b-ba4c-724aad12ec5c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "cec3c067-c958-4988-b113-2f10d7f4f5ea"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5,
|
||||
"value": {
|
||||
"__uuid__": "ad57f789-a25a-411c-b130-62a8ab16177f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "3c2a21a5-7c85-48f3-95ff-0d7a32e5e852"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "fe15eece-07a5-4d15-927b-af980aea7693"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.55,
|
||||
"value": {
|
||||
"__uuid__": "30ac103a-0f2b-45db-9442-461479beeb0d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "76272ec6-0721-4496-941b-5cb6a52b2c35"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "c738236a-0702-45f8-aa38-99457b051997",
|
||||
"subMetas": {}
|
||||
}
|
@@ -0,0 +1,133 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Atked1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.31666666666666665,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "6fd7cfcb-95b2-4197-a065-6bc48365f855"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "39aaeff6-3116-4e12-8ec4-9362a8a2fea2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "fb4e42e6-0fae-48d4-a600-217e01d43e57"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "2af606d7-4b3d-4355-95d1-a3ab673d2a2e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "be18e65b-346c-4efb-84cb-7f317fcaf8ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "d269af72-8b89-420c-ba9e-6892cda06e80"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "30539c9d-6dbb-4409-8562-6c24b12010c2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "96b655f9-9a90-4cb1-86ab-0be881ad8983"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "a86f8107-3d8d-426e-9a17-c856c1ab292a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "d7f99f14-9257-426a-9e90-a948e7ca8d23"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "809dcbcf-9edd-4b8b-8bc8-42394ce0a9c2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "f3e74927-2eea-4306-ba0a-c89972ca88f1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "af7a23f6-9b5c-4fe8-aa74-741f18500866"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "4cc6ecdb-3741-4a2e-87a0-a93739a38d37"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "f809b6d3-6f5b-4cf4-b148-5cf7fdf407a5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "b1c9e526-fe26-42a8-9257-7e5549847273"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "db62c862-7553-4f99-b758-8c4a4aec438a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "55f68905-bff7-48ea-b497-5077f49b2aca"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3,
|
||||
"value": {
|
||||
"__uuid__": "b01f45f9-c394-4706-aae1-d1d26a84f48a"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "c69bcceb-d7d1-4e33-9623-e2a374a0a6b6",
|
||||
"subMetas": {}
|
||||
}
|
@@ -0,0 +1,432 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Idle1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 1.1166666666666667,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 2,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "91bba749-7338-4bdc-b9a2-0450a183378f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "31b10e1f-7433-4c0d-b9a7-576adc0cdb51"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "80d4afc7-d21a-4eec-ab5e-ec833e1e905b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "d75070b5-3dbe-4d77-886e-8851f31e8ac8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "a30e880e-1ff1-434d-bdbc-a3a2e0de671b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "87cec524-adf7-48a6-af37-b1bae14b9317"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "d415a590-b4bf-4590-834a-b075705e063a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "e8b7eb99-0b52-4f01-8dd3-6c1ff23a8552"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "599c03fd-c5f1-45b1-9cd8-0164f8e82fe0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "0f71de95-9947-40da-929f-dd25bf43884e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "99980a57-3af2-4c23-84b8-87759ee79e10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "ab001dd3-587c-4a23-adbc-5f0d3eedccaf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "9869ec96-1c78-482e-bff8-95d0b064d0f6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "0863d34e-0116-4134-b17e-32dae8f1589f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "10454569-56bb-4721-9a94-49015f5e11cc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "b13c9ee9-a497-43b3-9b54-83250bc62cc6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "80e898d9-10a9-4817-988c-7571744173e7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "0e4e927d-0c67-43a1-aade-a6b5ea3fe498"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3,
|
||||
"value": {
|
||||
"__uuid__": "6c327da9-60a2-4b63-89ca-05e7bb9b8c5f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "9e71217f-0580-481e-b2ea-8886eb7cf492"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "ed851c4e-6a42-4643-8d50-1bac3d55b1ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.35,
|
||||
"value": {
|
||||
"__uuid__": "3a4738ba-bf3c-47cf-98f7-7e68aba0c96c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.36666666666666664,
|
||||
"value": {
|
||||
"__uuid__": "d035e717-c8ab-4cdc-b59f-c61c9e85990a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.38333333333333336,
|
||||
"value": {
|
||||
"__uuid__": "4bf6ea06-54bf-4c25-87f7-c7d9dca56fab"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4,
|
||||
"value": {
|
||||
"__uuid__": "a4b324b1-1191-43ee-ac76-a4536d1dbac7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "4e2ac5fa-1c68-4cbd-80e6-a94af579796d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.43333333333333335,
|
||||
"value": {
|
||||
"__uuid__": "64cd0353-429a-4a47-a6fc-b0f12e565e94"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.45,
|
||||
"value": {
|
||||
"__uuid__": "3fa0ae73-f8f8-455f-82c3-24a428379e95"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "a4679596-56d5-44f2-a349-7579ad7fbe33"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "3293d474-dfb3-412a-aca1-ce76f70a2181"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5,
|
||||
"value": {
|
||||
"__uuid__": "9794aec3-5e18-4df4-bae2-296f7c5ed935"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "4373d7b7-ea22-4ba2-a6df-c0672d4310a2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "89b6617e-2131-4bc6-840a-048af7944bb8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.55,
|
||||
"value": {
|
||||
"__uuid__": "9c267a7b-ab24-49b4-a2f3-26d885799f23"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "df3255ea-00af-47c2-9deb-4ccd27a62706"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5833333333333334,
|
||||
"value": {
|
||||
"__uuid__": "e15242c9-29ba-411a-a93f-dddad5613956"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6,
|
||||
"value": {
|
||||
"__uuid__": "ef3f8029-d5cc-4024-95ca-1f2aa062a0d5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "7b48f205-a1e8-4233-8c72-11ae9c0ccea7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "ffc69bce-fd84-42d8-b8c9-fe05e6c7fa03"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.65,
|
||||
"value": {
|
||||
"__uuid__": "81805795-ab34-47c1-ab45-57f54d28e72f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "adae26a6-7991-4583-966c-4364ba35474d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "ab51a779-10b7-4039-ac45-6ada002e702f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.7,
|
||||
"value": {
|
||||
"__uuid__": "173d4746-0af5-40ae-a472-ba6406c700dc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.7166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "4054d644-4b5c-473d-ad2c-1c1eb06b01d7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.7333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "0f55009f-71dc-4e70-8152-7dbc2a16a17c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.75,
|
||||
"value": {
|
||||
"__uuid__": "d273f52f-4ec1-4ccf-8820-92879682213e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.7666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "37c2f336-a3c8-4b46-8031-d48c3f36c675"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.7833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "8cee57cb-5e79-4fe9-8368-745b38a37021"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.8,
|
||||
"value": {
|
||||
"__uuid__": "4e67aa7d-d6a6-405b-99c4-ef5be609fdf4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.8166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "b0b7fc1a-f42a-4977-bfef-93841bdfa2f8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.8333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "352bbb78-d87c-425d-b39e-a401432f0070"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.85,
|
||||
"value": {
|
||||
"__uuid__": "9aaadf6a-808f-44f4-b7a8-392138851168"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.8666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "a319abd0-a689-400c-8f2a-94ccc70e50f9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.8833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "2efd4c0f-10c1-41be-81b5-40b3d10cb863"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.9,
|
||||
"value": {
|
||||
"__uuid__": "8b94f28d-7da8-4e83-a9d6-46072b24a847"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.9166666666666666,
|
||||
"value": {
|
||||
"__uuid__": "1f153a21-9a57-4bf7-a7bb-fa2a2e3b9484"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.9333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "2d3ad677-51b8-4d53-924c-dea3f66f0510"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.95,
|
||||
"value": {
|
||||
"__uuid__": "68aabf9d-5b21-4405-b92d-18a837895c37"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.9666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "cb893520-96b5-4ce4-a9dd-90ca4eac1882"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.9833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "498ee98f-7211-4495-99fe-662aee098217"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1,
|
||||
"value": {
|
||||
"__uuid__": "da05be2e-e07f-4081-a99d-9c1b1459b862"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1.0166666666666666,
|
||||
"value": {
|
||||
"__uuid__": "46e64686-1071-4db2-8f3d-4a0a00dc8e10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1.0333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "5a082e4d-d615-411f-880e-b03bda363cea"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1.05,
|
||||
"value": {
|
||||
"__uuid__": "6d582b00-b973-4397-8866-32f531d4366e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1.0666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "1de67f2c-e9ea-438d-8f30-b7c40159bc92"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1.0833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "6e98330a-9709-44e1-8704-aa6430bd8236"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1.1,
|
||||
"value": {
|
||||
"__uuid__": "b2557433-9168-4b78-a9ac-78b33633b1d8"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"frame": 0,
|
||||
"func": "",
|
||||
"params": []
|
||||
},
|
||||
{
|
||||
"frame": 0,
|
||||
"func": "",
|
||||
"params": []
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "252b321f-81f4-485c-85bd-ea44d298cb76",
|
||||
"subMetas": {}
|
||||
}
|