JavaGaming.org

July 30, 2010, 09:46:04 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
Advanced search  
Pages: [1] 2 3   Go Down
Print
Author Topic: Left 4k Dead  (Read 12263 times)
0 Members and 1 Guest are viewing this topic.
Markus_Persson
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2083


Mojang Specifications


View Profile WWW
« on: December 02, 2008, 01:52:24 pm »

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
« Last Edit: December 07, 2008, 09:05:29 am by Markus_Persson » Logged

Play Minecraft!
appel
Moderator
JGO Neuromancer
*****
Online Online

Gender: Male
Posts: 1116


I always win!


View Profile WWW
« Reply #1 on: December 02, 2008, 01:56:28 pm »

Pretty cool effect! Only need a gun and monsters and it's DOOM3!
Logged

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
zammbi
JGO Ninja
*****
Offline Offline

Posts: 705


View Profile
« Reply #2 on: December 02, 2008, 02:27:57 pm »

Looking good.
I got 2 out of bounds crashes:

Quote
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
Quote
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


Logged
oNyx
JGO Kernel
*********
Offline Offline

Posts: 2886


pixels! :x


View Profile
« Reply #3 on: December 02, 2008, 02:41:55 pm »

Woha! O_O
Logged

弾幕 ☆ eee gamesze blog
Morre
Sr. Member
****
Offline Offline

Gender: Male
Posts: 460


Apocaquatic syntomy.


View Profile WWW
« Reply #4 on: December 02, 2008, 02:47:16 pm »

Cool stuff! Smiley
Can I still use "Left 4 Kay" as I had planned? Wink Heh...

EDIT: Way, way too fast though.
« Last Edit: December 02, 2008, 02:57:15 pm by Morre » Logged

EnderGT
Jr. Member
**
Offline Offline

Posts: 98


View Profile
« Reply #5 on: December 02, 2008, 03:48:45 pm »

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.
Logged
quixote_arg
Jr. Member
**
Offline Offline

Gender: Male
Posts: 55


Jengibre Interactive


View Profile WWW
« Reply #6 on: December 02, 2008, 05:14:01 pm »

This is 4k? Incredible!!!
Logged
Demonpants
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2539


Live Engineer at ngmoco:)


View Profile WWW
« Reply #7 on: December 02, 2008, 06:08:35 pm »

Really wonderful lighting effects for 4k. Bravo, seriously.
Logged

See my work:
OTC Software


Current Project(s):
Agent: 00PK
Voodoo Vendetta
Markus_Persson
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2083


Mojang Specifications


View Profile WWW
« Reply #8 on: December 03, 2008, 12:46:44 am »

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?
Logged

Play Minecraft!
Markus_Persson
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2083


Mojang Specifications


View Profile WWW
« Reply #9 on: December 03, 2008, 01:28:30 am »

Can I still use "Left 4 Kay" as I had planned? Wink Heh...

The more the merrier! I just wanted to claim the name, not the concept. Wink
Logged

Play Minecraft!
Markus_Persson
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2083


Mojang Specifications


View Profile WWW
« Reply #10 on: December 04, 2008, 03:20:06 pm »



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.
Logged

Play Minecraft!
zammbi
JGO Ninja
*****
Offline Offline

Posts: 705


View Profile
« Reply #11 on: December 04, 2008, 03:34:22 pm »

Oh that is dam cool.
So you using jasmin for this?
Logged
Markus_Persson
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2083


Mojang Specifications


View Profile WWW
« Reply #12 on: December 04, 2008, 03:39:37 pm »

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. Cheesy
« Last Edit: December 04, 2008, 03:58:18 pm by Markus_Persson » Logged

Play Minecraft!
trembovetski
JGO Strike Force
******
Offline Offline

Gender: Male
Posts: 954


If only I knew what I'm talking about!


View Profile
« Reply #13 on: December 04, 2008, 04:13:21 pm »

Quote
and they never run out.

Damn, I should have read this first!

Dmitri
Logged
Demonpants
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2539


Live Engineer at ngmoco:)


View Profile WWW
« Reply #14 on: December 04, 2008, 06:52:19 pm »

