For Type Pros

BlitzPlus Forums/BlitzPlus Programming/For Type Pros

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

yes, as Blitz PLus can't resize arrays, you WOULD have to make a fixed size array, but if you know a theoretical maximum number if types it's no problem.

When you add to the array, you ought to keep a counter which is the current next available empty slot, when filled, increment the counter by one. Unless you need to insert into the array and shuffle all the other slots up by one. Deleting something from the middle of the array will need shuffling and also a reduction of the counter by one. It's a bit late for me to be posting code right now, but I used this technique for my games and it's cool.