In response to Schnitzelnagler
How would it be difficult for a computer to figure out? Should be as simple as: is the light reaching this tile from a hidden tile?
In response to Schnitzelnagler
Falacy wrote:
Should be as simple as: is the light reaching this tile from a hidden tile?

http://files.byondhome.com/Forumaccount/ opacity-problem-4.png

The light source is not within the player's field of view, but some tiles within the player's fov should be illuminated by the light source.
In response to Schnitzelnagler
Yea? And it should light just like that? Whats your point?
If you applied BYOND's opacity as it is now, it would look like light shining out of a blocked area.
http://www.angelfire.com/hero/straygames/ByondBugs/ OpacityLighting2.png
In response to Schnitzelnagler
Yea? And it should light just like that? Whats your point?

My point is that it's incorrect because the wall tiles should not be illuminated. Blacking out the regions you can't see, here's what it would look like: http://files.byondhome.com/Forumaccount/ opacity-problem-5.png
In response to Schnitzelnagler
Right, you wouldn't be able to see that top wall. Other then that, though, it still looks correct. So I don't get what you're saying is a problem.
In response to Schnitzelnagler
The wall shouldn't be illuminated because no light is hitting the side that the player sees.

If the light was drawn with attenuation you could use this to infer the locations of light sources within the room (or at least detect movement). If players are light sources this is very undesirable.
In response to Schnitzelnagler
That wall isn't illuminated... that's just the base color of the wall.
The wall wouldn't become solid black just because no light was hitting it. If that becomes the case, every game on BYOND will need to be completely redesigned. As I said in one of my previous posts, lighting will only increase the brightness of things, its not going to make the rest of the world darker in any way - at most it falls back to base brightness/color. Of course, there could be an option to apply darkness instead of light, but that's another story.
In response to Schnitzelnagler
The wall wouldn't become solid black just because no light was hitting it

Lighting increases the brightness of things, but without any lights everything is pitch black. With no light hitting an object it would appear black.

This would not cause problems in old games because the developer would have to enable lighting. Old games do not have it enabled so the clients would do no lighting calculations.

Of course, there could be an option to apply darkness instead of light

There isn't such a thing. Darkness is not applied, it's just the absence of light.
In response to Schnitzelnagler
Pretty much all of that is wrong. Unless you were designing some kind of horror game, where pointing your flashlight around was the only source of light, you would never want solid blackness just because there wasn't a light source. If that's going to be the case, then there at least has to be a base light source like the sun, which would still have that wall base lit at all times.
In response to Schnitzelnagler
you would never want solid blackness just because there wasn't a light source

That's absolutely what you'd want. If you didn't define a light source that's what happens.

Light sources can either have positions or be ambient. Ambient light is applied equally to all objects, this is how you'd create a minimum brightness instead of having black everywhere there isn't light.

You might want to read up on a lighting model before telling people what's right or wrong: http://www.falloutsoftware.com/tutorials/gl/gl8.htm
In response to Schnitzelnagler
That doesn't change the fact that the wall would still be lit. If the entire world is in total darkness, then its irrelevant either way. And you would want complete blackness as a lighting option, but it sure as heck shouldn't be the default.
And turning down the "sun" would be applying darkness. You may very well want other ways to apply it. Lowered point lighting for dark hole techniques, screen fading effects, etc. Applying darkness, removing light, whatever you want to call it.
In response to Schnitzelnagler
Alathon showed me an interesting 2D game engine with dynamic lighting a while back. You can see from this video http://www.youtube.com/watch?v=FMFIaxrINVU&feature=related that they implemented objects with a simple round shadow base that is scaled to whatever size you desire. I'm mystified how it knows how to shade the surfaces of the sprites.

It appears that they just assume all shapes are cylindrical, but that's a bad assumption. The alternative that springs to mind would be to have a normal vector map of the icon that indicates the direction each pixel faces. Effectively, it's like having a second icon to map the surface of the icon. The alpha component in the lighting map could indicate how much light filters through the pixel while the RGB components map to X, Y, and Z values of the normal vector.

