8 BIT SHOOTER

Posted By: 3run

8 BIT SHOOTER - 06/13/16 14:44

I started working on my older 8 bit game again. But since it's going to be redone fully, and it will have some minor changes, I decided to create another thread for it. The older one could be found here. I want to sell this one (hopefully). After I visited Steam store lately, and found out how many crap they sell there, I decided to give it a try grin Who knows, maybe my crappy game will make it. Game will contain some basic story:
Quote:
Main character went into the woods for camping with his friends, and they all went missing when he woke up at the middle of the night from the noises. That's all for now...


I'll post here my current progress so far.

Right now I just finished all animations for the alien, take a look at this:
Alien Animations

Sprite sheet contains:
Quote:
-idle
-walk
-shoot
-pain
-simple death
-death from the saw blade

Here is a screen for lazy ones:


Greets!
Posted By: Realspawn

Re: 8 BIT SHOOTER - 06/13/16 15:07

must have been hell to create those fine sprites laugh
Posted By: 3run

Re: 8 BIT SHOOTER - 06/13/16 15:08

Originally Posted By: Realspawn
must have been hell to create those fine sprites laugh
It took the whole day, and yet they are pretty dirty.. I guess a good artist could create them within an hour or so.
Thank you for your kind words laugh
Posted By: Kartoffel

Re: 8 BIT SHOOTER - 06/13/16 15:08

nice animations!

However the story.. not sure if it's intentional but there are so many bad movies and games with the same basic concept. It's really getting old in my opinion (and cheap).
Posted By: 3run

Re: 8 BIT SHOOTER - 06/13/16 15:11

Originally Posted By: Kartoffel
nice animations!

However the story.. not sure if it's intentional but there are so many bad movies and games with the same basic concept. It's really getting old in my opinion (and cheap).
Thank you for your kind words! Yeah, the story intentionally is going to fit that cheesy 'template' which trash movies use! grin I would like to add some humour into the game (parody).
Posted By: Realspawn

Re: 8 BIT SHOOTER - 06/13/16 15:12

All friends have tools needed to make their ship start laugh so he better find them grin hows that for a story grin
Posted By: 3run

Re: 8 BIT SHOOTER - 06/13/16 15:16

Originally Posted By: Realspawn
All friends have tools needed to make their ship start laugh so he better find them grin hows that for a story grin
Thank you for an idea! Sounds pretty nice, but I have my own story planned (if I didn't write anything in this thread, is doesn't mean that I have no story yet tongue I just want things to be more intriguing grin ).

Best regards.
Posted By: rayp

Re: 8 BIT SHOOTER - 06/13/16 18:34

R E S P E C T M A T E !

Awesome animations of your sprites really!
Posted By: 3run

Re: 8 BIT SHOOTER - 06/13/16 18:52

Originally Posted By: rayp
R E S P E C T M A T E !

Awesome animations of your sprites really!
Thank you! laugh
Posted By: 3run

Re: 8 BIT SHOOTER - 06/13/16 23:39

Work is going on (implementing basic game mechanics + weapons + visuals):


Greets!
Posted By: rayp

Re: 8 BIT SHOOTER - 06/13/16 23:42

Great!
Posted By: 3run

Re: 8 BIT SHOOTER - 06/17/16 10:08

Hi guys!

I wanted to show some progress of the game so far! Just finished player's movement, main game logic (loading, restart and score), weapons system (it's not fully done yet, f.e. the very first weapon which is called blade spitter still doesn't throw spinning saw blades and big thanks to Superku for helping me out with that 'timing' and 'VAR' problem I was facing), and some props (doors, which intentionally do not close). Not all weapons are added into the game, I'll be working on this now. Next thing after finishing weapon system and particle effects is going to be AI. Also I would like to thank txesmi, for making me this awesome shader pipeline, it really makes the game look more colourful and alive!

Here is a video:
GAME_PROGRESS_WIP_01

Here is a useless screenshot:


Best regards!
Posted By: Dooley

Re: 8 BIT SHOOTER - 06/17/16 10:19

This looks like fun!
Posted By: Superku

Re: 8 BIT SHOOTER - 06/17/16 11:23

Looks promising! The guns seem to have a nice feel/ handling to them again like in your old shooter prototypes but the weapons itself are a tad too pixelated for my taste.
Overall there are a few styles clashing with another. The drawn highly pixelated 2D guns (I like the perspective on the guns though), the 3d environment (which is fine IMO, esp. those stonewall texture approach), the static shadow maps and the soft shader flashlight shadowing.

