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! / background

Author
Message
Ads
20
Years of Service
User Offline
Joined: 13th Sep 2003
Location:
Posted: 20th Sep 2003 21:45
Im a newbie and making a little 2d game and want to know how to put on a background image. And if so how to stop it slowing down the game.
Anyone?
Thanks
Damokles
20
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 20th Sep 2003 21:56
Look here :
http://developer.thegamecreators.com/?m=forum_view&t=16541&b=10

"Begin at the beginning, and go on till you come to the end: then stop." - Lewis Carroll
Ads
20
Years of Service
User Offline
Joined: 13th Sep 2003
Location:
Posted: 20th Sep 2003 22:01
But it slows the sprite movements down. Any tips?
Damokles
20
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 20th Sep 2003 22:05
so it's a 2D game ?

"Begin at the beginning, and go on till you come to the end: then stop." - Lewis Carroll
Ads
20
Years of Service
User Offline
Joined: 13th Sep 2003
Location:
Posted: 20th Sep 2003 22:06
yea
Ads
20
Years of Service
User Offline
Joined: 13th Sep 2003
Location:
Posted: 20th Sep 2003 22:11
so how do I stop the sprites from slowing down?
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 20th Sep 2003 22:38
The background Image.....

Load Bitmap " Your Background"

Does not slow the game down at all.


Pincho.
Ads
20
Years of Service
User Offline
Joined: 13th Sep 2003
Location:
Posted: 20th Sep 2003 22:47
ive tried tht
TheAbomb12
20
Years of Service
User Offline
Joined: 14th Aug 2003
Location: Amist the blue skies...
Posted: 20th Sep 2003 23:18
Lets see some code. Maybe theres something else you are doing that is slowing down the game. Loading a bitmap shouldnt slow the game down that much.

Those who Fight with swords get killed by those who don't
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 21st Sep 2003 02:43
turn off the sprite backsave feature and repaste your background image each loop cycle.

CTP
Ads
20
Years of Service
User Offline
Joined: 13th Sep 2003
Location:
Posted: 21st Sep 2003 15:42
Ive had to start agen for one reason or another and I load the background image the use texture backdrop 7. The game acts as though theres a bckg by slowing down but there is no image display.
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 21st Sep 2003 18:21
are you using "SET SPRITE"?
set all of your sprites like this
SET SPRITE sprite_number,0,1

This turns off the sprites backsave feature which is nothing more then a get image command and is very slow. this speeds sprites up alot, really alot.

When you add a background just redraw it each loop cycle.

heres a example(untested but you'll get the idea.)
hope it helps, CTP

load image "background.bmp",1,1
load image "spriteimage.bmp",2,1
set sprite 1,0,1
do
paste image 1,0,0
if rightkey() then inc x,1
if leftkey() then dec x,1
if upkey() then dec y,1
if downkey then inc y,1
sprite 1,x,y,2
loop
Ads
20
Years of Service
User Offline
Joined: 13th Sep 2003
Location:
Posted: 21st Sep 2003 21:35
Thanks but I dont understand the set sprite
Ads
20
Years of Service
User Offline
Joined: 13th Sep 2003
Location:
Posted: 21st Sep 2003 21:40
and where is the binary moon tut wateva that is.
?
Dent
20
Years of Service
User Offline
Joined: 18th Jul 2003
Location:
Posted: 21st Sep 2003 22:46
If you don't understand set sprite, then maybe you should be reading up a bit on it in the manual... It's a very important concept if you are going to make anything 2D in DB...

Login to post a reply

Server time is: 2024-05-05 13:15:52
Your offset time is: 2024-05-05 13:15:52