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
|
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/backend.so /nakama/data/modules
|
||||||
#COPY --from=builder /backend/local.yml /nakama/data/
|
#COPY --from=builder /backend/local.yml /nakama/data/
|
||||||
COPY --from=builder /backend/*.json /nakama/data/modules
|
COPY --from=builder /backend/*.json /nakama/data/modules
|
||||||
|
|
||||||
ENTRYPOINT [ "/bin/bash" ]
|
|
||||||
|
|
@ -24,7 +24,7 @@ services:
|
||||||
- "-ecx"
|
- "-ecx"
|
||||||
- >
|
- >
|
||||||
/nakama/nakama migrate up --database.address root@cockroachdb:26257 &&
|
/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"
|
restart: "no"
|
||||||
links:
|
links:
|
||||||
- "cockroachdb:db"
|
- "cockroachdb:db"
|
||||||
|
|
@ -38,15 +38,22 @@ services:
|
||||||
- "7350"
|
- "7350"
|
||||||
- "7351"
|
- "7351"
|
||||||
- "9100"
|
- "9100"
|
||||||
|
- "2345"
|
||||||
ports:
|
ports:
|
||||||
- "7349:7349"
|
- "7349:7349"
|
||||||
- "7350:7350"
|
- "7350:7350"
|
||||||
- "7351:7351"
|
- "7351:7351"
|
||||||
|
- "2345:2345"
|
||||||
|
- "4000:4000"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "/nakama/nakama", "healthcheck"]
|
test: ["CMD", "/nakama/nakama", "healthcheck"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
security_opt:
|
||||||
|
- seccomp:unconfined
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
prometheus:
|
prometheus:
|
||||||
image: prom/prometheus
|
image: prom/prometheus
|
||||||
entrypoint: /bin/sh -c
|
entrypoint: /bin/sh -c
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ func (s *PlayerStageState) Delete() {
|
||||||
ffi.DestroyBullet(bullet)
|
ffi.DestroyBullet(bullet)
|
||||||
}
|
}
|
||||||
s.bullets = nil
|
s.bullets = nil
|
||||||
|
s.playerInputs = nil
|
||||||
|
|
||||||
ffi.DestroyCircle(s.hitCol)
|
ffi.DestroyCircle(s.hitCol)
|
||||||
ffi.DestroyCircle(s.grazeCol)
|
ffi.DestroyCircle(s.grazeCol)
|
||||||
|
|
@ -110,7 +111,7 @@ func (s *PlayerStageState) NewStateFromInputs(inputs []*ClientUpdate, tickToSimu
|
||||||
stageStateCopy := s.DeepClone()
|
stageStateCopy := s.DeepClone()
|
||||||
|
|
||||||
// Replay each tick between the last locked in tick and the tick to simulate to
|
// 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
|
// Handle inputs for the current tick on the client
|
||||||
for _, input := range inputs {
|
for _, input := range inputs {
|
||||||
if input.Tick == t {
|
if input.Tick == t {
|
||||||
|
|
@ -133,6 +134,7 @@ func (s *PlayerStageState) NewStateFromInputs(inputs []*ClientUpdate, tickToSimu
|
||||||
// TODO bullets are impacting the past
|
// TODO bullets are impacting the past
|
||||||
// TODO Then replay, since bullets should be working again
|
// TODO Then replay, since bullets should be working again
|
||||||
// TODO: Finally, handle death and revival using deathState
|
// TODO: Finally, handle death and revival using deathState
|
||||||
|
// TODO: Use sort of the inputs to reduce the number of iterations
|
||||||
|
|
||||||
ffi.DestroyBullet(b)
|
ffi.DestroyBullet(b)
|
||||||
return true
|
return true
|
||||||
|
|
|
||||||
Reference in a new issue