x


[Closed] making a 2D shooter: general questions (good practices)

Hi,

I want to create a vertical 2D shooter using Unity+Toolkit2D, and I succeeded in having a basic vertical scrolling and some sprites on screen to play with :)

Actually, I have some general questions about the way to code things right (good practices to use) :

1) bullets: I have my graphic sprite for the main ship's bullets. I guess I have to make a Unity prefab with this sprite (because of the re-use in the game). But do I have to create a pool or something for storing 50-or-so bullets, and re-use the prefabs in the pool all along the game ? Or do I have to create the prefab instances on-the-fly, when the player triggers a shoot (and, then, remove the prefab instances from the memory, when became useless) ?

2) ennemies appear on screen: what is the best way to make/script some ennemies appear on top of the screen after 10sec of play, then, 5sec later, more ennemies appear on the right, etc, etc...? And what about the memory management? (ie: do not overload memory with the ennemies which are not yet/no longer on screen)

Thank you for all your pieces of advices!!! ...and sorry for the noob questions. (and if you think about other interesting stuff I should know for making a 2D shooter, please post your tips here: thanks :) )

more ▼

asked Apr 26 '12 at 07:49 PM

graphic_dude gravatar image

graphic_dude
1 1 2 3

Please use the forums for discussion questions. This is a Q&A database of specific development questions.

Apr 26 '12 at 07:51 PM Eric5h5
(comments are locked)
10|3000 characters needed characters left

The question has been closed Apr 26 '12 at 07:50 PM by Eric5h5 for the following reason:

Question is off-topic or not relevant


0 answers: sort voted first

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x130

asked: Apr 26 '12 at 07:49 PM

Seen: 564 times

Last Updated: Apr 26 '12 at 08:04 PM