Markus_Persson
|
 |
«
Posted
2008-12-02 22:52:24 » |
|
I haven't gotten far, but here's what I've got so far: Try the applet here, but keep in mind it's pretty buggy still. Don't walk outside the map, or it will crash. WASD moves, arrow keys turns. [edit:] The completed game is available here
|
|
|
|
appel
|
 |
«
Reply #1 - Posted
2008-12-02 22:56:28 » |
|
Pretty cool effect! Only need a gun and monsters and it's DOOM3!
|
|
|
|
zammbi
|
 |
«
Reply #2 - Posted
2008-12-02 23:27:57 » |
|
Looking good. I got 2 out of bounds crashes: exp=1571, start=2, num=13415780137 exp=1571, start=2, num=13336887949 Exception in thread "Thread-14" java.lang.ArrayIndexOutOfBoundsException: -953 at G.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 2008-12-03 11:17:12:701 Get(1)=83708ms, Compute=25039ms, Upload=57478ms, Sleep=25039.0ms, Avg Compute=25039ms 2008-12-03 11:17:12:997 Get(1)=83700ms, Compute=24697ms, Upload=58499ms, Sleep=24697.0ms, Avg Compute=24697ms exp=1571, start=2, num=26775636225 exp=1571, start=2, num=26731454147
2008-12-03 11:24:13:618 No work, sleep 15 seconds. exp=1571, start=2, num=26762532710 exp=1571, start=2, num=26840883042 Exception in thread "Thread-10" java.lang.ArrayIndexOutOfBoundsException: 1049367 at G.run(Unknown Source) at java.lang.Thread.run(Unknown Source) exp=1571, start=2, num=26772519307 2008-12-03 11:25:58:901 Get(1)=10477ms, Compute=48477ms, Upload=1585ms, Sleep=48477.0ms, Avg Compute=48477ms exp=1571, start=2, num=26801975457
|
|
|
|
Games published by our own members! Check 'em out!
|
|
oNyx
|
 |
«
Reply #3 - Posted
2008-12-02 23:41:55 » |
|
Woha! O_O
|
|
|
|
Morre
|
 |
«
Reply #4 - Posted
2008-12-02 23:47:16 » |
|
Cool stuff!  Can I still use "Left 4 Kay" as I had planned?  Heh... EDIT: Way, way too fast though.
|
|
|
|
EnderGT
|
 |
«
Reply #5 - Posted
2008-12-03 00:48:45 » |
|
I haven't gotten far, but here's what I've got so far:
Very, very nice. I look forward to seeing what it looks like when its more playable.
|
|
|
|
|
quixote_arg
Junior Member   Projects: 1
Jengibre
|
 |
«
Reply #6 - Posted
2008-12-03 02:14:01 » |
|
This is 4k? Incredible!!!
|
|
|
|
|
Eli Delventhal
|
 |
«
Reply #7 - Posted
2008-12-03 03:08:35 » |
|
Really wonderful lighting effects for 4k. Bravo, seriously.
|
|
|
|
Markus_Persson
|
 |
«
Reply #8 - Posted
2008-12-03 09:46:44 » |
|
The crashes are most likely from the map borders not working.
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?
|
|
|
|
Markus_Persson
|
 |
«
Reply #9 - Posted
2008-12-03 10:28:30 » |
|
Can I still use "Left 4 Kay" as I had planned?  Heh... The more the merrier! I just wanted to claim the name, not the concept. 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Markus_Persson
|
 |
«
Reply #10 - Posted
2008-12-05 00:20:06 » |
|
Play now!It's still missing actual gameplay stuff (like losing and winning), but you can kill zombies now. =D Plus, there's film grain.
|
|
|
|
zammbi
|
 |
«
Reply #11 - Posted
2008-12-05 00:34:22 » |
|
Oh that is dam cool. So you using jasmin for this?
|
|
|
|
Markus_Persson
|
 |
«
Reply #12 - Posted
2008-12-05 00:39:37 » |
|
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. 
|
|
|
|
trembovetski
|
 |
