# Bubble shooter overview question

**URL:** <https://forum.kirupa.com/t/bubble-shooter-overview-question/302034>\
**Category:** programming\
**Created:** [December 20, 2009, 3:03pm UTC](https://forum.kirupa.com/t/bubble-shooter-overview-question/302034 "2009-12-20T15:03:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mindtricks1](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mindtricks1](https://forum.kirupa.com/u/mindtricks1)\
**Post date:** [December 20, 2009, 3:03pm UTC](https://forum.kirupa.com/t/bubble-shooter-overview-question/302034/1 "2009-12-20T15:03:07Z")

</div>

hello there !

I’ve started to build a like - bubble shooter game and I have a few question regarding organization inside my actionscript 3 files.

First, this is what I’ve done til now:

- all the balls are in one big Enemy class
- each different ball is in separate class, like Blue class, which extends Enemy class
- all the balls are stored in an army array when they are generated. I also added a public int var named indexx to the Enemy class, so I can access them in an order. So, the first ball generated has indexx 1, the last one has 67 (for lvl1); also I added a public string var named colour

questions:

- I generate the ball to be fired -\> should I add it to the army array after it took its position ?

- after the removing balls algorithm - the balls which where removed should I remove them from my army array ?

- or should I generate another array (multidimensional) on every timer tick (25ms) from the balls current x and y positions ? If so, how do you think it’ll be best arranging this array for the future algorithms to succeed easier ?

- for lvl2, 10 rows of balls are generated. the player should see only 6. how can I add a mask ? or what can I do to hide the lines which are over the top ?

I’ve not implemented the removing balls algorithms yet - I’ve seen a hex map idea and I think I’ll use it.  
Btw, it’s an AIR application.

If any of you can help me with anything - tutorials, some codes to be read before - anything I’ld apreciate.

Thanks a lot !
