Page 9 of 92
Re: Simple Tiled Implementation - STI v0.6.14
Posted: Thu Feb 20, 2014 10:42 am
by micha
You are right. My bad.
Re: Simple Tiled Implementation - STI v0.6.14
Posted: Thu Feb 20, 2014 2:21 pm
by pauljessup
Would be awesome to have it use shaders, but shaders confuse the hell out of me.
Re: Simple Tiled Implementation - STI v0.6.14
Posted: Thu Feb 20, 2014 2:43 pm
by Karai17
Shaders confuse me too, but any advanced feature such as dynamic lighting is going to require advanced knowledge. I'd recommend asking for help in #love or #opengl or do some research on Google.
Re: Simple Tiled Implementation - STI v0.6.14
Posted: Thu Feb 20, 2014 5:17 pm
by pauljessup
Maybe I don't want something that advanced. Maybe a simple tile based shading is *exactly* what I want. Look at Terraria for example.
Also, would this mean I couldn't get per tile opacity? Instead of per layer, like each tile defines it's own opacity, and then draws it at a relative level to the layers opacity? Things like that. Like, I can't change the alpha level per tile either?
I don't see the need for shaders when I want a tile based lighting. Something simple, straight to the point, interesting and unique.
Re: Simple Tiled Implementation - STI v0.6.14
Posted: Thu Feb 20, 2014 6:47 pm
by Karai17
What you are looking for is outside of the scope of both Tiled and STI. The simple answer is, if you want to do lighting, you are going to need to use shaders. Shaders can be intimidating, but if you plan to do anything useful game-wise, chances are you're going to need to learn to use them at some point. Lighting is done with shaders, be it tile based shading or otherwise.
Re: Simple Tiled Implementation - STI v0.6.14
Posted: Thu Feb 20, 2014 6:53 pm
by pauljessup
I'm sorry, but I have to disagree that tile based lighting has to be done with Shaders. I've done it otherwise. And I've done it using Tiled as a basis before, it's not outside of Tiled. It might be outide of STI, and that's okay. Nothing wrong with that, I just won't use it. Proper tool for the job, etc. But saying you have to have shaders when well, I don't and I've done it without shaders is kinda silly.
Now if you're saying that I have to have dynamic lighting that looks a certain way, isn't tile based, isn't kinda retro looking, then you would be right. But tile based lighting, where each tile is lit to a certain luminosity, does not require shaders. Something like terreria, or other retro tile based lighting system do not need shaders to accomplish what they need.
You ignored the second question- what about per tile alpha blending? Not for lighting, but for things like stained glass.
Re: Simple Tiled Implementation - STI v0.6.14
Posted: Thu Feb 20, 2014 8:05 pm
by qwook
STI should really be kept simple and adding a lighting feature that a majority of tiled users won't even use is senseless.
You can either add lighting by using shaders or drawing transparent black boxes over the tiles.
There is no reason to bloat Tiled with something you can do yourself.
As well as that, it's technologically undoable without sacrificing optimization. Spritebatches were meant to optimize use of tilesets by drawing all the tiles in one pass and then using a framebuffer/image of some sort to draw on each frame.
Don't force another developer to do essentially what is your work. Make this an opportunity to learn how to use shaders, even if it is confusing.
Re: Simple Tiled Implementation - STI v0.6.14
Posted: Thu Feb 20, 2014 8:54 pm
by Karai17
I didn't say you HAVE to use shaders, I said shaders are the right way to do it. You can brute force just about anything if you try hard enough. You can do tile based lighting with shaders, too. Give it a shot!
As for translucent tiles, as long as the translucency is part of the tile itself, then it should be fine. You can alter the opacity of layers on the fly, but not tiles.
Re: Simple Tiled Implementation - STI v0.6.14
Posted: Fri Feb 21, 2014 3:57 am
by pauljessup
LOL and now we've gone completely OT. I would argue some more (right vs wrong way, whether or not this is a brute force, etc.) but this isn't the place for this. Simple Tiled is a good library, and it's up to you what direction it goes
Re: Simple Tiled Implementation - STI v0.6.14
Posted: Fri Feb 21, 2014 4:11 am
by Karai17
I appreciate your kind words. However, there IS a right and wrong way to do some things. The right way is usually the most optimized way. Shaders were DESIGNED to do the exact thing you want to do (and more!), in a highly optimized fashion. To deny that would simply be ignorance. If I were to remove sprite batches from STI to accommodate your desired brute force method of lighting, then drawing tiles would be extremely slow and rendering your lighting would ALSO be slow. Learning how to use shaders, and harnessing the power of them is extremely important for game development, they are one of the main reasons we have dedicated GPUs!
It might also be worth noting that both Minecraft and Terraria use shaders. The simple answer here is you have some studying to do.