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 / Why does my game go slower after I compile to .exe?

Author
Message
hyrichter
21
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 6th Jul 2004 14:46
Ok, I finally have to ask my first question. This is driving me totally crazy! I'm building a menu for my team's FPS game, Kalepian Invasion. What I want to happen, is when the user clicks on "options" the menu slides to the left and the options menu slides in. It works really nice when I run it through the editor, but when I compile it to an .exe, it goes about a fourth the speed and looks absolutely terrible. I'm thinking it could just be my ancient video card (nVidia tnt2 pro 32mb.)

So....Could some of you test this out and see what happens when you compile it to an .exe? If it works good for you, then I won't worry about it since I'm going to be getting a new video card as soon as I can save up enough $$.

Here is the source to the menu.
http://www.hytekproductions.com/menu.zip

Thanks in advance.

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 6th Jul 2004 15:30
I just did as you asked, and I too noticed that the compiled exe seems to go a bit ( only slightly ) slower, and the movement is jerky.

I'm not sure how to ammend this, but I remember a while back about a discusion how DBC's comipled exe's run slower than when they are run through the debugger ( executed from the editor ).

I doubt it's your Video card though.

Sorry for not being much help.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Jul 2004 17:34
Yeah, your video card should be ok for DBC, I used a TNT2 quite happily with it.

Compiled exes run slower because the interpreter manages the memory footprint better than the code inside the compiled exe. Remember DBC is interpreted so nothing is really compiled, just tokenised - but when coding, DBC is in a good state of readiness for running your program, but when running an exe it's not so well prepared and the exe has to battle for resources more.


Van-B


The nature of Monkey was irrepressible!.
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 7th Jul 2004 02:21
try adjusting the sync rate that may help whether or not it will affect the .exe i dont know

Daedalus
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 7th Jul 2004 02:24
adjusting the sync rate didnt work lol. it worked fione for me apart from it flashing alot but thats a problem on my end i think

Daedalus
hyrichter
21
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 7th Jul 2004 12:23
Thanks for at least trying to help, guys. I got it to look good now with a lower sync rate. Instead of moving the menu items at the same speed which requires a high frame rate, I made it so they accelerate moving off the screen, and decelerate moving back on. You can see what I'm talking about by replacing the code in the download above with the following code.

I compiled to an .exe and it worked good, too. The rest of the game is coming along really nice, I just kinda got stuck on this part.



CornStalks
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Utah
Posted: 8th Jul 2004 01:28
hey, i havent read what the other guys said, im to lazy, but i have had that happen. I think it will work better if you compile it, and then before you run it, quit the DarkBasic Editor. its always worked for me!

dang im hot...
CornStalks
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Utah
Posted: 8th Jul 2004 01:36
yeah, i just downloaded your thing and tried it, it works just fine on my comp as long as i have quit Dark Basic. but it may be different for you computer. not that it really seems to matter though, it lookes like you took care of the problem, but i thought i would just add in my stuff

dang im hot...

Login to post a reply

Server time is: 2025-05-24 22:42:53
Your offset time is: 2025-05-24 22:42:53