«
Reply #13 - Posted
2008-12-05 01:13:21 » |
|
and they never run out. Damn, I should have read this first! Dmitri
|
|
|
|
|
Eli Delventhal
|
 |
«
Reply #14 - Posted
2008-12-05 03:52:19 » |
|
Wow.  This is really good. 4k. Jeez!
|
|
|
|
Abuse
|
 |
«
Reply #15 - Posted
2008-12-05 04:48:07 » |
|
That's quite stunningly good fun! It's begging for RMB to toss grenades/molotov's! Oh and groan, gun & squelch sfx 
|
|
|
|
appel
|
 |
«
Reply #16 - Posted
2008-12-05 10:26:23 » |
|
I'm having trouble running it. Exception in thread "Thread-1386" java.lang.OutOfMemoryError: Java heap space
|
|
|
|
Markus_Persson
|
 |
«
Reply #17 - Posted
2008-12-05 11:38:13 » |
|
It should allocate 1024*1024*4 bytes of data for the map, 17*16*4*12*12*4 bytes for the sprites, and 320*240*2*4 bytes for the rendering.
That's just over 5mb.. doesn't seem TOO bad.
|
|
|
|
Morre
|
 |
«
Reply #18 - Posted
2008-12-05 12:25:24 » |
|
Very cool stuff, Markus!
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.
|
|
|
|
trembovetski
|
 |
«
Reply #19 - Posted
2008-12-05 18:01:35 » |
|
BTW, a different control scheme may be a bit better: left mouse to move to pointer, right to shoot (or the other way around)..
Dmitri
|
|
|
|
|
Abuse
|
 |
«
Reply #20 - Posted
2008-12-05 21:29:11 » |
|
BTW, a different control scheme may be a bit better: left mouse to move to pointer, right to shoot (or the other way around)..
Dmitri
Though mouse only will save a few bytes in the input handling, I imagine the code required for the needed path finding to make such a control scheme work would be massive in comparison. I like it the way it is myself, and the currently free mouse button should come in handy if [undisclosed] feature fits into 4k 
|
|
|
|
appel
|
 |
«
Reply #21 - Posted
2008-12-05 22:05:43 » |
|
This is amazing!
Two things: 1. Maybe make the illuminated area around player a bit bigger (10%) 2. Scale up the screen! Can't you make it a bit larger? Seems very smallish :} 3. Add something like a grenade!
|
|
|
|
jojoh
|
 |
«
Reply #22 - Posted
2008-12-06 02:12:29 » |
|
 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! Edit: * Molotovs/fire?
YEAH!
|
|
|
|
jojoh
|
 |
«
Reply #23 - Posted
2008-12-06 03:19:53 » |
|
BTW, a different control scheme may be a bit better: left mouse to move to pointer, right to shoot (or the other way around)..
a, No, it is good as it is b, RMB is needed for the molotov 
|
|
|
|
CaptainJester
|
 |
«
Reply #24 - Posted
2008-12-06 05:09:10 » |
|
Phenominal.
|
|
|
|
EnderGT
|
 |
«
Reply #25 - Posted
2008-12-06 05:32:06 » |
|
Phenominal.
Amen. Hey Markus, wanna give the rest of us a freakin chance here?  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.
|
|
|
|
|
gouessej
|
 |
«
Reply #26 - Posted
2008-12-06 14:33:26 » |
|
Very cool stuff, Markus!
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.
Think about AZERTY keyboards too... ZQSD instead of only WASD.
|
|
|
|
Markus_Persson
|
 |
«
Reply #27 - Posted
2008-12-06 22:37:25 » |
|
Thanks for all the nice feedback, guys. =)
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
|
|
|
|
CaptainJester
|
 |
«
Reply #28 - Posted
2008-12-06 22:39:43 » |
|
Thanks for all the nice feedback, guys. =)
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.
|
|
|
|
gouessej
|
 |
«
Reply #29 - Posted
2008-12-06 23:52:37 » |
|
I like the controls the way they are. Once you get used to them it is better that way.
Please try to imagine yourself playing with an AZERTY keyboard and don't be selfish.
|
|
|
|
|