Guardian [FINISHED]

Well, I am interested in how the game play is going to turn out for the game. It sort of looks Dungeon based with a bit of medieval fantasy elements. There are so much of those games out there already, that I think I would need to see a bit of game play before coming up with any names.

In short, it is kinda hard to come up with a name if all you have is a single sprite sheet.

Good progress so far. Interested to see how it all comes together…

Also: normal lighting works really well with this kind of art style. I’m doing similar low-res pixel art for a 4K game, see here to see how the lights affect my sprites. Just a thought… :wink:

My internet router is playing up at the moment, so I’m limited to java-gaming.org for some reason and can’t open the link.
I assume you mean like in Legend of Dungeon (google it if you haven’t seen it before).

Good idea. I may implement it if I can understand opengl lighting.

EDIT: Router fixed. THAT IS AWESOME. Unfortunately, I have no plans to include lighting in this game. Maybe that will change

Intresting… but do you have some kind of editing program for all the normals? I guess a simple normal map generator, which detects edges doesn’t work for this kind of pixel art :smiley:

Some info here on normal-mapping pixel art

Uh… oh!.. Okey… :smiley:
I guess people should create a normal-map editor :smiley:

That game is made with Unity. Maybe the editor comes with that. ???

EDIT: Confirmed: Unity can convert heightmaps to normal maps. Now to work out how to do that in Java…

EDIT 2: A thread on converting heightmaps to normal maps

Yes. I know… And I even know some editors which give you the ability to generate normal maps from heightmaps…

I only wanted to say, that I find this solutions more… like a work around… it would look much, much better if an artist (or even a programmer could do this) would have worked on such a normal map…

Then the editor would be able to change the normal’s direction by just swiping around with the mouse and then changing the direction the normal vectors are pointing…
So editing normals works like combing your hair ;D

And for smaller scale you could simply edit every pixel’s normal independently… I mean… you don’t have so much pixels in pixel graphics, do you? :smiley:

Some screenshots…

http://dl.dropbox.com/u/99583484/Project%2016x/Screenshots/Screenshot%202.png

http://dl.dropbox.com/u/99583484/Project%2016x/Screenshots/Screenshot%201.png

No tile textures yet. I just wanted to show off the projectiles 8).

EDIT: LOL, the projectiles travelled exactly the same distance in both screenshots. ;D

Legend of Dungeon’s article isn’t really that useful to us since he uses Unity to generate normals and calculate lighting. :wink:

For such low resolution characters you can get away with very basic normal maps, and it should be easy enough to generate them on the fly:

//for each pixel in character sprite
//convert xy to range [-1.0 to 1.0], then half the result to reduce the effect a bit
normals.xy = ( (gl_FragCoord.xy / spriteSize.xy) * 2.0 - 1.0 ) * 0.5;
normals.z = 1.0;

For things like brick walls, a more accurate normal map would be necessary.

In my 4K game the normals are hard-coded. The brick normals are easy enough since the entire background is procedural, and the character normals use the code above.

I agree that an editor would be awesome. I have been thinking of that for a bit now… :slight_smile:

EDIT: You can get an idea of how normals are generated here: (not necessarily the most efficient GLSL code…)
http://glsl.heroku.com/e#5215.13

Why not do that? :slight_smile: But I guess ideas would collide… :X But if you never try?

I have no idea how to use shaders…

[quote]I have no idea how to use shaders…
[/quote]
Why not learn? :slight_smile:

BTW: The GIF I showed earlier doesn’t use shaders, i.e. the normal lighting is all done in software (Java2D).

Why not learn? :slight_smile:

BTW: The GIF I showed earlier doesn’t use shaders, i.e. the normal lighting is all done in software (Java2D).
[/quote]
Thanks for the link, but I try to write my own code when possible, so I went to the LWJGL wiki and read through that instead. (It hurts my brain trying to turn code from a library into a function that I can use withuot all the annoying configuration. It’s much easier just to skim through source taking little bits here and there and then work out the rest)

Why not learn? :slight_smile:

BTW: The GIF I showed earlier doesn’t use shaders, i.e. the normal lighting is all done in software (Java2D).
[/quote]
Wow… great tutorials… I need to follow :slight_smile:
I’m intrested in lesson 3… I feel it :wink:

Wow… great tutorials… I need to follow :slight_smile:
I’m intrested in lesson 3… I feel it :wink:
[/quote]
Yeah, once I get my own shader code working these tutorials will be Awesome!

Thanks for the link, but I try to write my own code when possible, so I went to the LWJGL wiki and read through that instead. (It hurts my brain trying to turn code from a library into a function that I can use withuot all the annoying configuration. It’s much easier just to skim through source taking little bits here and there and then work out the rest)
[/quote]
Also be sure to check out the rest of the series; it targets LWJGL devs who would rather “reinvent the wheel” and make their own sprite renderers.

(Note: the series is still an early work in progress!)

THANK YOU SO MUCH!

(I can’t hit the appreciate button for another hour or so)

EDIT:

I was looking at the spritebatcher and I found this:

protected void checkFlush(Texture texture) {
		if (texture==null || texture==null)
			throw new NullPointerException("null texture");

		//we need to bind a different texture/type. this is
		//for convenience; ideally the user should order
		//their rendering wisely to minimize texture binds
		if (texture!=this.texture || idx >= maxIndex) {
			//apply the last texture
			flush();
			this.texture = texture;
		}
	}

This caught my attention:


if (texture==null || texture==null)
			throw new NullPointerException("null texture");

Is there a reason for that? (or is it a bug)

Sometimes I null check two or three times just to be sure. 8)

nah… typo which should be fixed now

New Monsters:

Troll Rock Smasher & Troll Rock Thrower:

http://dl.dropbox.com/u/99583484/Project%2016x/Animations/Troll%20(Basher).gif

http://dl.dropbox.com/u/99583484/Project%2016x/Animations/Troll%20(Thrower).gif

Hehehehe…