Open Surge Forum

A fun 2D retro platformer inspired by Sonic games and a game creation system

You are not logged in.

Announcement

Our community has moved to Discord! https://discord.gg/w8JqM7m

#1 2012-03-11 23:18:07

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

[question] object vs background - zindex

does anyone know of a way to show an object with the same zindex as a background layer?

i would like to have an object cover some background layers, since there's no way to change background in-game. Suppose there is a sunny sky and i want a star sky to show up at some point. how could we do that with the current API ?


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

#2 2012-03-12 00:35:29

So-Nick
Member
From: Brasil
Registered: 2010-03-20
Posts: 608

Re: [question] object vs background - zindex

terrible  sad


sonicknucklesemeraldsma.gif

Offline

#3 2012-03-12 03:48:36

lunarrush
Member
Registered: 2010-05-13
Posts: 278

Re: [question] object vs background - zindex

@So-Nick: Do you support the use of objects at the zindex of the background layer or don't you?  Honestly, terrible is the most terrible argument I've heard either for or against a suggestion, please be more specific so I can understand why you think it's terrible.
thanks,

-lunarrush

@Everyone: I would support this, and it would probably be good for the engine to have this anyway.  In that way, the built-in background system would not have to be changed and if a specific decoration element needed placing on the background it would not require you editing the background file in some sort of complicated manner to keep your change from repeating every time your background did, in this way backgrounds could certainly be much more dynamic, which can't hurt the game's that are built using the engine including Open Surge.


If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Offline

#4 2012-03-12 05:24:34

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: [question] object vs background - zindex

@kzr

with the current API, you can come up with a solution by placing a detached_from_camera object with zindex=0, and move it according to the camera.

the most straightforward solution for you, however, would be a change_background command, which is on the todo list.

@lunar

i'm afraid that's not possible, due to a design constraint of the engine.

Offline

#5 2012-03-12 19:55:07

svgmovement
Member
Registered: 2011-11-24
Posts: 209

Re: [question] object vs background - zindex

Hi everyone,
A change_background command would be perfect
for what I have planned for the Waterworks zone.

If there won't be a change_background command,
that would be okay, too.

EDIT (rewording): If there isn't a change_background
command in the future, I'll be okay with that, too.

Last edited by svgmovement (2012-03-12 22:20:27)


-- svgmovement

Offline

#6 2012-03-12 21:42:03

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

Re: [question] object vs background - zindex

i've used the detached+zindex 0 trick before, but it covers all the layers. So as i understood, that's the best that can be done with the current API.

What's terrible? The idea, not being able to do it, the weather... ? roll


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

Board footer

Powered by FluxBB  hosted by tuxfamily.org