First Prototype Release - Green Guy

My attempt at a schmup music themed mobile game. I’m sure that I’ve done things terribly incorrect.

I haven’t gotten into the shading and fun stuff like that at all…

Lua tables are great but I had to try many different ways of iteration and table structure to get the speed fast enough to even be playable. First time I loaded it to try on a low grade A21… I was very sad.

No Modules used, all default Defold with it’s great messaging system.

Maybe by the time Rive integration is complete, I’ll have a better working structure.

It’s currently on itch for free, and would love any feedback.

https://jahdesigned.itch.io/greenguy-beta

6 Likes

I’ve made lots of improvements since the first time I tried this game on my slowest mobile. It’s been an amazing learning experience working with Defold and Lua, both of which I knew nothing of start of August. My latest improvement is to move the bullet checking and enemy management over to a module. Now I break my entire level in to cells, find the CX CY, RX RY and grid my enemies into tables that they are “majority” in. Still streamlining this process to find the best balance.
Then we check all bullets that have been added to the list. First they are quickly and less accurately found into single grids as their size compared to the grid is minute. Once I have a CX and CY a simple table lookup of enemy[cx][cy] returns all enemies in the grid. (if any) then a quick length check determines if the bullet is close enough to warrant a collision object in the physics engine. A list of all the bullets that need collision objects is returned and then they are removed from the list. From their physics handles the collision and deletion with Defold messaging.

I now have to fix my poorly gutted and patched code to accept the module completely. A rough test setup to spawn wave after wave showed performance matching my desktop during the original release. No more slow-mo vsync. I only start get jitter from the display slightly because I’m reaching 500+ enemies being checked against 700 ~ bullets. An amount I would never actually spawn in game. Before anything over 10~ enemies in active check would lead to elevated frame times. I also added new animations and select screens but its the performance I’m after.

1 Like

Really cool! Happy to see the progress you’ve made in such a short time!

Sounds like you are on the right track and it is a great learning experience to build this yourself. There are also extensions available that would solve similar problems of collisions between large groups of objects: https://github.com/selimanac/DAABBCC

1 Like

Thank you so much, I actually have the DAABBCC cloned on my computer. I see many uses for the extension. Along with your public examples and many others. Seeing the asset portal grow and beta versions coming out is wonderful. As you mentioned I want to gain the problem solving experience so that in the future, rather than consume assets I am able to contribute them.

3 Likes