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 / Major DBPro Problems

Author
Message
Shady Simpson
23
Years of Service
User Offline
Joined: 15th Mar 2003
Location: United Kingdom
Posted: 25th Mar 2003 21:26
Hi,

My copy of DarkBASIC Professional is so shit!

I've had so many problems with it I just wanna give up programmin. I have now finally got it runnin and when I execute a program it is SO SLOW AND JUMPY!!!!

Does any one know why this is happenin and wot I can do to speed it up.

Please help!

p.s.(I have already downloaded Patch 4)
Speedhorn
23
Years of Service
User Offline
Joined: 6th Feb 2003
Location: United Kingdom
Posted: 25th Mar 2003 21:30
Post your computer spec, that could be part of the problem.

Ralph, Jesus didn't have wheels.
TogaMario
23
Years of Service
User Offline
Joined: 30th Jan 2003
Location:
Posted: 25th Mar 2003 21:55
That, or patch 4 could be part of the problem (along with your video card) It seems that patch 4 is picky about WHO it gives that speed boost to. Anyone with Nvidia gets a nice jump, a good few of ATI users get a jump too ... if you've got anything else, chances are you're screwed and will experience such a lag that you no longer wish to use DBPro.

P.S. This is what the alphabet would look like if Q and R were eliminated.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Mar 2003 23:16
It could literally be anything. Can you post some code?
Shady Simpson
23
Years of Service
User Offline
Joined: 15th Mar 2003
Location: United Kingdom
Posted: 27th Mar 2003 20:34
Hi,

Sorry for the delay of my reply, I haven't been able to reach a computer for a while.

First of all, em..... I dont want to make my self look stupid but, em.. I don't know my computer spec or how to find it out .

Secondly, It doesn't really matter what code I use it's just slow and jumpy.

but, Anyway. Here's a bit of code that is slow on mine:

circle 10,10,5
get image 1,0,0,16,16
cls

sprite 1,0,0,1
set sprite 1,0,1

do

cls

sync rate 50

sprite 1,x,y,1

if upkey()=1 then y=y-5
if downkey()=1 then y=y+5
if leftkey()=1 then x=x-5
if rightkey()=1 then x=x+5

loop

thanx.

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Mar 2003 20:49
That code runs ok on my PC.

An easy way to get your computer specs:
Start windows explorer.
Navigate to the following folder : C:\Program Files\directx\setup
In here you should find a program called 'DxDiag'. Double-click on it.
On the first page it shows you will find most of your computer details.
Click on the display tab to get your graphics card details.

The important bits (as far as we are concerned) are:
First page - Operating system, Processor, Memory, DirectX Version
Display page (device) - Name, Manufacturer, Memory
Display page (drivers) - Version, Date

... and of course, what DB/DBPro patch level you are running.
DangYankee
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location: United States
Posted: 27th Mar 2003 20:56 Edited at: 27th Mar 2003 21:01
Seems to works fine on my Dell 8200 XP PRO with nivida geoforce4 mx420, 512m

I am not real good at directions but will give it a go--

If you got xp office open word and go to the about and get system information or 98se right click on my computer, then properties, device manager then look for the video device.
hee hee must have posted real close ...takes me longer in my old age-- anyways there are many ways to get the information.

It's not the size of your code but how efficiently you use it!
BoB Vila
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United States
Posted: 27th Mar 2003 21:27
if you don't have a 3dcard you can try running your project in exclusive mode. This seems to do the trick for my crappy work pc.

Bobvila.com made me take off my avatar! (dunno how they found out)
GuySavoie
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 27th Mar 2003 23:16
CLS is computationally expensive for what you are doing. You are also setting a sync rate, but using automatic sync. You are also manipulating the sync rate inside your loop, which is again, computationally expensive.

Here is an alternative of what you are doing; please compare this for speed:



Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 27th Mar 2003 23:31
Or for safety, so it exits when you press escape:



The if statement defines what the escape key does, thus making it exit. By putting "esc = ESCAPEKEY()" before the while statement, if you hold in the escape key as the program starts, it'll just exit immediately.

Putting it in the while statement gives a way out of the loop.

Hang in there 8) You'll get the hang of it! Keep in mind, as well, that there are many languages out there, so if this one doesn't float your boat, consider what you don't like about it, and research one that you'll like. All languages have their pros and cons, so research well 8) Really, this is a great language for the beginner and intermediate alike... I'd say expert, too, but most of those guys already have routines that do everything in DBPro, since they have been coding so long before DBPro was around 8)

CloseToPerfect
23
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 27th Mar 2003 23:57
on my computer , cls 0, is twice as fast as just cls without the zero.

other then that it is just like I would do it.

CTP

GuySavoie
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 28th Mar 2003 20:40
DBPro automatically enables escape key processing to exit your program, so that block is unnecessary, and the final IF escape=1 condition will always be true, so it is unnecessary.


If you used the disable escapekey command, then you would need to handle it. For max efficiency, though, I would recommend this alternative approach:



Less variables, less conditionals, and faster execution.

the architect
23
Years of Service
User Offline
Joined: 6th Jan 2003
Location: United Kingdom
Posted: 29th Mar 2003 01:34
And you need the command sync on at the beginning of your prog and then set the rate and then put sync at the end of the loop!

ie

if rightkey()=1 then x=x+5

loop


should be

if rightkey()=1 then x=x+5

sync

loop


the architect
23
Years of Service
User Offline
Joined: 6th Jan 2003
Location: United Kingdom
Posted: 29th Mar 2003 01:38
You are still learning. So many things will go wrong but in the end it is one of the easiest ways to program your game!

When I got DBC I thought it was slow and shit. By p10 I thought it was shit.....................hot!!!! For thirty pounds I was jumping for joy.
But I regret my lack of faith in it and wasted months playing games when I could be writing them. No more. Perservere its worth it.

CloseToPerfect
23
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 29th Mar 2003 19:13
GuyS
when I use cls and set sprite 1,0,1 - I get 88 fps
when I use no cls and set sprite 1,1,1 - I get 6 fps
I avoid set sprite x,1,1 like the plauge.
Anyway is this a problem with my system?
CTP

CloseToPerfect
23
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 29th Mar 2003 19:30
there are so many ways to do this, and everybody is showing a different one, this is great, very friendly and helpful.



MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 29th Mar 2003 20:15
The second parameter for the set sprite command is the backsave. I found that it reduces the FPS by a large amount, and shouldn't be used... I think it saves the whole screen, as opposed to the area taken by the sprite.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!

Login to post a reply

Server time is: 2026-07-11 14:36:37
Your offset time is: 2026-07-11 14:36:37