Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (590)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3
  ignore  |  Print  
  Left 4k Dead  (Read 30635 times)
0 Members and 1 Guest are viewing this topic.
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Posted 2008-12-02 21: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

Play Minecraft!
Offline appel

JGO Wizard


Medals: 51
Projects: 4


I always win!


« Reply #1 - Posted 2008-12-02 21:56:28 »

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

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

JGO Coder


Medals: 4



« Reply #2 - Posted 2008-12-02 22:27:57 »

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



Current project - Rename and Sort
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #3 - Posted 2008-12-02 22:41:55 »

Woha! O_O

弾幕 ☆ @mahonnaiseblog
Offline Morre

JGO Knight


Medals: 2
Projects: 10


I'm Dragonene on IRC.


« Reply #4 - Posted 2008-12-02 22:47:16 »

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

EDIT: Way, way too fast though.

Offline EnderGT

Junior Devvie





« Reply #5 - Posted 2008-12-02 23: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.
Offline quixote_arg

Junior Devvie


Projects: 1


Jengibre


« Reply #6 - Posted 2008-12-03 01:14:01 »

This is 4k? Incredible!!!
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #7 - Posted 2008-12-03 02:08:35 »

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

See my work:
OTC Software
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #8 - Posted 2008-12-03 08: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?

Play Minecraft!
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #9 - Posted 2008-12-03 09:28:30 »

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

Play Minecraft!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #10 - Posted 2008-12-04 23: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.

Play Minecraft!
Offline zammbi

JGO Coder


Medals: 4



« Reply #11 - Posted 2008-12-04 23:34:22 »

Oh that is dam cool.
So you using jasmin for this?

Current project - Rename and Sort
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #12 - Posted 2008-12-04 23: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. Cheesy

Play Minecraft!
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #13 - Posted 2008-12-05 00:13:21 »

Quote
and they never run out.

Damn, I should have read this first!

Dmitri
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #14 - Posted 2008-12-05 02:52:19 »

Wow.  Shocked

This is really good. 4k. Jeez!

See my work:
OTC Software
Offline Abuse

JGO Knight


Medals: 14


falling into the abyss of reality


« Reply #15 - Posted 2008-12-05 03:48:07 »

That's quite stunningly good fun!

It's begging for RMB to toss grenades/molotov's!
Oh and groan, gun & squelch sfx Grin

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline appel

JGO Wizard


Medals: 51
Projects: 4


I always win!


« Reply #16 - Posted 2008-12-05 09:26:23 »

I'm having trouble running it.

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

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

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #17 - Posted 2008-12-05 10: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.

Play Minecraft!
Offline Morre

JGO Knight


Medals: 2
Projects: 10


I'm Dragonene on IRC.


« Reply #18 - Posted 2008-12-05 11: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.

Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #19 - Posted 2008-12-05 17: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
Offline Abuse

JGO Knight


Medals: 14


falling into the abyss of reality


« Reply #20 - Posted 2008-12-05 20: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 Grin

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline appel

JGO Wizard


Medals: 51
Projects: 4


I always win!


« Reply #21 - Posted 2008-12-05 21: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!

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

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #22 - Posted 2008-12-06 01:12:29 »

 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!

Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #23 - Posted 2008-12-06 02: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
 Wink

Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #24 - Posted 2008-12-06 04:09:10 »

Phenominal.

Offline EnderGT

Junior Devvie





« Reply #25 - Posted 2008-12-06 04:32:06 »

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.
Offline gouessej
« Reply #26 - Posted 2008-12-06 13: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.

Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #27 - Posted 2008-12-06 21: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

Play Minecraft!
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #28 - Posted 2008-12-06 21: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.

Offline gouessej
« Reply #29 - Posted 2008-12-06 22: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.

Pages: [1] 2 3
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

trollwarrior1 (33 views)
2014-11-22 12:13:56

xFryIx (73 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (40 views)
2014-11-12 21:09:33

kovacsa (65 views)
2014-11-07 19:57:14

TehJavaDev (70 views)
2014-11-03 22:04:50

BurntPizza (68 views)
2014-11-03 18:54:52

moogie (83 views)
2014-11-03 06:22:04

CopyableCougar4 (82 views)
2014-11-01 23:36:41
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!