Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Set cursor, Print....Slows your game down.

Author
Message
Dr Crazy
21
Years of Service
User Offline
Joined: 13th Apr 2004
Location:
Posted: 25th Jul 2004 19:51
The other day I was saying how slow my PC was and how I would chuck it out of a window because my game runs at 22 - 25 fps(). I'm making a first person shooter and I thought 'Maybe I should make a better crosshair'. My current crosshair was set cursor 320,240 print "-" and I did this command about 20 times in a loop. I took the code away and replaced it with a simple crosshair on a plain. Suddenly, my game ran at 37 - 62 fps(). I was really shocked at the speed difference. And to make game run EVEN SMOOTHER, I found all the set cursor x,x print"" commands and replaced them with text x,x,"" and it still did the job - only faster.

So remember folks - Beware of the SET CURSOR - PRINT Command!

Who dares; wins.

Login to post a reply

Server time is: 2025-05-25 10:07:52
Your offset time is: 2025-05-25 10:07:52