Simple Tiled Implementation - STI v1.2.3.0

Showcase your libraries, tools and other projects that help your fellow love users.
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Simple Tiled Implementation - STI v0.6.14

Post by pauljessup »

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
What if I wanted to move from Love into using something else? Something that doesn't involve shaders? Which is very possible. Not every environment for programming 2d would be using a 3d environment to emulate a 2d experience. It's not ignorance. Ignorance is demanding someone you don't know, and whose code you haven't even seen, that he's being ignorant for doing it in a way that works for him, and works fast enough that I still have to frame cap my rendering. That it does exactly what I want it to do, and I understand the code behind it, and that it works for me.

Also, how is it not right to use Love2d's setColor? It exists for this reason, no?
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.
I'm not telling you to do that. I was asking if it supported something like that, that's all. You said it doesn't. I was trying to end the conversation at that. I don't see any reason to call me ignorant, to insult code you haven't seen. It's not slow. I'm using it now. It's actually fast and fine. Rendering is just fine. I just won't use STL. So what? Why must everything be either or with this community?
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!
I've been programming 2d video games for 20 years now, without ever touching the GPU or shaders. I've been doing it back in the time when 3d cards were a rarity, and the idea of using 3d functions in a 2d rendering environment were anathema. Things have changed, sure. But what I want and need doesn't require shaders or GPUs. And I like that. It's not ignorance. That's like saying someone who prefers records is ignorant because they refuse to use MP3's. For a 2d forum, and a programming environment that Love's 2d, it seems odd to insist on using 3d to get something done or else I'm ignorant.
It might also be worth noting that both Minecraft and Terraria use shaders. The simple answer here is you have some studying to do. :)
The simple answer would have been, no, STL doesn't do that. That was it. I don't have studying to do. I have a method I use, I have a method that works, I like it. I'm not trying to be like a different game- I was using Terreria as an example, that's all. If they use shaders- awesome, good for them. That doesn't mean I have to. I have something. It works. It looks like I want it to look. It runs fast. It's optimized in other ways.

So, can we please drop this now and have your thread return to your library? I'm trying to be polite. Let's keep it that way and not call other people ignorant.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Simple Tiled Implementation - STI v0.6.14

Post by Karai17 »

pauljessup wrote:What if I wanted to move from Love into using something else? Something that doesn't involve shaders? Which is very possible. Not every environment for programming 2d would be using a 3d environment to emulate a 2d experience. It's not ignorance. Ignorance is demanding someone you don't know, and whose code you haven't even seen, that he's being ignorant for doing it in a way that works for him, and works fast enough that I still have to frame cap my rendering. That it does exactly what I want it to do, and I understand the code behind it, and that it works for me.
Emulate a 2D experience? what? Shaders are not exclusively a 3D thing, so yeah I'd say ignorance is a key issue here since you seem unaware of what a shader actually is or does. Ignorance is also not an insult, it is simply a statement suggesting you are unaware of or deliberately ignoring something, which is clearly true.
Also, how is it not right to use Love2d's setColor? It exists for this reason, no?
As I stated earlier, that is used when declaring a spritebatch, not during updates so it is not feasible to use it for what you want.
I'm not telling you to do that. I was asking if it supported something like that, that's all. You said it doesn't. I was trying to end the conversation at that. I don't see any reason to call me ignorant, to insult code you haven't seen. It's not slow. I'm using it now. It's actually fast and fine. Rendering is just fine. I just won't use STL. So what? Why must everything be either or with this community?
I haven't insulted you or your code, I am simply suggesting that there are in fact better ways to accomplish what you are trying to do. "Slow" does not necessarily mean "Takes 8 seconds to render a frame". STI used to be VERY slow and only drew a map in 0.002 seconds, but when I added spritebatches, it brought that down to 0.00003 seconds. If your brute force CPU rendered lighting can render in 0.002 seconds, then think of how much more efficient it would be if you used a proper shader!
I've been programming 2d video games for 20 years now, without ever touching the GPU or shaders. I've been doing it back in the time when 3d cards were a rarity, and the idea of using 3d functions in a 2d rendering environment were anathema. Things have changed, sure. But what I want and need doesn't require shaders or GPUs. And I like that. It's not ignorance. That's like saying someone who prefers records is ignorant because they refuse to use MP3's. For a 2d forum, and a programming environment that Love's 2d, it seems odd to insist on using 3d to get something done or else I'm ignorant.
Being set in your ways isn't an accomplishment. The hardware has improved immeasurably in 20 years. What used to take hundreds of dollars worth of CPU power and serious optimizations can now be accomplished with zero effort and a little poking at "new" (25 years old) technology. Your desired method is outdated and severely inefficient. You can run a single shader on the GPU and free up a whole bunch of processing time, making your game run better on slower systems.
The simple answer would have been, no, STL doesn't do that. That was it. I don't have studying to do. I have a method I use, I have a method that works, I like it. I'm not trying to be like a different game- I was using Terreria as an example, that's all. If they use shaders- awesome, good for them. That doesn't mean I have to. I have something. It works. It looks like I want it to look. It runs fast. It's optimized in other ways.
This sounds almost patently like a crotchety old man getting mad at the young kids and their rap musics. I don't know why you've been resisting shaders for the last decade or so, but it's not helping you. Learning new things, improving on old methods, that's what programming is all about! Why not take the advice of... everyone here, and maybe--just maybe!--look into some newer technologies that could make your life a whole lot easier.
So, can we please drop this now and have your thread return to your library? I'm trying to be polite. Let's keep it that way and not call other people ignorant.
Whatever floats your boat, dude.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Simple Tiled Implementation - STI v0.6.14

