Progress on My Ebiten Game Made in Two Months

Progress on My Ebiten Game Made in Two Months

Pictures speak volumes, so I'll add those and little captions to each one.

I was able to get a new screen drawn when a user clicked on a planet. I added some asteroids, but as you can see, the animations were not working.
I did get the animations to settle, but they were still choppy.
More experimenting with drawing the sprites.
Then, I got stuck in a giant rabbit hole of trying to animate things in a standard way.
Frames here were drawn, but in a row. And the ships didn't get drawn at all.
Every time I made a change I thought would work would have problematic effects elsewhere.

Finally, I started a giant revamp of my code.  I had no convergence or standard on three things:

  • resolv.Objects
  • Sprite animations
  • My custom types

So after a few days, I converged things and it seems to be working better.  I have slices of all my objects, such as:

  • []*Planet
  • []*Star
  • []*Ship
  • []*Button

These custom types all have a resolv.Object, which is what I'm using for placing elements, and eventually collisions and the like.

I also spend considerable time getting some code in place to detect the screen size and then making a galaxy twice the size of that.  Since this will be a mobile game, I needed to plug in some code with cgo, which was quite an experience.  In any case, I can detect that now for iOS and adjust accordingly.  My desktop version is also much larger.

On top of that, I was able to add some User Interface buttons, which I will be tying in to actions.

A large galaxy with all my debug info enabled
The beginnings of my user interface. A present on the top-left. Some currency at the top-right. Galaxy and System view buttons on the bottom-right. And finally, some ship buttons in the bottom-middle since your ships may be in different edges of the galaxy.

Follow my channel for more updates and to watch me code in real time.

jacobsalmela - Twitch
May our differences encourage us to build bridges of understanding—to all that makes us unique.