Skip to main content
GameDev.net gamedev.net
🔒 Locked

unitcreate system...

Started by Pipo DeClown Aug 4, 2002 at 6:09 AM 0 replies 200+ views
Original Post
Pipo DeClown
Pipo DeClown
how can i make a unitcreate-system, where I can easily handle all units? I could use linked lists, but if so, i cant jump in the middle of the list to make a unit dead... so what is a better way? .lick
Damocles
Damocles
The way Im doing my current project is a linked list. Because I have to run through each object in the list to see what needs to be rendered where, I also added a boolean in the base class called bDeleteMe. If true, then I destroy the object, if false, I render it.

There are other ways to do it - it all depends how complex your game is going to be. mine is relatively simple so a straight linked list is fine for my needs.
------------------------------------------[New Delta Games] | [Sliders]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.