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 Professional Discussion / my game works slower or faster on different compusters PLEASE HELP!!!

Author
Message
Dark Angel_1246
20
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 13th Aug 2004 20:01
hi,
i posted this once before and ive been away and i am starting on DBpro again and i still cant figure out why my code works slower on my new computer and faster on my old. a guy gave me a timeing code for my code but it sorta work but only on a serten value.im getting very agrevated

old com
windows me compaq
1.5 giga hz
40 giga hard drive
128 meg of ram
pentium 4

new com
windows XP packard bell
3.2 giga hz
160 gig of hard drive
512 meg of ram
pentium 4
pf usage 96.5 mb
cpu usage 0 - 1%

can some one help me with my code so it runs exsackly the same on all computers PRITTY PRITTY PLEASE ITS DRIVEING ME CRAZY.
or give me a code that should work exsackly the same on all computers and if you dont mine explaining in detail what to do. PLEASE
if some could Plaese help me solve this problem i will be very gratefull

PS my code is attached and please dont hesatate to ask something about the two computers.

Jesse Farr
BealziBob
20
Years of Service
User Offline
Joined: 9th Jul 2004
Location: The Grim North (UK)
Posted: 13th Aug 2004 20:21 Edited at: 13th Aug 2004 20:25
Hi dark angel1246,

There are many reasons why you could be having this problem.

Your graphics card is the main driving force behind speed of DBPro applications. Although your new computer may be faster it may have a slower graphics device (Inegrated Graphics?). Since you havn't said what graphics cards are in each computer I can't say wheather or not this is the case.

If you do have a better Graphics card in your new computer, try updating the drivers for it, some of the older drivers don't like DBPro.

Also, I see you are using Sync to control the speed of your program. This is the simplest form of speed control and although it can cause problems, it usually works pretty well. You have set your game code to run at 100fps, however you can only guarantee that this will work if your program runs in window mode. When using full screen mode, DBPro syncronizes with the refresh rate of your monitor. So even though you have stated 100hz as your preferred speed, if your monitor is set to 60Hz your game will run slower. If your old PC had a high refresh rate and your new one is set lower, this could explain your problem. Try setting your program to run in windowed mode and see what happens.

Overall, sync is a very dodgy way of controlling speed, and there are much better (and more complicated) methods, which will maintain constant speed regardless of FPS. I'd eliminate the above things first, and then ask for help with a better timing system.

Hope that helps

BB
dugzilla
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location:
Posted: 13th Aug 2004 20:28
What kind of video card did you have on old computer as compared
to new computer. It's almost all in your video card. I have 1.7gig
AMD with 1.5gig ram and 5200 nvidia 128 meg video card. If I take
video card out,Most games I write with dbpro won't work. I also have
800mhz 256 ram that will run all dbpro games if I install my nvidia
card in it. So it all depends on the video card. At least with dbpro.
This is one area of dbpro I don't like.
Terabyte
22
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 13th Aug 2004 23:29 Edited at: 13th Aug 2004 23:30
to more or less control the graphics speed use

then in your main loop


to get timed loops working at the right speed... instead of doing somthing like this...


...try doing somthing using the timer() command as this gets the internal time which is the same on any pc... 1000ticks to 1 second

Dark Days Software - Entering the DBPRO Competition with Operation Wolf
Dark Angel_1246
20
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 14th Aug 2004 06:48
sorry guys heres the graghics cards
old com
geforce 2 750

new com
radieon 9200

Jesse Farr
Dark Angel_1246
20
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 14th Aug 2004 06:56
my screen was set to 60hz and will only go as hi as 75hz

Jesse Farr
Dark Angel_1246
20
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 14th Aug 2004 07:11
i set both screens two 100hz and the old one is still running twice as fast

Jesse Farr
Dark Angel_1246
20
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 14th Aug 2004 07:29
im updateing my driver to the newest version now

Jesse Farr
Doom weaver
20
Years of Service
User Offline
Joined: 5th Jul 2004
Location:
Posted: 14th Aug 2004 08:47
can't you just say SYNC RATE 60 or whatever at the start of your program?
Proteus
22
Years of Service
User Offline
Joined: 4th Oct 2002
Location: The Future
Posted: 14th Aug 2004 09:22 Edited at: 14th Aug 2004 09:25
Try searching the forum for Constant Speed no matter the FPS topics, here's a nice pro way to do it



Dark Angel_1246
20
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 14th Aug 2004 10:10
i installed the driver update and didnt change a thing

Jesse Farr
Dark Angel_1246
20
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 14th Aug 2004 10:24
i tryed your code on both my coms at the same time and my old com is still runing nilly twice as fast i cant see how it could be the computer it has to have somthing to do with the DBPro.

ps my new computer is a iXtreme p826

Jesse Farr
Dark Angel_1246
20
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 14th Aug 2004 10:28
i tryed every thing yous sugested and now can someone help me with a better timeing system please

Jesse Farr
Terabyte
22
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 14th Aug 2004 11:05 Edited at: 14th Aug 2004 11:07
quick thing... save it in one or 2 posts... after that just edit them down to 1.. edit button on the side...


Judging by your graphics card...

seems that the fast machine is the speed it should be.
and the slow machine is actually a slowed down version due to the capabilites of the graphics card..

there is a limit to how fast the fps will be..

