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! / 2d backdrops

Author
Message
Plastico
21
Years of Service
User Offline
Joined: 3rd May 2004
Location:
Posted: 15th Jul 2004 13:17
2 questions here. Is it possible to create bitmaps to a starfield and make them look as if they are off in the distance. Im guessing it involves layers to achieve this? Im using the tutorial star field as my layout for my first game(learning experience) and I wanted to achieve moons, and maybe colors in the background, and then have the stars pass through the image.

simulating a nice backdrop. A small example, or general answer will do me fine, I much rather figure it out myself, since the personal satisfaction is greater

Is it also possible to create sprites on the screen faster than the sprite 1,x,y,1
ect..?
zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 15th Jul 2004 13:49 Edited at: 15th Jul 2004 13:52
I'm not sure which tutorial you are using but - you could create sprites and set there priority to a high number to have them drawn behind other sprites.

set sprite priority spritenum, priority

set sprite priority 1,50
=====================================================================
You can use paste sprite, if you don't need to retain the collision, Also have a look at clone sprite
=====================================================================
Also sprites are faster if you turn the backsave feature off

have a look at set sprite command
if you turn off the backsave you will be responsible for clearing the screen and resrawing it each loop if the sprites are going to be moving.
=====================================================================
You may also want to look at using textured plains as it may be easier to et the effect your looking for.
=====================================================================


~zen


Igotcha
20
Years of Service
User Offline
Joined: 24th May 2004
Location:
Posted: 15th Jul 2004 21:29 Edited at: 15th Jul 2004 21:29
Don't know if that's what you need, but I just wrote something similar for my space shooter last weekend:

A 3-layer-scrollable-starfield-background made out of 4 Tiles (64x64) for each layer which are placed randomly at the start and scroll down in an endless loop with different speed for each layer - looks nice

I can post the code later when I am back at home.
Plastico
21
Years of Service
User Offline
Joined: 3rd May 2004
Location:
Posted: 16th Jul 2004 05:27
zen~

I used your set priority command and got the sprite on and everything was ok, but im still struggling to get the stars to go over the sprite.

here is the code I added.

The tutorial I used is the 2d starfield one under the DBpro tutorial section. if you need all the game code, just ask.

zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 16th Jul 2004 06:35
I'll take a look at the tut and what you have posted here. And be back in 2 licks of a stick!

And I retrieved my laptop form work, so I'm back in business with a compiler.


Plastico
21
Years of Service
User Offline
Joined: 3rd May 2004
Location:
Posted: 16th Jul 2004 08:04
thanks zen

Login to post a reply

Server time is: 2025-05-16 20:22:27
Your offset time is: 2025-05-16 20:22:27