How to create an array for a sprite in Scala using the FANG library?

Im trying to make brick breaker using Scala and the FANG library (fangengine.org). I have run into a few problems.

1 – I want to make an array that will hold all the bricks. I would like there to be 24 bricks (3 rows, 8 in each row). How do I make an array and then set the positions for each brick in the array? Currently, I only have one brick that I made using a variable. I also made my other sprites, and have no problem with them. Its just making it with an array then positioning it is what confuses me.

2 – How do I get my ball to move and bounce off the bricks and the paddle?

This is the code I have so far: http://pastebin.com/Dr5BEv3M

Please, any help would be appreciated.

✅ Answers

? Best Answer

  • Creating an array with sprites: http://gamedev.stackexchange.com/questio…
  • Leave a Comment