Working debugger vscode
This commit is contained in:
parent
8fe7bff891
commit
e8bf45be89
3 changed files with 13 additions and 5 deletions
|
|
@ -15,8 +15,7 @@ RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
|||
|
||||
FROM heroiclabs/nakama-dsym:3.26.0
|
||||
|
||||
COPY --from=builder /go/bin/dlv /nakama/
|
||||
COPY --from=builder /backend/backend.so /nakama/data/modules
|
||||
#COPY --from=builder /backend/local.yml /nakama/data/
|
||||
COPY --from=builder /backend/*.json /nakama/data/modules
|
||||
|
||||
ENTRYPOINT [ "/bin/bash" ]
|
||||
COPY --from=builder /backend/*.json /nakama/data/modules
|
||||
|
|
@ -24,7 +24,7 @@ services:
|
|||
- "-ecx"
|
||||
- >
|
||||
/nakama/nakama migrate up --database.address root@cockroachdb:26257 &&
|
||||
exec /nakama/nakama --name nakama1 --database.address root@cockroachdb:26257 --logger.level ERROR --session.token_expiry_sec 7200 --metrics.prometheus_port 9100
|
||||
/nakama/dlv --log --log-output=debugger --listen=:4000 --headless=true --api-version=2 exec /nakama/nakama -- --name nakama1 --database.address root@cockroachdb:26257 --logger.level DEBUG --session.token_expiry_sec 7200 --metrics.prometheus_port 9100
|
||||
restart: "no"
|
||||
links:
|
||||
- "cockroachdb:db"
|
||||
|
|
@ -38,15 +38,22 @@ services:
|
|||
- "7350"
|
||||
- "7351"
|
||||
- "9100"
|
||||
- "2345"
|
||||
ports:
|
||||
- "7349:7349"
|
||||
- "7350:7350"
|
||||
- "7351:7351"
|
||||
- "2345:2345"
|
||||
- "4000:4000"
|
||||
healthcheck:
|
||||
test: ["CMD", "/nakama/nakama", "healthcheck"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
stdin_open: true
|
||||
tty: true
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
entrypoint: /bin/sh -c
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ func (s *PlayerStageState) Delete() {
|
|||
ffi.DestroyBullet(bullet)
|
||||
}
|
||||
s.bullets = nil
|
||||
s.playerInputs = nil
|
||||
|
||||
ffi.DestroyCircle(s.hitCol)
|
||||
ffi.DestroyCircle(s.grazeCol)
|
||||
|
|
@ -110,7 +111,7 @@ func (s *PlayerStageState) NewStateFromInputs(inputs []*ClientUpdate, tickToSimu
|
|||
stageStateCopy := s.DeepClone()
|
||||
|
||||
// Replay each tick between the last locked in tick and the tick to simulate to
|
||||
for t := stageStateCopy.lastLockedInTick; t < tickToSimulateTo; t++ {
|
||||
for t := stageStateCopy.lastLockedInTick; t <= tickToSimulateTo; t++ {
|
||||
// Handle inputs for the current tick on the client
|
||||
for _, input := range inputs {
|
||||
if input.Tick == t {
|
||||
|
|
@ -133,6 +134,7 @@ func (s *PlayerStageState) NewStateFromInputs(inputs []*ClientUpdate, tickToSimu
|
|||
// TODO bullets are impacting the past
|
||||
// TODO Then replay, since bullets should be working again
|
||||
// TODO: Finally, handle death and revival using deathState
|
||||
// TODO: Use sort of the inputs to reduce the number of iterations
|
||||
|
||||
ffi.DestroyBullet(b)
|
||||
return true
|
||||
|
|
|
|||
Reference in a new issue