Misc fixes for UI alignments.

This commit is contained in:
genxium
2023-01-18 10:06:27 +08:00
parent 342efc623c
commit 48074d48af
20 changed files with 3527 additions and 9146 deletions

View File

@@ -6,16 +6,22 @@ all: help
GOPROXY=https://goproxy.io
serve:
gopherjs clean
gopherjs serve $(PROJECTNAME)
build:
gopherjs build $(PROJECTNAME)
rm ../frontend/assets/plugin_scripts/jsexport.js && mv ./jsexport.js ../frontend/assets/plugin_scripts/jsexport.js
clean:
gopherjs clean
rm -f ../frontend/assets/plugin_scripts/jsexport.js
rm -f ../frontend/assets/plugin_scripts/jsexport.js.map
build-min:
build: clean
gopherjs build $(PROJECTNAME)
mv ./jsexport.js ../frontend/assets/plugin_scripts/
mv ./jsexport.js.map ../frontend/assets/plugin_scripts/
build-min: clean
gopherjs build -m $(PROJECTNAME)
rm ../frontend/assets/plugin_scripts/jsexport.js && mv ./jsexport.js ../frontend/assets/plugin_scripts/jsexport.js
mv ./jsexport.js ../frontend/assets/plugin_scripts/
mv ./jsexport.js.map ../frontend/assets/plugin_scripts/
.PHONY: help

View File

@@ -22,7 +22,7 @@ const (
GRAVITY_X = int32(0)
GRAVITY_Y = -int32(float64(0.5) * WORLD_TO_VIRTUAL_GRID_RATIO) // makes all "playerCollider.Y" a multiple of 0.5 in all cases
INPUT_DELAY_FRAMES = int32(4) // in the count of render frames
INPUT_DELAY_FRAMES = int32(8) // in the count of render frames
INPUT_SCALE_FRAMES = uint32(2) // inputDelayedAndScaledFrameId = ((originalFrameId - InputDelayFrames) >> InputScaleFrames)
NST_DELAY_FRAMES = int32(16) // 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"
@@ -489,19 +489,19 @@ func deriveOpPattern(currPlayerDownsync, thatPlayerInNextFrame *PlayerDownsync,
}
patternId := PATTERN_ID_NO_OP
if 0 < decodedInput.BtnALevel {
if decodedInput.BtnALevel > prevBtnALevel {
if 0 > effDy {
patternId = 3
} else if 0 < effDy {
patternId = 2
} else {
patternId = 1
}
} else {
patternId = 4 // Holding
}
}
if 0 < decodedInput.BtnALevel {
if decodedInput.BtnALevel > prevBtnALevel {
if 0 > effDy {
patternId = 3
} else if 0 < effDy {
patternId = 2
} else {
patternId = 1
}
} else {
patternId = 4 // Holding
}
}
return patternId, jumpedOrNot, effDx, effDy
}

View File

@@ -42,7 +42,7 @@ var Characters = map[int]*CharacterConfig{
GetUpInvinsibleFrames: int32(10),
GetUpFramesToRecover: int32(27),
Speed: int32(float64(3.0) * WORLD_TO_VIRTUAL_GRID_RATIO),
Speed: int32(float64(2.0) * WORLD_TO_VIRTUAL_GRID_RATIO),
JumpingInitVelY: int32(float64(8) * WORLD_TO_VIRTUAL_GRID_RATIO),
DashingEnabled: false,
@@ -88,7 +88,7 @@ var Characters = map[int]*CharacterConfig{
GetUpInvinsibleFrames: int32(10),
GetUpFramesToRecover: int32(27),
Speed: int32(float64(4.0) * WORLD_TO_VIRTUAL_GRID_RATIO),
Speed: int32(float64(2.0) * WORLD_TO_VIRTUAL_GRID_RATIO),
JumpingInitVelY: int32(float64(7.5) * WORLD_TO_VIRTUAL_GRID_RATIO),
DashingEnabled: true,
@@ -138,7 +138,7 @@ var Characters = map[int]*CharacterConfig{
GetUpInvinsibleFrames: int32(8),
GetUpFramesToRecover: int32(30),
Speed: int32(float64(3.0) * WORLD_TO_VIRTUAL_GRID_RATIO),
Speed: int32(float64(1.9) * WORLD_TO_VIRTUAL_GRID_RATIO),
JumpingInitVelY: int32(float64(7.5) * WORLD_TO_VIRTUAL_GRID_RATIO),
DashingEnabled: false,