Hello Info583,
game runs at around 20 fps
Anything less than 30 at this stage is worth optimizing. When you are running less than 30 fps it means you are already running at maximum capacity, any extra processing will lead to a decrease in fps. Also. do you have it set to 30fps or 60fps?
The routine is run every time I move the camera
How about just updating the edges? Are you doing this every frame? try doing it every other frame, or over 3 frames, or until it becomes noticeable.
I’m using this technique in order to have really big maps at the cost of updating a screen full of sprites and a snapping camera.
The link goes to the ansca homepage.
But you don’t think adding “:” to the concact would decrease performance? Since this option would be easier to implement rather than going back to using 2d arrays.
We will have to try it and see, you will get more performance gains as you add more dimensions. It probably like a O(log(n)) vs a O(n) type scenario.
The main take home point is if you are doing something on every single frame event, chances are you are doing it too often. In our space conquest game we ended up running the AI look every 20 frames, the camera loop every 4 frames, the weapons timer every 8 frames. In fact the only thing we had running every frame was the controls because this needed to be responsive as possible.
Regards,
M.Y. Developers
[import]uid: 55057 topic_id: 17975 reply_id: 101631[/import]