Monaco ( http://www.youtube.com/watch?v=lFnc6Fdhs2k ) shows a tile based lighting system that seems to work well. I believe they have an in depth discussion of the lighting system somewhere on the Facebook page, but I don't have time right now to dig through the meaningless clutter that Facebook encourages in order to find it.

As for the problem of being able to see lighting through walls. I always solved this in my own dynamic lightning projects by making walls two tiles thick. It's not ideal, but it does help. Now that BYOND supports custom tile sizes and has easy large sprite support, you no longer have to have buildings where walls are twice as thick as players are tall.

A normal map could possibly take care of this problem by not displaying pixels that are facing away from the players point of view.

Honestly, I'm not convinced that this sort of system would be easier to implement than a 3D display engine. A complex proprietory lighting system would be a step sideways and not really make BYOND any more or less valuable to its community. 3D would be a step forward.

Look at Runescape (and ignore how ugly it is for a moment, I'm talking about the tech.) It's a 3D display engine, but the game is still based on 2D tiled maps with (low quality) 3D models plopped upon them. Why can't BYOND use the same sort system? Keep the tile maps just as they always were, but let us determine the plane that the map sits in and place 3D models at any position we want within the tile with the pixel_N vars and add vars for direction vector. It wouldn't be much different from isometric mode, which already requires a pixel_z var.
In response to Schnitzelnagler
Shadowdarke wrote:
The alternative that springs to mind would be to have a normal vector map of the icon that indicates the direction each pixel faces.

Normal/Light/Bump Maps would be pretty awesome.

Monaco ( http://www.youtube.com/watch?v=lFnc6Fdhs2k ) shows a tile based lighting system that seems to work well.

That looks almost exactly like the lighting systems I built for Paradise City. Its not pretty, nor is it impressive/complex enough for the BYOND developers to build directly in to the engine.

A complex proprietory lighting system would be a step sideways and not really make BYOND any more or less valuable to its community. 3D would be a step forward.

I think you have that somewhat backwards. 3D would be a complete offshoot, a step sideways. None of the current games would be much competition for new ones with fancy 3D graphics and effects. Lighting, on the other hand, would be a lot simpler to implement than everyone here is making it out to be, and with a little effort from the game developers could improve every game currently in existence - more of a step forward IMO.
In response to Schnitzelnagler
Shadowdarke wrote:
Honestly, I'm not convinced that this sort of system would be easier to implement than a 3D display engine. A complex proprietory lighting system would be a step sideways and not really make BYOND any more or less valuable to its community. 3D would be a step forward.

I agree completely. You might be interested in my recent blog post.

I'd suggest not using 3D models (at least not in the initial switch to 3D) because that really increases the complexity for both the DM developers and BYOND staff. Much of the infrastructure for a 3D display mode using 2D sprites already exists.

Falacy wrote:
I think you have that backwards somewhat. 3D would be a complete offshoot, a step sideways. None of the current games would be much competition for new ones with fancy 3D graphics and effects. Lighting on the other hand would be a lot simpler to implement than everyone here is making it out to be

As I said before, 3D graphics greatly facilitates support for advanced lighting effects. The addition of advanced lighting effects to 2D does not at all facilitate the switch to 3D. 3D graphics support also leads to many more improvements than just lighting. For this reason the addition of shadows for 2D is a complete offshoot.
In response to Schnitzelnagler
A. 3D BYOND will never exist, bringing it up pretty much negates the rest of your argument.
B. 2D lighting would be a step towards 3D just as much as 3D would be a step towards lighting. They're completely unrelated systems that can be used in combination. Most 3D games don't have dynamic lighting or shadows.
C. Why would you bother making 3D if you weren't going to use 3D models? And how would that help with lighting? You just want the fake 3D that is DOOM?
EDIT: Also, this is not dynamic lighting. If you consider that dynamic lighting, and that's what you're hoping to get out of this feature request, then I can spend 10 minutes to write you a library to do exactly that. That is just a blob of "light" in the middle of the screen, as others have pointed out. And lighting/shadows are in no way "free with 3D". They would be an entirely optional graphical system that would need to be developed.
In response to Schnitzelnagler
Falacy wrote:
B. 2D lighting would be a step towards 3D just as much as 3D would be a step towards lighting. They're completely unrelated systems that can be used in combination. Most 3D games don't have dynamic lighting or shadows.

Please read up on how 3D graphics APIs (DirectX or OpenGL) work, how they handle lighting, and how shadows can be implemented in 3D (shadow mapping is a simple and intuitive technique). You clearly don't understand this and none of my explanations have been sufficient for you. We can't properly discuss this if you don't understand how these things work.

C. Why would you bother making 3D if you weren't going to use 3D models?

Dream Maker's icon editor is sufficient for making 2D sprites but creating 3D models would require extra tools. With only supporting 2D sprites (at least initially) the development process remains almost entirely unchanged. A 3D display mode leads to many other features that are certainly useful, but currently just overcomplicate the issue.

EDIT: Also, this is not dynamic lighting. If you consider that dynamic lighting, and that's what you're hoping to get out of this feature request, then I can spend 10 minutes to write you a library to do exactly that. That is just a blob of "light" in the middle of the screen

The light source can move or its properties (color and intensity) can change and the illumination of the scene would change accordingly. That's what "dynamic" means, the effects are not prerendered. For obvious reasons a screenshot cannot show this.
In response to Schnitzelnagler
Forum_account wrote:
Please read up on how 3D graphics APIs (DirectX or OpenGL) work, how they handle lighting, and how shadows can be implemented in 3D (shadow mapping is a simple and intuitive technique). You clearly don't understand this and none of my explanations have been sufficient for you. We can't properly discuss this if you don't understand how these things work.

I think you're the one that has trouble understanding what it would take to implement these things. If there was just a button that said MAKE BYOND GAMES 3D then I'm sure they would have clicked it. DirectX may have built in support for that, and lighting, and cell shading, and depth of field, and etc times infinity - but its just like implementing the 3D in the first place - DirectX and OpenGL both support 3D, but BYOND doesn't. And if we don't use 3D models as you've suggested, then that would further negate such discussions.

Dream Maker's icon editor is sufficient for making 2D sprites but creating 3D models would require extra tools.

One of the many reasons BYOND will never be 3D. Though there are already external apps that exist for this purpose.

The light source can move or its properties (color and intensity) can change and the illumination of the scene would change accordingly. That's what "dynamic" means, the effects are not prerendered. For obvious reasons a screenshot cannot show this.

Having a black ball under my character isn't a dynamic shadow (or lighting) just because it moves around with him and/or changes "intensity". That blob of light you seem to want would be an incredibly simple feature that any developer should be able to throw together in just a few minutes using a base alpha transparent ball in a .png, and then applying icon procs to it.
In response to Schnitzelnagler
Falacy wrote:
Having a black ball under my character isn't a dynamic shadow (or lighting) just because it moves around with him and/or changes "intensity".

Lighting and shadows are implemented differently, you can have one without the other. I was talking about lighting and you're talking about shadows. I'm not sure what point you're trying to make.

In case you actually read up on any of the topics I've suggested, you should add Phong shading to the list.

Edit:
These two screenshots might make it clearer how dynamic lighting works in 3D and show that it does more than just apply a blob of light to some part of the screen:
http://files.byondhome.com/Forumaccount/lighting-1.png
http://files.byondhome.com/Forumaccount/lighting-2.png

In the first screenshot the indicated wall is dark even though it's near the light source. In the second screenshot, because of the position of the light source, one wall appears bright and one appears dark. The dark walls appear dark not because of their distance from the light source (either the distance in 3D space or the distance in pixels in the resulting image) but because of the difference in angle between the surface of the wall and the angle to the light source.

Edit #2:
For reference, here is a screenshot of the scene with no lighting effects.

This is the code that is added to create the lighting effects:

glShadeModel(GL_SMOOTH);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT1);

float[] diffuse = {1f,1f,1f,1f};
glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse);

float[] position = {light_x, light_y, light_z, 1f};
glLightfv(GL_LIGHT1, GL_POSITION, position);
In response to Schnitzelnagler
Forum_account wrote:
Lighting and shadows are implemented differently, you can have one without the other. I was talking about lighting and you're talking about shadows. I'm not sure what point you're trying to make.

The point I'm trying to make is that a bright blob on the screen, which ignores all objects, is not dynamic lighting.

> In case you actually read up on any of the topics I've suggested, you should add Phong shading to the list.

Again, that would require 3D models, or at least icon maps - or whatever we're going to call them.
In response to Schnitzelnagler
Falacy wrote:
The point I'm trying to make is that a bright blob on the screen, which ignores all objects, is not dynamic lighting.

See the edit in my last comment. The light is more than just a "bright blob on the screen, which ignores all objects". Read about the Phong shading model and you'd understand this =)

Again, that would require 3D models, or at least icon maps - or whatever we're going to call them.

The Phong shading model is used in all the screenshots I've shown. It doesn't require 3D models or whatever "icon maps" are.
Page: 1 2 3 4 5