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 / Help with speeding up my game

Author
Message
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 18th Sep 2004 07:57 Edited at: 18th Sep 2004 08:00
I've been working on a little asteroids remake just for fun, but its too slow.

Here's the code: (Click on the source button)

Any suggestions?

I'm not sure how to put the media on this site!
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 18th Sep 2004 08:07
I fixed it a little take a look at the new source.
It's still too slow!
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 21st Sep 2004 06:32
no idea, but at the top, try replacing 'set display mode 1024,768,32' with 'set display mode 640,480,32'. yeah, i realize you've probably already tried that

uhh oh yeah and DarkBasic is a 3D language primarily. Not 2D. 3D. 2D slow. 3D fast.

seriously, i dunno.

[img src=http://blanky.pt-web.net/ddd.gif] >::p
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 21st Sep 2004 08:42
Have a read of my sticky up top of this thread, "How Do I speed Up My Game", all the tips are on the first post

Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 21st Sep 2004 09:04
I read the sticky and I guess I could just put the sprites on a 3d plain, but I was looking for something like changing my code around to make it more efficent. I don't see why its running so slow anyway, I mean it has to be the code because the sprites a really small.

Here's what the sprites look like:

Ship:



Laser:



Asteroid:



All I did was when the ship is turned I loaded a different image of each sprite. There are 8 positions in total. For the asteroids when their created a image is chosen by random, some are small and some are big, also a random speed is chosen.

Any help with the code would be great!
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 21st Sep 2004 09:06
I was just thinking maybe if I get rid of some of the black areas in the sprites it would help, I'll try doing that now!
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 22nd Sep 2004 05:00
Yeah, cutting down the black should help greatly.

A 200x200 image is not only double the memory of a 100x100!

(I found this out the hard way. I was messing in Paint Shop Pro 7 - I had 1GB of memory to play with, so first i made a 1000x1000 image. 115mb usage. So then I tried to make a 10000x10000 image )

[img src=http://blanky.pt-web.net/ddd.gif] >::p

Login to post a reply

Server time is: 2025-05-24 17:06:20
Your offset time is: 2025-05-24 17:06:20