- Refactor dirt and stone generation to optimize visible depth and adjust randomization.
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 8m32s
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 8m32s
- Remove unused `StartWebSocketGateway` function from `websocket_gateway.go`. - Add security checks to track player-room mapping, enforce valid input, and prevent ID spoofing in `gateway.go`. - Refactor touch control logic to dynamically position joystick and buttons above gameplay floor. - Introduce dynamic floor Y-coordinate calculation (`GetFloorYFromHeight`) for better scaling across different screen sizes. - Adjust rendering logic to align assets, particles, and debug visuals with dynamic screen height transformations. - Update canvas CSS to support fullscreen scaling without center alignment.
This commit is contained in:
@@ -186,6 +186,9 @@ func (g *Game) RenderParticles(screen *ebiten.Image) {
|
||||
g.particlesMutex.Lock()
|
||||
defer g.particlesMutex.Unlock()
|
||||
|
||||
// Canvas-Höhe für Y-Transformation
|
||||
_, canvasH := screen.Size()
|
||||
|
||||
for i := range g.particles {
|
||||
p := &g.particles[i]
|
||||
|
||||
@@ -197,9 +200,9 @@ func (g *Game) RenderParticles(screen *ebiten.Image) {
|
||||
|
||||
col := color.RGBA{p.Color.R, p.Color.G, p.Color.B, alpha}
|
||||
|
||||
// Position relativ zur Kamera
|
||||
// Position relativ zur Kamera und mit Y-Transformation
|
||||
screenX := float32(p.X - g.camX)
|
||||
screenY := float32(p.Y)
|
||||
screenY := float32(WorldToScreenYWithHeight(p.Y, canvasH))
|
||||
|
||||
// Partikel als Kreis zeichnen
|
||||
vector.DrawFilledCircle(screen, screenX, screenY, float32(p.Size), col, false)
|
||||
|
||||
Reference in New Issue
Block a user