x-hgg-x / arkanoid-go Goto Github PK
View Code? Open in Web Editor NEWArkanoid game in Go using Ebitengine with ECS.
License: MIT License
Arkanoid game in Go using Ebitengine with ECS.
License: MIT License
I find that depending on how the ball bounces off blocks it flies nearly horizontally sometimes. This means it takes ages to come back down to the bottom. You should probably have some margin of vertical movement always. It seems to me that it would be possible that we have a perfectly horizontal ball that never does anything anymore after deleting its line of blocks. This might lead to an infinite game.
Thank you for using Ebiten! I tested this but found a crash:
$ go run .
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x4150f4e]
goroutine 5 [running]:
github.com/hajimehoshi/ebiten.(*Image).isDisposed(...)
/Users/hajimehoshi/go/pkg/mod/github.com/hajimehoshi/[email protected]/image.go:57
github.com/hajimehoshi/ebiten.(*Image).Bounds(...)
/Users/hajimehoshi/go/pkg/mod/github.com/hajimehoshi/[email protected]/image.go:375
github.com/hajimehoshi/ebiten.(*Image).Size(...)
/Users/hajimehoshi/go/pkg/mod/github.com/hajimehoshi/[email protected]/image.go:52
arkanoid/systems/sprite.drawImageWithWrap(0xc000024580, 0xc00000e3e0)
/Users/hajimehoshi/ebiten-games/arkanoid-go/systems/sprite/render.go:51 +0x6e
arkanoid/systems/sprite.RenderSystem(0xc00006c360, 0xc000012a50, 0xc000010088, 0xc000024580)
/Users/hajimehoshi/ebiten-games/arkanoid-go/systems/sprite/render.go:42 +0x2a8
main.game.Update(0xc00006c360, 0xc000012a50, 0xc000010088, 0xc000024580, 0x20, 0x30)
/Users/hajimehoshi/ebiten-games/arkanoid-go/main.go:36 +0x95
github.com/hajimehoshi/ebiten.(*imageDumper).update(0xc000254080, 0xc000024580, 0x0, 0x0)
/Users/hajimehoshi/go/pkg/mod/github.com/hajimehoshi/[email protected]/imagedumper_desktop.go:106 +0x4e
github.com/hajimehoshi/ebiten.(*imageDumperGame).Update(0xc00000e500, 0xc000024580, 0x468a960, 0x0)
/Users/hajimehoshi/go/pkg/mod/github.com/hajimehoshi/[email protected]/run.go:180 +0x44
github.com/hajimehoshi/ebiten.(*uiContext).update(0x466cb40, 0xc0001d6140, 0x0, 0x0)
/Users/hajimehoshi/go/pkg/mod/github.com/hajimehoshi/[email protected]/uicontext.go:262 +0x150
github.com/hajimehoshi/ebiten.(*uiContext).Update(0x466cb40, 0xc0001d6140, 0x0, 0x0)
/Users/hajimehoshi/go/pkg/mod/github.com/hajimehoshi/[email protected]/uicontext.go:239 +0xb4
github.com/hajimehoshi/ebiten/internal/uidriver/glfw.(*UserInterface).update(0x4667f20, 0x441a0a0, 0x466cb40, 0xc0001d0001, 0xc000048668)
/Users/hajimehoshi/go/pkg/mod/github.com/hajimehoshi/[email protected]/internal/uidriver/glfw/ui.go:751 +0x1d9
github.com/hajimehoshi/ebiten/internal/uidriver/glfw.(*UserInterface).loop(0x4667f20, 0x441a0a0, 0x466cb40, 0x0, 0x0)
/Users/hajimehoshi/go/pkg/mod/github.com/hajimehoshi/[email protected]/internal/uidriver/glfw/ui.go:797 +0xec
github.com/hajimehoshi/ebiten/internal/uidriver/glfw.(*UserInterface).run(0x4667f20, 0x441a0a0, 0x466cb40, 0x0, 0x0)
/Users/hajimehoshi/go/pkg/mod/github.com/hajimehoshi/[email protected]/internal/uidriver/glfw/ui.go:669 +0x232
github.com/hajimehoshi/ebiten/internal/uidriver/glfw.(*UserInterface).Run.func1(0xc000012ac0, 0xc00006c3c0, 0x4667f20, 0x441a0a0, 0x466cb40)
/Users/hajimehoshi/go/pkg/mod/github.com/hajimehoshi/[email protected]/internal/uidriver/glfw/ui.go:535 +0xbc
created by github.com/hajimehoshi/ebiten/internal/uidriver/glfw.(*UserInterface).Run
/Users/hajimehoshi/go/pkg/mod/github.com/hajimehoshi/[email protected]/internal/uidriver/glfw/ui.go:532 +0x154
exit status 2
The framerate is very, very jittery. This makes it hard to even control the panel right. One moment the ball comes flying in fast, then it stops due to a harsh drop in framerate, but I am moving my mouse along with the ball - or so I think - but it "tricks" me and I drop it.
I am on Windows 10 and found the framerate not to be constant at all. The ball does not move smoothly.
I find it irritating that I have the mouse cursor visible when it is inside the window. I think you want to hide it.
One thing I want to point out which is great is that you track the mouse position outside the window. This game would not be playable otherwise, so good job!
In the main menu I can press UP/DOWN but only half of the time will this change the option. Are you not reacting to key events but instead rely on the key state during the frame?
Are there plans to add more levels soon maybe?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.