HTML5 Game: Dead Valley

GTA Style Zombie Survival in a Randomly Generated World

I’m pleased to announce the release of my new game Dead Valley.

Play it!

It currently does not work on mobile devices, but that’s coming soon!

Here’s a video showing gameplay:

I’ll eventually write a post on the basics of how it works but for you buzzword compliant people here’s some of the HTML5 technologies I used: Web Audio, Canvas, Gradients, CSS 3D Transforms, Local Storage, Multiple CSS Backgrounds, CSS Opacity, and Web Workers.

Enjoy!

This entry was posted in Coding, Dead Valley, Games, HTML5, Javascript, Projects. Bookmark the permalink.

55 Responses to HTML5 Game: Dead Valley

  1. Jackolantern says:

    I have been playing this game all day after finding it on clay.io! This is an awesome game, and perhaps the best zombie survival game I have ever played! I just picked up ImpactJS and have been working on HTML5 game development myself. This game is definitely an inspiration, and really shows off what HTML5 can do!

  2. Chris says:

    Awesome game! It’s like a simpler version of Day Z (arma2). Wish there was more games like this. I’m surprised this game isn’t getting more attention on more websites, b/c it should be!

    In the mean time, any word on a part 2? Or more updates? I need moar please!

    • doug says:

      Thanks so much!
      Recently I’ve been adding touch controls for tablets and I’m considering adding multiplayer for part 2 if there’s enough interest. :)

      • Hey, Doug!

        I really like DV! What about a 2nd part?

        And: I found a few bugs. Here they are:

        1: Sometimes the gun is filled up with ammo, but I cant shoot.

        2: Sometimes the flashlight isn’t working.

        3: Some heeaaaaavy graphic errors! *feels a bit angry*

        Errr… What about adding an easteregg? And, if possible, please let a police station somewhere REACHABLE! Once, I found one, just some meters away from the start. But, this takes out the fun, i think. True, eh?

        Annnnd….. can you add an editor? So people can upload their maps if there will be a pt. 2. And if there will be a part 2… No, making it better than the 1st is hard… Fix some bugs, add something new… Would be cool if you’d make a MP mode!

        • Ah, forgot one thing.

          Is the siren of the copcar toggable?

          Would be nice if you could atract Zombies this way, and then (Another Suggestion) let us shot out of the car! *grin*

          • And another thing!

            Why are the Zombies able to attack and kill me when I’m inside a house? If possible, please fix this. THis gives us a chance to use Houses as safehouses. (The Last Stand Union City… Played it once? Could give you some suggestions. :) )

        • doug says:

          Hey Jack! Thanks!

          What browser are you using? I haven’t seen those bugs before.

          The whole world is randomly created so sometimes you can find the police station closer or further away.

          I do have an editor that I wrote for creating map sections but it’s kind of flakey :) I didn’t put a lot of work into it since I was the only one who used it.

          I would love to figure out a way to support modding and custom maps. I’m also toying with multiplayer!

          The siren is not toggable, but that would be cool.

          The zombies only attack the house you’re in if they saw you go into it :) So if you can sneak into a house without being seen you’ll be safe. This was intentional! Otherwise the game would be too easy :)

          • Doug,

            I’m using Firefox, Opera and Safari on Mac OS X v10.6.8 … Happens also on other computers with different Browsers and OS’s…

            Another Suggestion: What about let the player shoot with both pistols if he’s got two? double the amount of HP the zombie is loosing… And make both guns loose ammo, not just the one you’re shooting with (Remember: You’ve got 2 of them!)

          • Dawisio10 says:

            Or what about making only 25% of them safehouses? c=

  3. Another one… (Got loaaads of Suggestions!)

    What about adding a backpack? So the inventory space is increased, make the player able to carry more items.

    And: If the player opens the inventory, let the game pause…. So he/she can switch the guns… Or reload. It’s a bit stupid to run around with empty guns, seeing a zombie, have to reload/switch the guns and.. Well, you’re dead! Baaaad thing!

    See ya, gonna play DV. Maybe I’ll add some more suggestions…

    JC

  4. And, it would be nice to have a few more guns than the Pistol, Mossberg and Remington…. Maybe a SMG, or (hard to find) a flamethrower? :)

  5. And another thing: What about being not the only man in the world, but to have some compagnions? And: Choose skills, for example you’d be able to fix a damaged car, or … (Well, i cant find anything else….)

  6. And ANOTHER thing!

    What about adding kevlar vests?

  7. Jacob says:

    It’s me again, got another one! If it’s possible, increase the cars fuel when you find them…. In the vid and the game it looks like there are 85% out of fuel…

  8. Tedankhamen says:

    Wicked game! I’ve been hooked for 3 days. Finally survived the 3 day challenge with 20 minutes to spare (!)
    Besides great programming, the thought that went into this is evident. It’s like Day Z for Commodore 64 (that’s a compliment).

    You are a star!

    Some bugs –
    I had two piles of bullets side by side, of 13 and 42 bullets. They suddenly became 1432 bullets. Saved me ever looking for bullets…

    I’ve had some trouble fueling, from pump to car , oilcan to car, and car to car. You might want to tweak fueling range.

    Otherwise, I am a huge fan. Keep up the good work.
    Some ideas for version 2:
    Grenades – Long time to throw, easy to drop at your feet, make a big boom. Take up one slot each.
    Uzi/Ingram – Low damage, fast shots, big clip. Easy to eat up ammo, false sense of security. Three slots.
    M16/Ak – Medium damage, decent clip, draws Zs like flies. Takes up 6 slots.
    Adrenaline shot – Takes up one, doubles walking speed, maybe makes 1/2 wound. Useful when running from a horde at night.

    Maybe also bandits? They stand still, shoot wildly in your direction with the .45. Run away or gun em down.
    Survivors to rescue?

    • doug says:

      Thanks! I’m glad you like it. Also, thanks for the bug reports/suggestions!
      I love the idea of Bandits, would be awesome if I could get them to drive too, an interesting AI challenge.

      • Tedankhamen says:

        Hey again Doug,

        Still hooked on Dead Valley. Just found the Hotdog stand, so besides the Copshop and Gas Stand, I’ve started looking around to see whatever else you’ve hidden in there.

        Just had an idea for an easy addition to your game. Make a Survival mode, with the spawn chance and size of zombies doubling every day. See how long you can survive before running for it or being dragged down.

        This game can either be 1) a great CV addition for you if you’re looking for gaming / programming work. I know someone at EA in Canuckistan, I’d pass the link along. 2) If you could get Armor Games or some place like that behind you, you could develop a paying version with all the whistles and bells. Just PLEASE keep the original up!

        Anyway, thanks again and I’ll surf around your site to see what you’re at.

        Tedankhamen

        • doug says:

          Hi Tedankhamen,
          Glad you’re enjoying it!
          I like the idea of Survival mode. Gives more incentive to get moving!
          By all means please pass the link along! :) The more the merrier

          Thanks!
          Doug

  9. Fr O Flaherty says:

    Still playing yer blessed game!
    Just found the wrench. Very rare, very useful.

    Also, had a big bug. My van blew up, then I became a ghost who could pass through houses and trees. In fact, couldn’t enter houses anymore and got ate.

    Then trees started spawning in the middle of the road.

    Weird.

    Bless you my son.

  10. Tedankhamen says:

    Hey again Doug,

    I just had an epiphany. The one thing Dead Valley NEEDS, not just a suggestion, is a drop box for items. There have been times where I’m stranded on foot and I’ve wanted to switch weapons or grab a gas can but couldn’t or had to run to a house or car to get more inventory spaces.

    Anyway, keep up the great work!

    TED

  11. Dawisio10 says:

    Dear Doug, if you going to make version2 then I could give you some suggestions c=
    More weapons:
    Ak-47 Medium damage, 30 ammo clip and you can find what ammo it haves in another games =P
    M4a1 Medium damage, 30 ammo clip
    Desert eagle medium-heavy damage , 7 ammo clip.
    USP 45 Light-medium damage, 12 ammo clip.
    M16 Medium damage, 20 ammo clip.
    Machete Medium damage.
    Change able skin:
    Soldier, S.W.A.T, Cop,Survivor (Male, becase I think in first part its like you got female skin o.o), Survivor (Female), (Note: That maybe will be usefull to MultiPlayer if you will make, and you will maybe can select job, thats why I telling about that outfits) and idk.
    More vechicles:
    Motorbike, sportcar (with roof), sportcar (without roof), bus,van, (To cars will can enter max.5 ppl and to bus like… Idk 15? I telling just to multiplayer ^.^) Hummer, Army car, S.W.A.T truck, taxi (in city).
    Other:
    Map, more buildings like: Police stations, Army base (Will be hidden, and will be hard to find on map because in base we can find weapons and MRE, but when we will start as soldier then we will got: M16, glock or usp.)
    and citys, like forest places (Because not everywhere the place is supposed to be an desert right?).
    More zombies:
    Zombie dogs, S.W.A.T zombie, police zombie, soldier zombies, random zombies (male and female .-.)
    —————————————————-
    Thats all, hope you will add some of my ideas, thanks.

    ~Cheers, Dawisio10

    • Dawisio10 says:

      Ps: I founded bug… I was running to car on start and when I entered it an second one at it appeared (That happened on Google Chrome .-.)

    • eduardo says:

      and see what on the buildings not just enter and see what have on it explore it helicopters

  12. CMcGregor says:

    Keep up the great work, Doug! My school is depending on you! I got them all addicted (About 70 of them, even women?!!?!?!?!?!?) and they kept asking me if I knew you, so this reply goes out to you. They also asked me if you could plan a multiplayer? It doesn’t have to be massive, but the idea keeps bugging me. I hope this post gets to you and the game keeps on spinning with great ideas, not to mention a backpack or some inventory upgrade? Doesn’t matter, we are making our own challenges, such as survive as long as you can, best record being 8 days in a hot dog shack!?!?!? Anyways, keep up the great work!!!!

  13. Markgraf says:

    Complaints:
    The graphical tiling is awful. When moving I can often see gaps of gray between the tiles.

    Very bad FPS issues. If I’m not just driving alone down the road I lose about 10-25 fps off the normal 43ish. This is using Firefox and a computer that can run Dishonored.

    Resume feature doesn’t work. I have had it actually resume my game 1 out of approx 9 tries. Of course this is counting the game actually showing anything other than a blank screen as working because the only time it did so I was placed in the wrong place with fewer objects around me than when I saved and rather than on a road I was in the middle of the desert for about 5 miles on either side.

    Items appear to not work at all or at least not as intended. After confirming the instructions on how to use the siphon I have found that I cannot under any circumstances siphon any gas from any vehicle. The tool just stays selected rather than ever switching to the fuel line.

    Collision detection is very poor. I don’t feel I need to explain this further, neither do I believe it to be a big issue.
    Driving controls are either unresponsive or too responsive. I’ve never found a happy medium– I’m either flying off the road because I dared tap the A or E key or smashing into cars while jamming the keys down so hard I feel my keyboard should be broken by now.

    Thoughts on the game itself:
    Other than stopping to explore (which I do understand and did enjoy to some extent) there is no motivation for the player to ever leave a vehicle if not refueling. Shooting zombies just serves to summon more zombies and potentially lose health and resources.

    Speaking of resources, having zombies attack me when I try to loot houses isn’t fun. My only two options to be engaged with this game are to drive toward my goal, and find resources so if I have a chance to be attacked and lose resources (health and ammunition) only to find the majority of houses are empty I’m going to ignore houses and drive, and that’s boring.

    The mile counter decrements too slowly. We both know driving 150 miles wouldn’t take 3 days straight and furthermore I am very discouraged to play the game when my only indication of meeting my objective gives me so little positive feedback. If the distance were increased to, say, 1500 miles and the counter decremented 5 or 10 times faster I’d feel a little more like I was doing something. Speaking of how slowly we travel 150 miles, why does a car run completely dry after only maybe 10 or 20 miles driven? I certainly wouldn’t drive that car. Again, up the distance and it makes sense.

    Parked cars (like police cars outside the station) should have a minimum amount of fuel in them. Nobody drives their car to work with exactly the amount of fuel to get there.

    All said, this feels more like a very rough alpha project and less like a game. If I had to pick a point to stress the most to you it would be my above issues with the game’s current pacing.

    • doug says:

      If you use Safari or Chrome this performance and bug issues you describe are fixed. There is a warning on the main menu.
      The harsh reality of HTML5 game development is that the performance profiles are very different between browsers. I focused on Chrome and Safari and getting it to work at all in Firefox was a bonus.
      As for your other complaints, this is just a game, not a simulation. Yes driving 150 miles doesn’t take three days in real life, but a game day is only 20 minutes long :)
      Go ahead ant try escaping without scavenging anything, I’d love to hear it if you make it!

      • Markgraf says:

        http://i.imgur.com/4C8wV.png

        I call it the Bean’s ‘n’ Glock strategy. In the pictured run I skipped all houses, police stations and all gas stations (I made use of only one fuel pump) with no consequences at all.

        I decided to try the game on Chrome and it fixed a large number of my complaints from the previous post. I still found the driving controls to be pretty whonky, though.

        I think having an energy or stamina system that requires the player to eat maybe as little as once a day could add some interesting choices to the game. For example, the system could dictate that driving requires the least amount of energy, then walking along roads, then finally wandering the open desert depletes stamina fairly quickly. Having 0 stamina left would lower the walking speed of the player (so that zombies can actually catch us) and eventually the player would starve. I could see scenarios like “I’ve got 2 1/2 hearts left but my stamina is getting low so maybe I should stop and check that house for beans” happening. Along with this, I propose a new building type “Super Market” where we have a few cars scattered about the parking lot and when looted it produces food more often than other supplies.

  14. Q Ninja says:

    how do you use the siphon?

    • doug says:

      Touch the car you want to siphon gas out of, right click the siphon to activate, then press and hold the left mouse button on a nearby car or gas can in your inventory to transfer fuel.
      If a car is close enough to transfer fuel it will glow while your mouse cursor is over it.

  15. Jayce T. says:

    This is THE BEST online zombie game I have played. Seriously. Being able to explore a vast world in your little car, that you constantly fill and store stuff in. I love managing your inventory, sitting scared at night in a house, and mowing down zombies! I highly praise you for this accomplishment!

    I have a few ideas that I think would really add to Dead Valley, if you like them:
    A. Npcs, quests, and companions. I think it would be cool if at random places you could find npcs that you can either trade with, do quests for, or have them team up. Let’s say you really needed fuel, and there is an npc who wants 9 shotgun shells and 2 cake for some gas. Maybe, a quest might be rescuing another npc, hunting down zombies, getting an item, refueling their car, or so on. It would also be cool if npcs would join up with you. They would have a weapon, and follow you around. If they got hurt, you could give them food and also ammo or trade weapons.
    B. Multiplayer. I know this has been suggested a lot, but it would be cool if four friends or so could get together! Left 4 dead! I wouldn’t want it to become MMO, but maybe just a thing were you sign in with a few friends.
    C. More weapons and items. Duh, that’s really obvious and been highly suggested. It’d be nice to increase the stuff you could get.
    D. Biomes. Add asthetic appeal to the game. For example, forests, mountains, cities, SNOW!!! RAIN!!! etc.
    E. More cars. Tanks would be awesomely op. a motorcycle would be really fast, but low gas, no storage, and easy to get knocked off. A helicopter would be awesome. Maybe atvs or jeeps that don’t take damage driving off road.
    F. Hunger/stamina. It would add more strategy, if done right. If you add hunger, don’t make it a really huge deal, because then the whole game focuses on eating and not exploring, looting, and fighting. Stamina might be used in more melee weapons like swords, used to RUN, and such.
    G. More game modes. Instead of just the basic 150 miles, you should be able to also survive, sandbox, quests, campaign, whatever.
    H. IMPORTANT. if you are planning to continually update the game and add more stuff, A SUGGESTION box on the bottom of the webpage would be awesome…
    I. Easter eggs. ‘Nuff said.

    • doug says:

      Thanks so much!

      Great suggestions. I have a few ideas up my sleeve, I have to decide what I want to do next. I have been playing around with multiplayer but it is a lot of work.
      As for Easter eggs, did you find the Hotdog Stand? :)

      • Jayce T. says:

        Actually, I did. I was like “Whoa, that’s an awesome change to all the houses!” All I found in it though was a can of beans, if I remember correctly.
        I can’t wait for what you’re going to do next! I’m crossing my fingers.
        Thanks.

      • ian says:

        i saw the hotdog stand :D great game btw :) found it on the zombie website is very good love playing this and project zomboid :P was wondering if i could add to my website and if u gonna be making any more or updating would be cool if you could add other survivors u could team up with too would be cool :P

        • doug says:

          Thanks! You want to add a link to the game on your site? Go for it!
          I’ve been working on different additions to the game, still kicking around how to incorporate them. More to come!

          • ian says:

            ok kool i look forward to it :P btw love the police station too lol be good to see it updated though with some stuff maybe better guns and more mellee weapons too like axes machetes ect :P like i said i look forward to playing next update :)

      • eduardo says:

        i found but it was nothing

  16. Ssoap says:

    Oh yeah a multiplayer mode of dead valley will be awesome !
    I love this game, survival is the best theme, and zombies come when they’re hear gun sound :D
    Great ! Doug you rocks !

  17. Dawisio10 says:

    Huh well, can I ask some question? Will you public the game when it will be in beta/alpha phrase? I wish I would play it. :3

  18. Mitchell says:

    Hey for some reason it won’t work doug could you tell me why?

  19. Gotta chime in here this is a brilliant piece of work… really addictive and great execution. Love the random generation and the excitement of having to drive through deserted zombie infested towns at night hoping the fuel will last. Hair rising.

  20. Mitchell says:

    doug I think it should have more guns,ammo,survivors,and diffrent zombies but its still one of the best games i’ve ever played.

    • doug says:

      It was made using an older version of SoundJS which is a component of EaselJS, but that’s all. No game framework, just pure Javascript.

  21. jonny3tears says:

    hey Doug(or anybody else would work)my friend got me HOOKED on the game but still haven’t figured out how to use the beans almost to the end(39 miles)and only have half a heart!:( HELP!

  22. jonny3tears says:

    Also suggestion(s) 1.)maybe put on a campaign version,maybe your with a group of CPU’s?2.)Have a military camp somewhere were you can get weapon(s)?3.)Some type of automatic weapon plz?4.)Kind of like a tombstone system and you can get SOME of your inventory back?5.) (The best one personally)A HELICOPTER and/or ATV for rough terrain?

    -44ANDIT’SPOINTINATTHATZOMBO

  23. jonny3tears says:

    Hey I’m playin right and i have a shotgun and glock but I was using my bat(din’t have much on me guns).PUFF!It hit me like a bat to my face!The zombies should be backed up a little bit when you hit them with a bat.

    PS also when you run out of ammo you should be able to melee with your weapons like pistol whipping or hit them cannibals with the butt of you shotgun or rifle.

  24. jonny3tears says:

    LOL! :)Also there should be like a flashlight attachment for guns(except the glock cause DUH you can hold a flashlight with it).But seriously though it would help TONS.Also maybe a knife for more melee damage.:)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>