Post by slime »

pauljessup wrote:Not every environment for programming 2d would be using a 3d environment to emulate a 2d experience.
Shaders aren't 3D at all.

Vertex shaders are run for each vertex in something being drawn. Sprites in a SpriteBatch have 4 vertices each. A vertex shader's primary job is to take the position of the vertex in the coordinate space of the object being drawn, and transform it to be in the coordinate space of the screen (clip-space actually, but it's close enough.)
Vertex shaders also send other per-vertex attributes of the thing being drawn, such as texture coordinates and color (the same color used by love.graphics.setColor and SpriteBatch:setColor) down the pipeline to the pixel shader.

Pixel shaders are run for each pixel on the screen touched by the thing being drawn. A pixel shader's primary job is to output a color to the pixel. That's it. It can use interpolated versions of the vertex attributes sent by the vertex shader (color, texture coordinates, etc.) as well as get the color of a pixel in one or more textures, to help do that.
pauljessup wrote:Also, how is it not right to use Love2d's setColor? It exists for this reason, no?
setColor could be used, however disregarding performance and the fact that you would only be able to have per-tile lighting rather than per-vertex or per-pixel lighting, it's a rather poor choice because you cannot brighten the final result, only darken it. Bright lights and multiple overlapping lights would not look very good.
pauljessup wrote:I've been programming 2d video games for 20 years now, without ever touching the GPU or shaders. I've been doing it back in the time when 3d cards were a rarity, and the idea of using 3d functions in a 2d rendering environment were anathema. Things have changed, sure. But what I want and need doesn't require shaders or GPUs. And I like that. It's not ignorance. That's like saying someone who prefers records is ignorant because they refuse to use MP3's. For a 2d forum, and a programming environment that Love's 2d, it seems odd to insist on using 3d to get something done or else I'm ignorant.
Again, shaders aren't inherently 3D at all – and you're definitely using the GPU if you use any part of love.graphics. It doesn't do software rendering, that would be slow as molasses.

In fact, if you don't use shaders yourself then your graphics driver will probably do it for you under the hood. In LÖVE's Android and iOS (and NaCl) ports, LÖVE itself uses a default shader when none is set, because it's actually required by OpenGL ES otherwise nothing at all will work.
If LÖVE were to have a backend using DirectX10+ or OpenGL 3+, it would need to do the same as the Android and iOS ports do, since those graphics APIs require it - and they require it because they reflect how the hardware of the past decade works.
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Simple Tiled Implementation - STI v0.6.14