Things you could try:
- Have a look at the RTS "8 bit armies" and their models. You could use that approach for guns (but then you'd have to design enemies in that way too, probably more time consuming).
- Have the flashlight shader put out pixelated shadows, like on an 8 step gradient (that is use the current shadow value and transform it into that).
- Disable static shadow maps (thus flat shadowing only), maybe even all dynamic shader based but pixelated lighting could work out fine and cool.

What are you planning regarding content creation? Fixed levels like Doom 1 or randomly/ procedurally generated levels maybe (with optional loot/ grinding/ exp)?
Posted By: 3run

Re: 8 BIT SHOOTER - 06/17/16 11:51

Thank you guys for your kinds words! laugh

Originally Posted By: Superku
Overall there are a few styles clashing with another. The drawn highly pixelated 2D guns (I like the perspective on the guns though), the 3d environment (which is fine IMO, esp. those stonewall texture approach), the static shadow maps and the soft shader flashlight shadowing.
Yes, I can see what you are saying man. I was planning to mix oldschool style with nowadays 'look'. F.e. I was thinking about enabling dynamic shadows from the sprites (spotlight, point lights, sun etc). But then I face a problem with lack of shader programming knowledge. So it looks like this, kind of undone and really rough. Static lights are only there, because they keep that 'shaded' feel on the surfaces, cause when it's all 'flat' it looks really empty to my eye.

Originally Posted By: Superku
Things you could try:
- Have a look at the RTS "8 bit armies" and their models. You could use that approach for guns (but then you'd have to design enemies in that way too, probably more time consuming).
I'll take a look at that game, never hear of it before.

Originally Posted By: Superku
- Have the flashlight shader put out pixelated shadows, like on an 8 step gradient (that is use the current shadow value and transform it into that).
- Disable static shadow maps (thus flat shadowing only), maybe even all dynamic shader based but pixelated lighting could work out fine and cool.
I would actually love to do this things and I would really like to have pixelated shadows out of the flashlight (and other lights too!), but as I'm not good at shaders, I can't. About soft shader flashlight, I guess I could 'fix' this by having a smaller (low res) defuse map for the flashlight. As it's just projected over the surface, pixelated bmap would help I think. I would like to mix oldschool with nowadays modern graphics like developers did in this game:
Legend of Dungeon Gameplay Levels 1-15

Originally Posted By: Superku
What are you planning regarding content creation? Fixed levels like Doom 1 or randomly/ procedurally generated levels maybe (with optional loot/ grinding/ exp)?
I'm planning to create 'fixed levels', and for a reason. The main goal is to beat the level as fast as you can while finding all secrets, collecting all items and killing all enemies, so having a good practice on the same level could be challenging. But I see that nowadays procedurally generated games are more popular.. So I guess I'll have to think again about the main concept. To stick to my original idea with fixed levels, or move on with nowadays stream/tide.

Thank you for very nice tips! laugh

Best regards!
Posted By: Wjbender

Re: 8 BIT SHOOTER - 06/17/16 13:19

float sizeoftexel=1.0/8.0;
float3 wpos=round(IN.wordlPos/sizeoftexel)*sizeoftexel;

i used that equation in unity to "pixelize"(scale) pixels, sure someone can help you ..
Posted By: 3run

Re: 8 BIT SHOOTER - 06/17/16 13:28

Originally Posted By: Wjbender
float sizeoftexel=1.0/8.0;
float3 wpos=round(IN.wordlPos/sizeoftexel)*sizeoftexel;

i used that equation in unity to "pixelize"(scale) pixels, sure someone can help you ..
Thank you! I think, I'll 'adjust' visuals when I'll something more or less playable, so I could interest someone who might help me out.

Greets!
Posted By: Anonymous

Re: 8 BIT SHOOTER - 06/17/16 18:39

It's looking awesome!
My one point about the visual style would be the lack of environment light/shadow on the hand-weapon and the lack of self-light/shadows on the hand weapon.

The environment is lit but the hand weapon doesn't change near or far from a light source. Edit-(I do not mean that the environment doesn't flat shade the whole sprite, I mean that the sprite color set doesn't change shading to faux it's shape.) -end edit. More to this is when the gun fires, shouldn't the hand-weapon receive lighting-shadowing colors and shifts for the gun blast light source?

Anyway, it looks great and I've no experience with 8-bit shooters so my points might just be out of place.
Posted By: 3run

Re: 8 BIT SHOOTER - 06/17/16 18:43

Originally Posted By: Malice
It's looking awesome!
My one point about the visual style would be the lack of environment light/shadow on the hand-weapon and the lack of self-light/shadows on the hand weapon.

The environment is lit but the hand weapon doesn't change near or far from a light source. More to this is when the gun fires, shouldn't the hand-weapon receive lighting-shadowing colors and shifts for the gun blast light source?

Anyway, it looks great and I've no experience with 8-bit shooters so my points might just be out of place.
Hey man! You input actually is very useful, I completely forgotten to add lightning while shooting (will do that right now). The weapons themselves aren't going to have any shadows unfortunately, I really would like to stick with more or less minimalistic style, but maybe my attempts aren't that successful grin

Best regards!

Edit: youtube marked my game video as 'minecraft'... what a shame grin
Edit2:
Originally Posted By: Malice
Edit-(I do not mean that the environment doesn't flat shade the whole sprite, I mean that the sprite color set doesn't change shading to faux it's shape.) -end edit
I didn't get this one to be honest. Maybe you meant something like 'bumpmapping' to 'faux it's shape', or what?
Posted By: 3run

Re: 8 BIT SHOOTER - 06/20/16 12:14

Small update:
- I rewrote weapon part once again, cause it was a bit messed up
- Removed static shadows and soft shader spotlight, what you think guys?
Quote:


Edit: I guess I could 'fake' darkness with fog around the player..

Greets!
Posted By: Kartoffel

Re: 8 BIT SHOOTER - 06/20/16 12:33

I actually liked the shadows, to be honest.
I think some lighting won't really hurt... or maybe some baked ambient occlusion.

I'm just not a big fan of this look where all the walls have the same brightness. It kind of takes away that 3d-effect.
Posted By: 3run

Re: 8 BIT SHOOTER - 06/20/16 12:36

Originally Posted By: Kartoffel
I actually liked the shadows, to be honest.
I think some lighting won't really hurt... or maybe some baked ambient occlusion.

I'm just not a big fan of this look where all the walls have the same brightness. It kind of takes away that 3d-effect.
Thank you for your reply man. Please take a look at this video, I'm just playing around with 'fog_end' value:
GAME_PROGRESS_WIP_02

Edit: yes, I know that it's too 'dark' actually I'll increase 'fog_end' value, made this video to show the basic concept.

Greets!
Posted By: Kartoffel

Re: 8 BIT SHOOTER - 06/20/16 12:44

As a way to make your levels dark it's pretty cool!

The flickering of the light (when you're not shooting) is a bit too much for my taste, I would keep
effects like this a bit more subtle.. but that's just a minor thing and my personal opinion laugh

However, it might be a bit more flexible if you used global light for the level's brightness and a pointlight at the players position.
But it doesn't really matter which way you do it.
Posted By: 3run

Re: 8 BIT SHOOTER - 06/20/16 12:50

Originally Posted By: Kartoffel
However, it might be a bit more flexible if you used global light for the level's brightness and a pointlight at the players position.
I could do that, but as I'm trying to add some old school taste into this (aside from hellish pixelated style), I decided to try it with fog, and it seems to be not that bad to my taste. As I've mentioned in 'edit' of my previous post, the way it's shown on the video is too 'dark', here how it actually may look like at the end:
Quote:
DARK LEVEL:

BRIGHT LEVEL:
I increased the 'fog_end' value, so it's a bit more 'brighter' now. For dark levels this would be the way to go I think! Maybe I could add some horror, jump scare elements into the game? grin Thank you for you feedback man! laugh


Edit: maybe I'll just go with simple 8 bit zombie shooter? grin With lowered saturation, like this:

What you think guys?

My best regards!
Posted By: Kartoffel

Re: 8 BIT SHOOTER - 06/20/16 13:12

Originally Posted By: 3run
Thank you for you feedback man! laugh
No problem, nice to see how your project is progressing.

Edit: I like both, the 'normal' look and the desaturated one. Pretty much depends on the taste you want. You could also use lower saturation when the player is severely damaged, for example
Posted By: 3run

Re: 8 BIT SHOOTER - 06/20/16 13:17

Originally Posted By: Kartoffel
Edit: I like both, the 'normal' look and the desaturated one. Pretty much depends on the taste you want. You could also use lower saturation when the player is severely damaged, for example
That's a good idea. Thank you for your time man! laugh
Posted By: Kartoffel

Re: 8 BIT SHOOTER - 06/20/16 13:56

Sorry for drowning you in suggestions smirk but theres a cheap, little trick for bringing out the shape of an unlit level a bit better.

Here's a quick example:


video

It's a simple effect that darkens a surface if you look at it at an angle.
The effect is set a bit stronger here so it's easier to see.

I like it, but it's just personal preference.
Posted By: 3run

Re: 8 BIT SHOOTER - 06/20/16 14:07

Thank you for suggestion (any of them are really welcome!), and it looks pretty nice, but too bad that I won't be able to implement this into my current pipeline by myself grin
Posted By: Kartoffel

Re: 8 BIT SHOOTER - 06/20/16 14:15

It's basically adding
Code:
Color *= dot(vViewPixelDir, vNormal);

to a shader.

(edit: you'll need to calculate those two vectors but that is just as simple)

A tiny bit more if you want to adjust the intensity and prevent issues with negative results.
But that dot-product is the idea behind the whole thing.
Posted By: 3run

Re: 8 BIT SHOOTER - 06/20/16 14:19

Originally Posted By: Kartoffel
It's basically adding
Code:
Color *= dot(vViewPixelDir, vNormal);

to a shader.

A tiny bit more if you want to adjust the intensity and prevent issues with negative results.
But that dot-product is the idea behind the whole thing.
I'll be happy to give it a try. But how and where in a shader do I declare 'vViewPixelDir' and 'vNormal'?
Posted By: Kartoffel

Re: 8 BIT SHOOTER - 06/20/16 14:41

here's an example object shader, I've marked the important parts with ***
Code:
//==========

#define ANGLE_SURFACE_DARKEN 0.75 // *** strength of the darkening effect; range [0 - 1]

//==========

const float     fAmbient; // used as per-entity brightness factor here

const float4    vecViewPos;

const float4x4  matWorld;
const float4x4  matViewProj;

//==========

const texture entSkin1;
sampler2D smpTex = sampler_state
{
	Texture = <entSkin1>;
	
	MipFilter = Linear;
	MagFilter = Point;
	MinFilter = Point;
	
	AddressU = Wrap;
	AddressV = Wrap;
};

//==========

struct VertexShaderInput
{
	float4 Position : POSITION0;
	float2 Tex : TEXCOORD0;
	float3 Normal : NORMAL; // *** contains the object space normals of the block
};

struct VertexShaderOutput
{
	float4 Position : POSITION0;
	float2 Tex : TEXCOORD0;
	float3 Light : TEXCOORD1; // *** used to store the calculated light value for the object
};

//==========

VertexShaderOutput VShader(VertexShaderInput input)
{
	VertexShaderOutput output;
	
	//
	
	float4 vWorldPos = mul(input.Position, matWorld); // transform the coordinates in two steps (matWorld & matViewProj instead of matWorldViewProj) because the world position is needed
	output.Position = mul(vWorldPos, matViewProj); // transform to the final screen-space coordinates
	
	output.Tex = input.Tex; // pass the texture coordinates
	
	float3 vPixelToViewDir = normalize(vecViewPos.xyz - vWorldPos.xyz); // *** direction vector from the surface to the camera
	
	float3 vNormal = normalize(mul(float4(input.Normal, 0), matWorld).xyz); // *** transform surface normal from object space to world space
	
	float dot_result = dot(vPixelToViewDir, vNormal); // *** get the angle ( cos(angle) ) between these vectors; both vectors in the dot product have to be normalized (length = 1)
	
	output.Light = fAmbient.xxx; // *** light (= entity brightness) is defined by ent->ambient
	output.Light *= saturate(1.0 - (1.0 - dot_result) * ANGLE_SURFACE_DARKEN); // *** apply the darkening factor with adjustable intensity; saturate() to prevent negative numbers (and numbers > 1)
	
	//
	
	return output;
}

//==========

float4 PShader(VertexShaderOutput In) : COLOR0
{
	float4 Color = tex2D(smpTex, In.Tex);
	
	Color.rgb *= In.Light; // *** simply apply the Light value recieved from the vertex shader to the texture
	
	return Color;
}

//==========

technique Tech_PP
{
	pass Pass_1
	{
		Lighting = False;
		
		AlphaBlendEnable = False;
		AlphaTestEnable = True;
		
		VertexShader = compile vs_3_0 VShader();
		PixelShader = compile ps_3_0 PShader();
	}
}

if you're already using an object shader for your level it shouldn't be too hard to implement it.

I've put the light-calculation in the vertexshader for performance reasons. It wouldn't be that much slower when it's in the pixel shader but there are way fewer vertices than pixels in your scene so it's a free preformance boost laugh

edit: it doesn't use fog though. if you're using the default shader, fog still needs to be implemented.
Posted By: 3run

Re: 8 BIT SHOOTER - 06/20/16 14:55

I'm getting some weird results, tried to integrate your code with no luck yet grin


Edit: @Kartoffel, can I PM you about this shader thing? Won't that be too much for me to ask?
Posted By: Anonymous

Re: 8 BIT SHOOTER - 06/20/16 14:55

Quote:
I didn't get this one to be honest. Maybe you meant something like 'bumpmapping' to 'faux it's shape', or what?


Not really,Bump-mapping is to change normals to cause a 3d distortion. I'm talking about more like per-frame shadow mapping. Right now the whole sprite gets a uniformed shadow. A flat shadow across the flat surface. Which just adjust the surface color by a gray-scale(or color-scale). But the shadow can make the shape pop up if using a map.

Pictures - QaD for example
From top left - Hand and Gun - Shadow map - Shadow mapped hand 100% -Shadowmapped 50%

Hand and Gun
http://i.imgur.com/AmYh425.png
Shadow map
http://i.imgur.com/2AYDYAv.png
Shadow mapped hand 100%
http://i.imgur.com/F4tt9KM.png
Shadowmapped 50%
http://i.imgur.com/Sx5eilJ.png

So you can get d-shadows with intensity by light distance and using 4 mapping per -frame you could lerp/blend (whatever) by light-source direction.

So the shadow will faux the shaped of the sprite object.
Anyway just an idea and post just for clarification sake.

Great work man !
Posted By: 3run

Re: 8 BIT SHOOTER - 06/20/16 14:57

Originally Posted By: Malice
Quote:
I didn't get this one to be honest. Maybe you meant something like 'bumpmapping' to 'faux it's shape', or what?


Not really,Bump-mapping is to change normals to cause a 3d distortion. I'm talking about more like per-frame shadow mapping. Right now the whole sprite gets a uniformed shadow. A flat shadow across the flat surface. Which just adjust the surface color by a gray-scale(or color-scale). But the shadow can make the shape pop up it using a map.

Pictures - QaD for example
From top left - Hand and Gun - Shadow map - Shadow mapped hand 100% -Shadowmapped 50%

Hand and Gun
http://i.imgur.com/AmYh425.png
Shadow map
http://i.imgur.com/2AYDYAv.png
Shadow mapped hand 100%
http://i.imgur.com/F4tt9KM.png
Shadowmapped 50%
http://i.imgur.com/Sx5eilJ.png

So you can get d-shadows with intensity by light distance and using 4 mapping per -frame you could lerp/blend (whatever) by light-source direction.

So the shadow will faux the shaped of the sprite object.
Anyway just an idea and post just for clarification sake.

Great work man !
This looks sweet. I got the idea now, but I guess I'm not going to implement this one, cause it's going to be out of place (to my taste), but it looks like a nice idea to make sprites less 'flat'. Thank you for kind words, your time and the idea man!

My best regards!
Posted By: Kartoffel

Re: 8 BIT SHOOTER - 06/20/16 14:59

@3run: frown if you'd like, I could take a look at the object shader. you can also pm me if you don't want to post the code here.

@Malice: It's a cool effect, but it would require some kind of dynamic lighting which makes things a lot more complicated :S
Posted By: Anonymous

Re: 8 BIT SHOOTER - 06/20/16 20:11

@Kartoffel if you wanted to blend sprite_s_maps to do dynamic shading yes you'd need d-light to get a source direction. But using one sprite_s_map like the example above , you can just read the value of the level shadow map under the entity and use it as the blend factor for sprite and it's sprite_s_Map.
© 2024 lite-C Forums