Wow.  Shocked

This is really good. 4k. Jeez!
Logged

See my work:
OTC Software


Current Project(s):
Agent: 00PK
Voodoo Vendetta
Abuse
JGO Kernel
*********
Offline Offline

Posts: 1783

falling into the abyss of reality


View Profile
« Reply #15 on: December 04, 2008, 07:48:07 pm »

That's quite stunningly good fun!

It's begging for RMB to toss grenades/molotov's!
Oh and groan, gun & squelch sfx Grin
Logged
appel
Moderator
JGO Neuromancer
*****
Online Online

Gender: Male
Posts: 1116


I always win!


View Profile WWW
« Reply #16 on: December 05, 2008, 01:26:23 am »

I'm having trouble running it.

Quote
Exception in thread "Thread-1386" java.lang.OutOfMemoryError: Java heap space
Logged

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Markus_Persson
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2083


Mojang Specifications


View Profile WWW
« Reply #17 on: December 05, 2008, 02:38:13 am »

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.
Logged

Play Minecraft!
Morre
Sr. Member
****
Offline Offline

Gender: Male
Posts: 460


Apocaquatic syntomy.


View Profile WWW
« Reply #18 on: December 05, 2008, 03:25:24 am »

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.
Logged

trembovetski
JGO Strike Force
******
Offline Offline

Gender: Male
Posts: 954


If only I knew what I'm talking about!


View Profile
« Reply #19 on: December 05, 2008, 09:01:35 am »

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
Logged
Abuse
JGO Kernel
*********
Offline Offline

Posts: 1783

falling into the abyss of reality


View Profile
« Reply #20 on: December 05, 2008, 12:29:11 pm »

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 Grin
Logged
appel
Moderator
JGO Neuromancer
*****
Online Online

Gender: Male
Posts: 1116


I always win!


View Profile WWW
« Reply #21 on: December 05, 2008, 01:05:43 pm »

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!
« Last Edit: December 05, 2008, 01:11:02 pm by appel » Logged

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
jojoh
Sr. Member
****
Offline Offline

Gender: Male
Posts: 474


games4j.com


View Profile WWW
« Reply #22 on: December 05, 2008, 05:12:29 pm »

 Cool

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!
« Last Edit: December 05, 2008, 06:02:54 pm by jojoh » Logged

jojoh
Sr. Member
****
Offline Offline

Gender: Male
Posts: 474


games4j.com


View Profile WWW
« Reply #23 on: December 05, 2008, 06:19:53 pm »

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
 Wink
Logged

CaptainJester
JGO Neuromancer
*******
Offline Offline

Gender: Male
Posts: 1059


Make it work; make it better.


View Profile
« Reply #24 on: December 05, 2008, 08:09:10 pm »

Phenominal.
Logged

EnderGT
Jr. Member
**
Offline Offline

Posts: 98


View Profile
« Reply #25 on: December 05, 2008, 08:32:06 pm »

Phenominal.
Amen. Hey Markus, wanna give the rest of us a freakin chance here?  Grin

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  Grin

Otherwise, as stated above... truly phenomenal. The lighting and shadows, the bullet, the blood spatter, the map, the zombie "AI"... all amazing.
Logged
gouessej
JGO Kernel
*********
Offline Offline

Gender: Male
Posts: 2354


TUER


View Profile WWW
« Reply #26 on: December 06, 2008, 05:33:26 am »

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.
Logged

Markus_Persson
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2083


Mojang Specifications


View Profile WWW
« Reply #27 on: December 06, 2008, 01:37:25 pm »

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
Logged

Play Minecraft!
CaptainJester
JGO Neuromancer
*******
Offline Offline

Gender: Male
Posts: 1059


Make it work; make it better.


View Profile
« Reply #28 on: December 06, 2008, 01:39:43 pm »

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.
Logged

gouessej
JGO Kernel
*********
Offline Offline

Gender: Male
Posts: 2354


TUER


View Profile WWW
« Reply #29 on: December 06, 2008, 02:52:37 pm »

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.
Logged

Pages: [1] 2 3   Go Up
Print
 
Jump to: