Skip to main content
↑
↓
Spherical forums
Community for the
Sphere game engine
New?
Contact Us
to register an account!
1 Hour
1 Day
1 Week
1 Month
Forever
Community
Help
Search
Recent Posts
Log in
Contact Us
News
Spherical
Facebook
-
Twitter
-
Discord chat
New?
Contact us
to register an account!
Sphere Development
Sphere Support
Map/Tileset Support
map layers and transparency
1
Print
Topic: map layers and transparency
(Read 6602 times)
previous topic
-
next topic
0 Members and 1 Guest are viewing this topic.
ninjasword
Logged
Guest
map layers and transparency
June 19, 2013, 11:16:44 am
i wanted to have some nice water FX and i thot i could play with layers to get there
the idea was an opaque 'ocean floor' layer, with a partially clear paralax layer right over that, then a partially clear scrolling layer on top. these three layers would then be under a ground layer that u walk around on.
when i fill a layer with tiles that have transparent and opaque pixels, the engine renders a black layer behind that tile, and u cant see thru it to the tiles below... i think
Radnen
Big Chungus
Posts: 1,440
Sphere Studio Developer
Logged
Senior Staff
Wise Warrior
Re: map layers and transparency
Reply #1
–
June 19, 2013, 02:32:51 pm
If you fill the bottom most layer with transparent tiles, you'll see into the back buffer, which is black. As a rule of thumb only layer 1 and on should have transparent tiles. As far as your description goes, Sphere can do all that. If you use the older editor and go into the layer properties (by right clicking the layer in the layer list), you can choose for a layer to parallax.
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.
Sphere-sfml
here
Sphere Studio editor
here
N E O
Hero Poster
Posts: 585
Making it happen!
Logged
Administrator
Senior Administrator
Re: map layers and transparency
Reply #2
–
June 19, 2013, 05:11:56 pm
To build on what Radnen said about the bottom-most layer, there will also be visible tearing in most camera movement if you use transparent tiles in that layer.
DaVince
Legendary Poster
Posts: 1,001
Logged
Administrator
Used Sphere for, like, half my life
Re: map layers and transparency
Reply #3
–
June 19, 2013, 05:42:24 pm
If transparency reached all the way to your bottom layer, you're going to be seeing a mess - things might be black, as Radnen suggested, but they could as well be whatever was displayed the frame before (like a previous map, or the map's picture before any scrolling happens). So make sure your bottom most layer is always filled with opaque tiles.
That said, you can fill the bottom-most layer with a
semi-transparent
tile, and the opaqueness of said tile will fade away that mess I just mentioned. You can get some crazy effects like that, but it would really have to be a conscious choice (like if you were trying to make some Yume Nikki type game or something).
Spherical Downloads Repo
||
My (really old) Sphere stuff
ninjasword
Logged
Guest
Re: map layers and transparency
Reply #4
–
June 19, 2013, 06:21:08 pm
i guess wat was happening was i was having troubles with the tileset.... when i was testing stuff out i forgot to save the new tiles... it was causing a crash
Radnen
Big Chungus
Posts: 1,440
Sphere Studio Developer
Logged
Senior Staff
Wise Warrior
Re: map layers and transparency
Reply #5
–
June 19, 2013, 08:56:39 pm
Oh in that case you should almost always use my new editor. It
always
saves tilesets separately to stop that from happening.
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.
Sphere-sfml
here
Sphere Studio editor
here
1
Print
Sphere Development
Sphere Support
Map/Tileset Support
map layers and transparency