sswift - not really, I use this method all the time in blitzplus in the following manner:
All objects, bullets, space craft, big green aliens etc, are part of a single 'type' structure, with similar properties (movement speed, collision radius, hit points etc).
Each frame you are going to iterate through each object and perform actions on it such as moving it in the case of bullets (and checking for collisions when the bullets move), or responding to player input (detected earlier) in the case of player controlled objects. So you are already going to be going through their list each frame anyway. When an object moves across a boundary (simple math check detects this) simply reference the appropriate grid square, either in a bank or an array which holds a reference to a bank which contains the handles (does Blitzmax use handle/object commands? maybe that's why it wouldn't work) of the objects within that zone/grid square. Simply run through the list of handles within that bank and remove the entry as well as moving all the following handles down one slot in the bank and resizing it so that it is 4 bytes smaller (size of a handle=int). If there are no objects left in that grid square then free the bank as well. Then proceed to go to the grid square that is being moved to and add the object's handle to the bank for that grid square.
One of the points I don't really like about refreshing the list at the start of the next frame is that if an object moves out of the grid square, or into the grid square during the 'updatebullets' section of the code then the data being held in the grid square is suddenly out of date/incorrect. Whereas with the method I outlined above it is always accurate. In some ways it can be quicker too as you are only modifying the bank when movement occurs rather than refreshing every grid square every frame - a bit of a waste if most of them are empty or if most of the objects are slow moving/stationary. I don't know how much difference it would make with a low end PC since that is what Pragun is running it on.
All objects, bullets, space craft, big green aliens etc, are part of a single 'type' structure, with similar properties (movement speed, collision radius, hit points etc).
Each frame you are going to iterate through each object and perform actions on it such as moving it in the case of bullets (and checking for collisions when the bullets move), or responding to player input (detected earlier) in the case of player controlled objects. So you are already going to be going through their list each frame anyway. When an object moves across a boundary (simple math check detects this) simply reference the appropriate grid square, either in a bank or an array which holds a reference to a bank which contains the handles (does Blitzmax use handle/object commands? maybe that's why it wouldn't work) of the objects within that zone/grid square. Simply run through the list of handles within that bank and remove the entry as well as moving all the following handles down one slot in the bank and resizing it so that it is 4 bytes smaller (size of a handle=int). If there are no objects left in that grid square then free the bank as well. Then proceed to go to the grid square that is being moved to and add the object's handle to the bank for that grid square.
One of the points I don't really like about refreshing the list at the start of the next frame is that if an object moves out of the grid square, or into the grid square during the 'updatebullets' section of the code then the data being held in the grid square is suddenly out of date/incorrect. Whereas with the method I outlined above it is always accurate. In some ways it can be quicker too as you are only modifying the bank when movement occurs rather than refreshing every grid square every frame - a bit of a waste if most of them are empty or if most of the objects are slow moving/stationary. I don't know how much difference it would make with a low end PC since that is what Pragun is running it on.