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.

Newcomers DBPro Corner / problems with game speed

Author
Message
Sleet
21
Years of Service
User Offline
Joined: 3rd Aug 2003
Location:
Posted: 10th Dec 2003 10:58
I haven't had this much trouble getting my game to run at the right speed since before I learned about sync commands! Maybe it's just me, I don't know, but it seems that there is something seriously wrong with the code that I attatched, if I set the camera range any higher the game gets slower, when I press the left or right arrow keys there is a split second (but very annoying) delay before the object begins to turn. It just seems to run very slugishly. Maybe it's the object format? I dont' know, this is the first time I have used an object that I created so maybe it is. I am stumped.

(By the way, I know the camera follow commands are junk but I just used what was easiest so I could test it)
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 10th Dec 2003 14:30
What sort of frame rates are you getting?

On a 1ghz/GF2 system I'd expect it to meet the 60fps frame rate you specified. There's nothing strange about your code, tell us a bit about your PC setup.


Van-B


I laugh in the face of fate!
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 10th Dec 2003 14:31
Ohh, BTW - don't load a bitmap then grab the image from it, just load the image [LOAD IMAGE "texture.bmp",1].


Van-B


I laugh in the face of fate!
Sleet
21
Years of Service
User Offline
Joined: 3rd Aug 2003
Location:
Posted: 10th Dec 2003 17:40
Actualy I don't have a video card. It's integrated into my motherboard on this comp but with one object (although usualy a .x or some object I created in DB like "make object box" or something) and one 1000x1000x50x50 matrix I have NEVER had a problem getting at least 30 FPS. With my setup (which like I siad I've never had problems with) I now all of a sudden am getting between 10-15 FPS (I cna go higher but I have to lower the camera range which before I have never ever had to do). Could it be the object? When I move it off and away from the map once the map if almost out of sight the frame rate jumps to 30 (or whatever I have the sync set to at that time) so I don't think it's that....but it can't be a simple testured matrix....can it?

And why should I just grab a texture from the file? (besides it being easier to code)
Shadow Lord
21
Years of Service
User Offline
Joined: 26th Sep 2003
Location:
Posted: 10th Dec 2003 21:15 Edited at: 10th Dec 2003 21:16
Quote: "
And why should I just grab a texture from the file? (besides it being easier to code)"


This way you have loaded just one copy instead of two, cuts your memory usage in half.

I'm using DBPro to write "Suger Free Candyland", for diabetic children!
Sleet
21
Years of Service
User Offline
Joined: 3rd Aug 2003
Location:
Posted: 10th Dec 2003 22:38
and deleting the bitmap doesn't cut it?
Sleet
21
Years of Service
User Offline
Joined: 3rd Aug 2003
Location:
Posted: 11th Dec 2003 10:43
I added a couple lines of code into my main code that drops the camera range if the screen fps drops below 20, that seems to work, what's annoying though is that I still don't know why I have a problem in the first place and sometimes if I make a matrix like the one I had before, 1000,1000,50,50 and randomize it by 50 units, I can't support a camera range of even 50 units with 20fps! But if I use the same matrix and randomize it something like 2 I have no problem. I don't/didn't think that the actual height of the matrix made a difference to your vid card (or lack there of).

Login to post a reply

Server time is: 2024-11-25 20:22:56
Your offset time is: 2024-11-25 20:22:56