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 / framerate problems

Author
Message
Soy Cocktail
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location:
Posted: 22nd Jul 2004 23:48
i recently made a main menu for my game but it slows down my game to about 20 frames per second, but if i just skip to my game and leave the main menu out i get my desired 60 frames per second.

the menu system uses 2 sprites, sprite 2 is the background image and sprite 1 is for which option is selected. my code is

i cant figure out why when it goes to my game loop it is slows it to 20 frames per second

Aku Soku Zan
Wicked Immedate Slay
Slay Evil Immedately
Sparda
20
Years of Service
User Offline
Joined: 13th Jan 2004
Location: Pacifica
Posted: 23rd Jul 2004 04:38
You do not need to set the image to a sprite in every loop. Once a sprite, always a sprite. Well kinda... This would the two lines I refer to:



gl and hf
Soy Cocktail
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location:
Posted: 23rd Jul 2004 05:59
The main menu system works fine its just when i go to my main loop for my game it is slowed to 20 fps if i have it run the main menu first. If I dont run the man menu first and just go to the main game loop I get 60 fps, which makes me think that when the program moves to the main loop it isint removing the sprites or something. thanks for trying to help.

Aku Soku Zan
Wicked Immedate Slay
Slay Evil Immedately
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 23rd Jul 2004 06:30
Turn backsave off before you return to the game, somtimes it stays on after the sprites are deleted.
Or just don't turn the backsave on in the first place you proberly don't need it for a menu.

can i scream
Soy Cocktail
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location:
Posted: 23rd Jul 2004 06:43
Thanks!
I turned on backsave because I was gonna fade the sprites out to reveal the game. Fading the 1024x768 spite was to laggy and wasnt worth it so I removed the fading but frogot about backsaving. I knew it was something that got changed for the menu but didnt change back when it went to the main game loop.

Aku Soku Zan
Wicked Immedate Slay
Slay Evil Immedately

Login to post a reply

Server time is: 2024-09-22 17:35:18
Your offset time is: 2024-09-22 17:35:18