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.

Newcomers DBPro Corner / Parallax Scrolling Issues

Author
Message
CrayZemon
23
Years of Service
User Offline
Joined: 16th Jun 2003
Location: United States
Posted: 25th Jun 2003 05:27
Well, I've got basic tile scrolling down in eight directions, but when it comes to parallax scrolling in this fashion, well, hear me out.
The map for the second and closest layer is twice as big as the first one and this layer scrolls twice as fast. If there is a number other than zero in the array it will display a sprite. The sprites on this layer start to have a mind of their own and they occasionally hide the player ship, and especially the weapons it fires. Is there any way for me to set priority to the sprites of the second layer and have them displayed before the objects that are most important like the player ship. Thank you all.
"I need gopher-chucks!!"
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 25th Jun 2003 05:44
I made some graphics for a demonstration of a triple leyer parralax scroller that marc fleury put together at www.dbheaven.com if its still listed on his site.

CrayZemon
23
Years of Service
User Offline
Joined: 16th Jun 2003
Location: United States
Posted: 25th Jun 2003 05:53
Sounds fantastic. Unfortunately I couldn't find it...

"I need gopher-chucks!!"
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 25th Jun 2003 06:32
Lucky I back everything up

Here is a version but you need to use Darkedit as it uses psuedo types which can be organised back to arrays if required.

www.lunarpixel.com/temp/parallax.zip

CrayZemon
23
Years of Service
User Offline
Joined: 16th Jun 2003
Location: United States
Posted: 25th Jun 2003 06:51 Edited at: 25th Jun 2003 06:52
Unfortunately, I want to wait until I finally recieve the registered version of Dark Basic before I do anything with DarkEDIT (primarily because I have 15 uses left and I don't know how much longer I'll have to wait).
However, I did look at the stuff: the graphics and the source code. Although I'm impressed, I'm afraid that not quite the type of parallax scrolling I'm attempting to implement.

I'm currently working on a vertical shooter (that might change if I don't get this to work). The third layer the ship is flying over is an array of images that scroll slow. The second layer is an array of sprites that would be stuff like mountain tops, flying fortresses, atmosphere islands, and the like. Think Tyrian and you get the picture. These layers can be anywhere along the x-axis, but the second layer stuff seems to block out my weapons and objects. From the side the layers are supposed to look like this:

-objects----player_ship-----etc.etc.--- (sprites)

--mountain_top----flying_fortress----etc. (more sprites 2* scroll)

---land-------water-------------etc.---- (pasted images 1* scroll)

The sprites are conflicting between the first and second layers and driving me nuts. Can you help me?

"I need gopher-chucks!!"
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 25th Jun 2003 06:58
if you want 'fixed order' sprite layers you'll have to pre create ranges of sprites.


Once created (just assigned like this "sprite X,xpos,ypos,image") you then HIDE them. The this keeps the draw order static. I assume your creating or deleting sprites as you go alone. This will make chunks of your layers render in the wrong order. As DB manages Sprites in a que.

you could alway use my mappy library, or render the tiles with paste image..

http://www.DBlibraries.UnderwareDesign.com

l8r,
Kevin Picone
[url]www.underwaredesign.com[/url]
CrayZemon
23
Years of Service
User Offline
Joined: 16th Jun 2003
Location: United States
Posted: 25th Jun 2003 16:12
Sounds like a plan UWDesign. Looks like I'm gonna have to wait until the full version of the program finally arrives (yes I ordered it two days ago) until I can test it. The trial version is now running out of objects. I like your programs but I feel that they may (especially the DSprite library) kill this mosquito with a shotgun (this hasn't been officially concluded yet).
Based on your statement, If I keep ALL the sprites of the first layer (the player ships and weapons, etc.) at numbers lower than the sprite-tiles of the second layer, the que will render the sprites of the top layer first? Thanks for your contributions.

"I need gopher-chucks!!"

Login to post a reply

Server time is: 2026-07-07 02:19:15
Your offset time is: 2026-07-07 02:19:15