help programming!

Started by
19 comments, last by GameDev.net 18 years, 6 months ago
Quote:Original post by Hunter_Ex
okay didnt knew of that :D

but i think ill stick to ARRAYS with use boolean, its not a gigantic game!!

/cheers




You CAN use link lists inside an array to get rid of the problem of unused slots.

Just have a pointer as part of your array STRUCT and maintain ACTIVE and UNUSED/FREE chains (pointer points to next array element in chains...).

You can use the ACTIVE chain also as a sorted display list if needed.


If you want to serialize the array data for a gamesave, you can convert the pointers into an array index (and back again on loading).


This topic is closed to new replies.

Advertisement