feat: engine setup

This commit is contained in:
Cereska
2026-03-11 12:40:03 -04:00
parent 09bc918858
commit 6b7e105484
3 changed files with 57 additions and 1 deletions

View File

@@ -1 +1,30 @@
package main
package main
import (
"log"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
)
type Game struct{}
func (g *Game) Update() error {
return nil
}
func (g *Game) Draw(screen *ebiten.Image) {
ebitenutil.DebugPrint(screen, "Hello world")
}
func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int) {
return 320, 240
}
func main() {
ebiten.SetWindowSize(640, 480)
ebiten.SetWindowTitle("Hello world")
if err := ebiten.RunGame(&Game{}); err != nil {
log.Fatal(err)
}
}