Hi all,
I have been trying to figure out what kind of data structure to use for storing a group of invaders(5x10 group of them). Also, I am having some trouble on if I implemented the collision detection for the invaders correctly.
Currently what I did for the group of invaders, store them in a 2D array. invaders class has 2 boolean values to check if they are on the far left and right of the role. On every frame, it checks to see if the invaders on the farthest left and right collides with the walls. If they collide, they move down on the Y axis and changes their direction on the x.
However, I don’t know if I implemented it correctly in the code. Any kind folks mind looking through my code?
Here’s the link to the repository: https://github.com/crazyhendrix/LibGdx-SpaceInvaders-Clone
Invader class: link
Game World: link
Thanks in advance.