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 / Sprites and Memory

Author
Message
Images on DB Classic
21
Years of Service
User Offline
Joined: 2nd Nov 2003
Location:
Posted: 25th Nov 2003 04:07
I'm trying to develop an application in 2D. But I have a problem when I try to put a background on the screen. I load a very big image of 640x480 pixels, and I put it into a sprite to use it as a background. But when I make that, the program becomes slow... Is there any other way to make this without that problem? Does it help if I use an image of 8 bits instead of one with 24bits...? or just this problem cannot be avoided... I'm always try to free the memory out of the images and data I'm not using... so I don't know what else to do... Thanks.

JCRG
Travis
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location: West Aust.
Posted: 25th Nov 2003 04:35
um this really isnt my area but instead of usuing a sprite can u use just a bitmap cause u dont have to move it like an object just use it like a picture, at the start paste it down first then move ur sprites over it and it should be faster...

(i think, i havnt really gone into 2d sprites and stuff i cheat and make 3d plains)
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 25th Nov 2003 05:33
Quote: "i cheat and make 3d plains"


That's what most people do.

The Image and Sprite commands in DBC are too slow to use them with any sort of large project, you're best off just texturing a plain and positioning it directly infront of teh camera...

Also, do that with other sprites you may have on-screen. This will greatly improve your FPS and keeps the same look.

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 25th Nov 2003 08:21
paste image #,x,y
havnt had a problem with speed using that yet.


=<=Pudgie Wars=>=
Game engine: 20% = Models: 25% = Textures: 1% = Sounds/Music: 0%

Login to post a reply

Server time is: 2025-05-21 16:29:47
Your offset time is: 2025-05-21 16:29:47