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 / Frames per second problem

Author
Message
smartypants
21
Years of Service
User Offline
Joined: 27th Apr 2004
Location: At is computer
Posted: 1st May 2004 23:21
I've made this cool little 3d game, it dosn't have to many objects (1 500x500 matrix and 23 .x objects). The problem is when I make it and exe or a final, the frames per second is 17-18 but when i run it with the compiler it is 27 - 30. I had the sync rate at 30, but when i ran into this problem I changed it to 0 adn it did the same thing... what wrong with the .exe?

King of the asked question
pizzaman
21
Years of Service
User Offline
Joined: 18th Feb 2004
Location: Gateshead, UK
Posted: 2nd May 2004 00:19
hey

i had a problem like this, the problem was that i was using the line command to draw some lines, and for some reason my fps got halved almost, i think the same is true for using any of dbc's 2d drawing commands like box, circle etc. to get over this problem i had to make images of the lines in an art pakage and paste them to the screen. i dunno if this is your problem or not but if it is you have take the 2d drawing commands out.

hope i helped u
smartypants
21
Years of Service
User Offline
Joined: 27th Apr 2004
Location: At is computer
Posted: 2nd May 2004 00:58
I used 2d for representation of a lot of things in my game, it wont be very easy to go back and change them all, if there isn't anything else I can do then I'll have to go back and change them. Thanks pizzaman.

If anyone knows of any other ways of fixing this please tell me, I like to use 2d in my 3d games.

King of the asked question
pizzaman
21
Years of Service
User Offline
Joined: 18th Feb 2004
Location: Gateshead, UK
Posted: 2nd May 2004 01:13 Edited at: 2nd May 2004 01:15
i think you should rem all your 2d drawing code just to test if it is the 2d drawing commands, o and btw using sprites, images, bitmaps are okay its just these commands

DOT
BOX
LINE
CIRCLE
ELLIPSE

o i should be a little more clear you can use these commands as long as there not in you main loop, in other words you could draw to the screen using these commands, use the get image command to get an image of them then paste them to the screen as sprites or images in your main loop

i no its a real pain in the ass when u have to go back and change all the 2d stuff in your game,

anyways gud luck
GameKit
22
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 2nd May 2004 01:33 Edited at: 2nd May 2004 01:34
I find that useing this code helps increase the Frames Per Second...



This code usually only helps if you have a large amount of objects. Also, If your objects are very large or too close to the camera it may cause problems...

Well... I hope It helps Anyways...

Previously known as "Game_Creator". Thou shalt not thwart the way of the dragon. For thou tasteth like chicken.
smartypants
21
Years of Service
User Offline
Joined: 27th Apr 2004
Location: At is computer
Posted: 2nd May 2004 07:04
ok, thanks bunch you even ancered a question before I asked it.
Quote: " find that useing this code helps increase the Frames Per Second...



This code usually only helps if you have a large amount of objects. Also, If your objects are very large or too close to the camera it may cause problems...

Well... I hope It helps Anyways...
"


and i was useing all the drawing commands in the main loop, so my fps went from 97 to 10 (owww).But i'm going back to fix it!

King of the asked question

Login to post a reply

Server time is: 2025-05-23 13:55:01
Your offset time is: 2025-05-23 13:55:01