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.

2D All the way! / Flopping like a fish

Author
Message
Steven Craft
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location:
Posted: 16th Apr 2003 04:14
Hello there, I've been doing a few tests with Dark basic classic and seem to get very poor performance with 2D, I've tried it on 2 pc's, both are reasonably high spec, I really don't see why it should run slow, its only displaying 2 sprites, heres my code



Obviously you need the two bitmaps to be able to compile the code, but its only 20 lines and Im hoping someone could suggest why I get this unbearably bad performance,

Thankyou all for your time,

Steven John
Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 16th Apr 2003 05:38
You have the sync rate set to 30 and haven't turned on manual sync control. Try this - change the sync rate to 0 (unlimited) and put the command "sync on" after it.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
Steven Craft
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location:
Posted: 16th Apr 2003 12:01
Well.. thanks for your input, I tried your suggestion but still get rather poor performance, if I use PASTE SPRITE it runs a lot faster, but built in collisions don't work, and I have to use built in collisions for there is no way to make your own per pixel collision engine.

I tried making the exact same program in BlitzBasic and it runs at 100% speed, I can upload the two binaries and source code if anyone wants to compare it, there isn't too much more code in blitzbasic, it is a little harder though, I still have the feeling DarkBasic could be doing better, maybe it doesn't use 3dnow.

Steven John

Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 16th Apr 2003 13:02
Post a zip with the bitmaps in. Is this DB classic or DBPro?

"Gentlemen, we are about to short-circuit the Universe!"
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Apr 2003 15:15
Switch off the sprite backsave on the larger static one and see how that affects things.

SET SPRITE 1,0,0
Chaos
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 16th Apr 2003 21:39
i am useing db classic and have recently created a small 2d game on my best computer it runs extremly fast and uses sprites. I wrote it in just under 3 hours the bestthing i can think of u doing is load the images before the sync on. set your sync rate to 0. and thats about it. oh and use the cls command i find that using that in your main loop will inrease your 2d speed

Jamie

Darkworlds are all around us
most of us are still half asleep
Current project : Creature tournament
johnvn
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: United Kingdom
Posted: 16th Apr 2003 22:03
alrite steven, u mite be wonderin who iam, remember dave lavender, his m8. i have sent u an email cos we saw ur games wrkshop game in the lab and its similar to ours, cud you have a look at the email i sent u and maybe get back to me, cheers john

Login to post a reply

Server time is: 2024-04-19 22:16:27
Your offset time is: 2024-04-19 22:16:27