Post by pauljessup »

Oh hey, thanks guys for dropping it after I politely asked it to be dropped. Awesome. I think I'm going to be away from here for a little while to rethink what libraries and coding language I want to use.
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Simple Tiled Implementation - STI v0.6.14

Post by davisdude »

pauljessup wrote:That's like saying someone who prefers records is ignorant because they refuse to use MP3's.
On a side note, records have much better sound quality. Unfortunately, they are a bit on the less portable side. :P

*Yes, I am intentionally trying to derail the thread, but only from this discussion about lights.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
qwook
Prole
Posts: 40
Joined: Fri Dec 13, 2013 5:53 am

Re: Simple Tiled Implementation - STI v0.6.14

Post by qwook »

davisdude wrote:
pauljessup wrote:That's like saying someone who prefers records is ignorant because they refuse to use MP3's.
On a side note, records have much better sound quality. Unfortunately, they are a bit on the less portable side. :P

*Yes, I am intentionally trying to derail the thread, but only from this discussion about lights.
reading all the posts on this forum really hurts my fucking brain
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Simple Tiled Implementation - STI v0.6.14

Post by pauljessup »

As I stated earlier, that is used when declaring a spritebatch, not during updates so it is not feasible to use it for what you want.
And as I stated earlier, I'm not using spritebatches. I was just inquiring as to a function in your library. I said, oh, it won't work with what I want to do, cool, I'll just keep doing what I'm doing. You gave me a several page lecture on right and wrong ways. I'm not going to respond to any more than that because there seems to be a lack of communication on both our ends, and a complete misunderstanding of what I want and what you want to talk about. You're missing my points. As for learning new things and growing as a programmer- I still do that. Learning shaders does not have to be what I learn or how I grow, programming is a huge universe, I know a lot of languages, and I do it as my dayjob (not video games, that's a hobby). It's a personal decision not to learn shaders at this time, and one that I really hope you will respect and stop harping on my learning shaders .

Whatever floats your boat, dude.
Obviously you don't mean that, since you still felt the urge to respond.
Again, shaders aren't inherently 3D at all – and you're definitely using the GPU if you use any part of love.graphics.
Shaders use the 3d card, no? Since they use an OpenGL syntax. And they are OGL shaders. As for using the 3d in love.graphics- it's what is making me think that my next project (since SunSorrow's engine is complete, and I'm in the content creation stage) I will be returning to C++ and probably Allegro or some library like that, extending it with Lua like I've done in the past.
User avatar
qwook
Prole
Posts: 40
Joined: Fri Dec 13, 2013 5:53 am

Re: Simple Tiled Implementation - STI v0.6.14

Post by qwook »

pauljessup wrote:Shaders use the 3d card, no? Since they use an OpenGL syntax. And they are OGL shaders. As for using the 3d in love.graphics- it's what is making me think that my next project (since SunSorrow's engine is complete, and I'm in the content creation stage) I will be returning to C++ and probably Allegro or some library like that, extending it with Lua like I've done in the past.
Drawing images and basic shapes in Love2D uses the same card as the shader. The "3d card" as you're calling it. Love2D just draws planes in an orthographic canvas. Allegro also uses the "3d card".

You should probably look into how engines are using DirectX and OpenGL to draw 2D stuff.
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Simple Tiled Implementation - STI v0.6.14

Post by pauljessup »

Allegro has a compilation switch to remove d3d and etc.
User avatar
qwook
Prole
Posts: 40
Joined: Fri Dec 13, 2013 5:53 am

Re: Simple Tiled Implementation - STI v0.6.14

Post by qwook »

pauljessup wrote:Allegro has a compilation switch to remove d3d and etc.
nice straw-man.
it's beside the point.
Post Reply

Who is online

Users browsing this forum: No registered users and 168 guests