Sorry I dont have any code, or even placebo code, but I just thought I would mention about delays in your code (if this seems confusing, just ignore it!)
Collision can kill the screen fps, in my current project, I have used the technique of added Delays to the code in order to speed up the screen fps. In the project i turned it from 50fps to 300-900fps depending on what was happening, although I can not guarennty this will always help, its worth trying.
Pretty much, when you move an object, camera, check for collision - this is more than likely happening in EVERY loop. But if for example you were to add a set of delays, so for example the program only checks if the user wants to move the character every 10 loops, it wont create a sluggish looking movement but instead increase preformance.
Say for example you have a screen fps of 200, your program loops 200 times a second, if you were to check the movement every 10 loops, its still checking it 20 times a second which frees up the process which will in turn increase the FPS to about 300 which will lead to the program checking the movement about 30 times a second, which is totally unnoticable. Of course, this doesnt always work and you may just see an increase of say 5FPS, but every little helps.
What you do is for example change:
If upkey$() = 1 then move camera 1
to
If MDelay = 0
If upkey$() = 1 then move camera 1
MDelay = 10
Endif
If MDelay > 0 then MDelay = MDelay - 1
What this code does: It will look to see if MDelay = 0, if so it will check to see if you want to move the camera, despite the upkey being pressed, if MDelay does = 0 then MDelay will now = 10. It will then decrease MDelay by 1 every loop unless it = 0, in which case it will check once more if upkey$() is pressed.
Rather than having just one command, you can have several:
If MDelay = 0
If upkey$() = 1 then move camera 1
If downkey$() = 1 then move camera -1
MDelay = 10
Endif
If MDelay > 0 then MDelay = MDelay - 1
Now if your thinking, but I dont use move camera, or this post was about collision not movement. Well it doesnt matter, you can have ANY command in the delay and it will still have the same affect.
In otherwords, add the delay to a collision check, it will then only check the collision about every 10 loops, increaseing the FPS.
James
One last note I feel I should point out. I used a delay of 10 as an example. What I tend to do is experiment with the delay and create as big a delay as I can without having making the program look sluggish. That being said, different machines may generally produce a lower screen fps, in which case you would need a lower delay in order for your game not to look sluggish on there machine. Your best bet would be to add a delay that reduceds the screen FPS, but is way below what your PC can handle. (there are more complex ways of checking a delay but I wont go in to that for now)
Hello!