I have to say between PC's there is a little speed difference... but not more than +/-6fps usually

Please double check with this code




try that code on both pc's
check out the frame rate...

I think you will find they are the same

"has to have somthing to do with the DBPro"
I've never encountered a problem with DBPro when it comes to timings.

If you are talking about timing pauses where nothing happens and you have to check for input, that's different and that requires the use of the timer() command. Somthing that nobody seems to know about and everybody uses

but speeds and timing 'in game' are fine if you use the sync commands properly as stated above.

Dark Days Software - Entering the DBPRO Competition with Operation Wolf
MR AI
21
Years of Service
User Offline
Joined: 24th Jan 2004
Location:
Posted: 14th Aug 2004 11:09
this could be the problem i wrote a test world ran it on my computer
with 98se got 256frames ps
put xp on the same computer ran the same code got 123frames ps

me is about the same as 98
Terabyte
22
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 14th Aug 2004 11:10
[edit]


rofl!

i just noticed your code...

you said you had a geforce 2...

well so do I.. and in game i don't get much more than 60fps depending on what i'm doing and what i'm looking at and what's running.

You are asking your slow pc to do 100fps.. and you're using built in collision.. thats a recipie for slow down

Your radion might do 100... but geforce 2 wont

Check your code is efficient.. and your models... how many models do you have in view of the camera at any one time.

Dark Days Software - Entering the DBPRO Competition with Operation Wolf
MR AI
21
Years of Service
User Offline
Joined: 24th Jan 2004
Location:
Posted: 14th Aug 2004 11:14
oh forgot to say xp does use more ram but thats not all it uses
MR AI
21
Years of Service
User Offline
Joined: 24th Jan 2004
Location:
Posted: 14th Aug 2004 11:18
to test this put 98 or me on your new computer
if u realy what to see if thats the cause
Dark Angel_1246
20
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 14th Aug 2004 11:44
i used your code and on my new computer the FPS was 64 - 65
and on my old computer it was 66-67
when i put the sync rate to 75 on both my new computer stayed at 64-65 FPS and my old computer was at 83-84 FPS
and i set the sync rate on my code to 60 on both computers and i still got the same result

Jesse Farr
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Aug 2004 11:57
There are several problems with the original code:

You have 3 cameras - The default camera is just hidden behind the two that you create, and is still being rendered despite the fact that you can no longer see it.

The second part is that you're using a matrix - they are not known for their speed.

The third part is that you are relying on SYNC to get accurate speed, and this won't work where the machine you are using is not capable of reaching that rate. You need to either adjust the movement rates depending on the sync rate, or keep your movement rate constant and skip rendering for a number of frames.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Dark Angel_1246
20
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 14th Aug 2004 12:04
well i am very new at this and this is pritty much my first code and would like you two explain how i can fix this please in more detail than just saying to do this and that.

Jesse Farr
Dark Angel_1246
20
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 14th Aug 2004 12:17
if someone has heeps of time can thay rewrite my code the way it should be PLease Then ill see if it works the same on both computers

Jesse Farr
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Aug 2004 21:10
Well, it was late last night, so I didn't get the chance then, but here it is now:



I've tried to avoid making too many changes to the code
- Separated out the camera creation and setup code
- Added a simple timer check to the main loop to avoid moving the camera or syncing if the game loop is too far behind
- Added simple stats to the display that shows the render rate, and the number of movement steps that were taken by each render. Averaging each of these numbers and multiplying them together should come to approx 100, which was your original frame target frame rate
- Indentation!

I took the route of skipping rendering frames rather than adjusting movement and rotation rates to match because it was the easier route with your code.

Enjoy!

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Thade
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location:
Posted: 15th Aug 2004 13:46
Don't take it too serious (especially what I write)
But why wonder about things ?
200 Lines of code compile to an exe of astonishing 7.5 MB of size - some little Bitmaps and you have a 15.5 MB Program...
This is a world wonder in itself.
Where, what, how?
I just updated DBPro (I was one of the first buyers but I actually never used it for hundreds of reasons) to the new version. And checked the old Demos in the projects folder. Road Terrain is the one I am talking about above. This little rubbish consumes 15.5 MB of my Harddisk... and the hammer is: after the new update the good old ghosting produces a flickering on the screen when the 2 shadow textures overlap and it didn't do it before.
I wonder about nothing - and before I find more "troubles" that were put into it by doing all those "BUGFIXES", (I watch this (1 bugfix causes 10 new troubles) since several years now), I just put the cd-box back in the board... and look in some months for the next update.
Have fun with DBPro, Guys... CU
Dark Angel_1246
20
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 15th Aug 2004 21:40
thanks every body

Jesse Farr
mm0zct
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 16th Aug 2004 02:59
i may be wrong but i have a suspicion that xp prevents things from running faster than the refresh rate OR that in your ati control pannel you have an option checked which stops programs running faster than the refreshrate of the screen, something like vsync i think.

right click your desktop, select properties, go to the settings tab, click advanced, this should bring up the ati control pannel if you have it installed.

http://www.larinar.tk
AMD athlon thoroughbred 2200, 512Mb ram, 40Gb HD, ati saphire radeon 9600 atlantis w/128mb ddr ram, good creative-labs soundcard, cd-rw + dvd drives.

Login to post a reply

Server time is: 2025-05-28 05:58:03
Your offset time is: 2025-05-28 05:58:03