Two months have passed since the last update on DigiBall. But there is a very good reason for that. I had to basically rewrite all of the code from scratch in order for it to be easier to maintain in the future. At the end of the post there are technical details for those interested in LibGDX and Ashley Entity Component System.
With that out of the way, Are you ready to see what changed during these 2 months? Yes? Then let's go :D
As I said earlier this game needed more gameplay variety. That's how the "fancy rope" was born. It can temporarily lock some parts of the arena or connect enemies to walls. You can destroy it only by shooting the white ball at it. Entities can't pass trough it. But enough talking. Better see it in action:
I'm genuinely excited about all of these new design possibilities :D
Later I thought - "What about different enemy types?".
This game has to have various enemy types. After a short brainstorm I screamed: "Bigger, more bad ass enemy with his own gravity field around him. That's got to be it :D". I quickly got to work, and that's the result:
I still have to figure out how to make him look better. I'll look for inspiration in Angry Birds: Space. Folks from Rovio have made pretty decent gravity fields :D.
After these two additions I had enough diverse gameplay mechanics. It was time to combine them into actual levels...
Oh, and there are also buttons which open and close gates. Only the ball can trigger them.
In total there are 20 levels in this game already. Soon there will be enough for a short demo :D
Now time for the Technical Side.
If you don't care about LibGDX, Programming Patterns and combining them together you can safely finish reading this devlog (Better yet you can tell all of your friends how cool DigiBall is going to be :D).
OK, If you're here it means that you have to be asking: "What is an Entity Component System and why would you spend three weeks on rewriting the whole game???".
Well, you see, DigiBall is the biggest game I ever created and it quickly became too big. Each entity type was stored in its own separate Array. Just look at this:
It's ugly, right? But that's where an Entity Component System comes in.
It's basically a pattern, different from Object Oriented Programming which is really useful, specifically in game development. It has a few benefits such as:
- You don't have to store all of your entities in separate Arrays
- All of entities in your game are created from smaller modules (called components). It makes it easy to add new, complex entities
- It's easy to define new entities in data
- It's more efficient
Even though it took me three weeks to rewrite the code, it was absolutely worth it. If you want to read more about Entity Component System:
That's all for now,
I hope that you are becoming as excited about DigiBall as I am... :D