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 / tremendous game slowdown

Author
Message
Xsniper
21
Years of Service
User Offline
Joined: 29th Dec 2002
Location:
Posted: 27th Feb 2003 01:23
Hello everyone,
I've been working on a game for the retro competition and decided to work on my 2d menu code after I got the basic game physics and engine down. Soo all this time I've been testing the game and its running great at like 160fps consistently. However yesterday I decided to start coding my menu system and have it display on screen before the game would start. The menu uses image and sprite commands to work and its all 2d on a black background. I expected this to work flawlessly and it does but with one problem. When I go to start the game from my menu code the game itself runs very very very slow. It runs at about 7 fps the entire time and never speeds back up. Even when I unload all the menu graphics and delete all the sprites that I used in the menu prior to starting the game. I'm baffled as to why the game slows down so much. I've since tested the game again by commenting out the menu code and it starts up running nice and fast as usual 160fps. However I would like to have a menu in my game, seems like a pretty important thing and shouldnt be too much to ask for. Does anyone know if this is a bug in dbp perhaps? Something related to the paste image command and then using 3d code immediately afterwards perhaps? I'm at a loss. Thanks in advance for your time.
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 27th Feb 2003 01:27
Hmm, Id just make sure your not loading all your images inside a loop, thats the only problem I could see, or cant see (no code lol).

RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Xsniper
21
Years of Service
User Offline
Joined: 29th Dec 2002
Location:
Posted: 27th Feb 2003 05:22
I'm loading all the images before the loop so its definitely not looping through reloading them a million times, also I think that would likely cause an error message if it was doing that because it would be reusing the same image numbers over and over again, although I could be wrong on that one. Its a really fluke thing, at the moment I dont really want to post any of the code because I'm pretty much keeping my retro entry a secret.

Xsniper
21
Years of Service
User Offline
Joined: 29th Dec 2002
Location:
Posted: 28th Feb 2003 04:07
I figured out my problem. It seems there is some kindof bug in dbp involving the sprite command and then using 3d code. I was using the sprite command in conjunction with my menu graphics so that I could get their width's and height's automatically and this was causing the 3d game code to run tremendously slow once it was started. When I removed the sprite commands and hardcoded in the width's and heights of the images I had no problems and my game is running at 170+ fps now.

Login to post a reply

Server time is: 2024-09-19 22:45:54
Your offset time is: 2024-09-19 22:45:54