The lighting works like this:The game area is 240x240 pixels (the rightmost panel is planned for gui stuff). For each border pixel (ie 240*4 pixels), I draw a line from the center of the view towards the target pixel. For each pixel on that line, I check if the map is of color 0x000000, and if it is, I reduce the power of the light by 50% (this provides somewhat soft shadows). Walls thicker than three pixels will remove all light.I set the light of each pixel on the line to that in a look-up-table (for speed, not for space) multiplied by the current light level.To get the flashlight effect, I have an exponential falloff in base light level based on the difference in light ray angle and player view angle.There's also a sphere of light directly around the player to help when backing into corners and so.

Then I render the area around the player, and multiply the colors by the light level.

When the player moves, I check that he isn't moving into a map pixel with color 0x000000. Zombies will use the same check.

The game is just under 2kb so far, and I still need to add

* Rotating graphics for zombies, players and bullets* Bullets* Zombies that walk towards the player* Zombie hoards that spawn a whole pile of zombies at random* Health bar + game over

Maybe, in order of importance:

* Scoring?* Some way of winning?* Blood splatter that sticks to the map graphics when killing a zombie?* Tanks? Witches? Boomers?* Four survivors you can select between with the 1-4 keys? (Blue outlines in the dark?)* Pipe bombs?* Molotovs/fire?

Not yet. It was taking far too long to build something from scratch in there, so I'm writing it in java first, then I'll port it to jasmin later on if I need additional space. There are a few pieces of code that would benefit by being moved to sub routines (JSR/RET), like the line algorithms (bullet clipping, blood splatter) and several instances of relative position calculations, so I think I should be able to shave it down a bit.

[edit:]

I've updated the applet. There are more zombies now, and they never run out.

It took me a while to realize that WASD actually directly controlled the movement. Given the sort of animation you have, I first thought you'd have W for forward, S for back, and A/D for turning. On the other hand, that wouldn't make any sense at all with the mouse aiming, so what you've got is good.

Really cool game! The atmosphere is just amazing, and gfx really adds to the game! With just some "painful feedback", maybe just flashing red screen or something when the player takes a beating it would be quite scary to play. The gameplay is maybe not so exciting after a little while. Maybe finding something or going to a specific point within a timeframe would make it more interesting so that one can not just slowly kill everything that gets close, but rather would have to take a gamble and go for it in between would be really cool. Still just seeing the guy walk around the maze with the lighting effects is quite amazing in 4k!

feedback: 1. the control system takes a bit to get used to. I'd expect 'w' to move me in the direction of the mouse cursor, 's' away, and 'a' and 'd' to strafe relative to the mouse.2. the grainy effect is rather stressful on the eyes, and I don't think it really adds anything to the environment - it's creepy enough as it is.3. we need an explosive on the other mouse button

Otherwise, as stated above... truly phenomenal. The lighting and shadows, the bullet, the blood spatter, the map, the zombie "AI"... all amazing.

It took me a while to realize that WASD actually directly controlled the movement. Given the sort of animation you have, I first thought you'd have W for forward, S for back, and A/D for turning. On the other hand, that wouldn't make any sense at all with the mouse aiming, so what you've got is good.

The controls are probably going to stay as-is (possibly moved to arrow keys though, for azerty keyboards).I don't really have time to work on this project this weekend because of Ludum Dare 13.. but after that, I'll do my very best to add some kind of explosives. =D

The controls are probably going to stay as-is (possibly moved to arrow keys though, for azerty keyboards).I don't really have time to work on this project this weekend because of Ludum Dare 13.. but after that, I'll do my very best to add some kind of explosives. =D

I like the controls the way they are. Once you get used to them it is better that way.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org