Author Topic: Horddays (7DRL 2014 - SUCCESS) - devlog  (Read 13296 times)

koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Horddays (7DRL 2014 - SUCCESS) - devlog
« on: March 11, 2014, 04:27:54 PM »





DOWNLOAD:
For Linux and OSX, source code (C, SDL) at Github (version v0.7d.1).
For Windows, download 32 bit build.

The main goal is to escape from the horde of zombies, using items you can find around. The environment is 3D and resembles urban setting.

   

Old post:
Out of frustration with all those zombie TV shows, and because Catacysm2 is not yet ready, this is my take on this epic genre of Zombie Apocalypse.

Basic principles:
- Hordes of flocking zombies.
- You are a hoarder, and you are unable to pack your inventory - you cannot get rid of your stuff unless you use it.
- Simplified 3D world.
- Different types of zombies can smell, hear, or see you.
- This stuff can be done using arrays for everything, no fancy data structures, so plain C is just fine ;D

The development history so far:

Late Friday night
- Basic SDL setup.
- Basic structures and game loop.
- Simple random 3D map.
- Simple tileset.
- Walking @!



Saturday
- Refinig the world.
- Field of view.
- Started programming mobs.
- Priority list for the time system.



Sunday
- Time System.
- Flocking of the mobs.
- Possibility for non-zombie mobs.
- Killing mobs.
- Blood.
- Smell spreading.
- Sound and smell perception.



Monday
- Balancing flocking and sensing.
- HP indicator.
- Zombies hitting the player.
- Exit, levels.
- Better map generation. (World of ramps).
- Shadows.
- Better zombie tiles.




TODO

- Map generation: Connected area, better spawning.
- Map generation: Houses and high structures.
- Map generation: Small obstacles.

- Items
- Picking up items
- Show when the player is hit/bitten.
- Effects
- Using items

- Smoke (from grenades, shotgun, etc)
- Wind
- Sight
- Check Windows build
- Better UI
- Even better map generation
- Civilians

« Last Edit: March 15, 2014, 03:16:36 PM by koiwai »

koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: horddays (7DRL 2014) - devlog
« Reply #1 on: March 12, 2014, 02:59:28 PM »
Tuesday
- Better zombie flocking (crowds)
- Fixed a bug in the time system
- Map generation: Connected area, better spawning, and initial location.
- Blue zombies are able to see you
- Items
- Picking up items


koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: horddays (7DRL 2014) - devlog
« Reply #2 on: March 13, 2014, 05:31:13 PM »
Wednesday
- Numpad keys, in addition to hjklyubn.
- Death when HP=0.
- Item consumption and throwing.
- Items: Medkit, Antidote, Rock.
- Show when the player is hit/bitten.
- Score, day(level) count.
- Level difficuly increases with each level.

I did not do a lot last day, but there was some progress.



Plans for the last push are:
- More items (like, grenades, weapons, consumables)
- Better level generation (houses and small obstables)

On Friday, I will do the README, put it on github and things like that. I'm using MinGW for a Windows build - hope it will work fine.

Samildanach

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 453
  • Karma: +1/-0
    • View Profile
    • The Indie Ocean
Re: horddays (7DRL 2014) - devlog
« Reply #3 on: March 13, 2014, 05:54:38 PM »
I'm keeping my eye on this one. I find there are surprisingly few zombie survival roguelikes that are actually any fun. I'm glad to see you've implemented numpad control - hjklyubn makes me gag.  :P

koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: horddays (7DRL 2014) - devlog
« Reply #4 on: March 14, 2014, 08:25:54 PM »
Samildanach: Happy to hear. The playable version will be available soon.

Yesterday, I could accomplish almost everything I wanted. Not all items were implemented, but there is enough content to play at least for 7-9 levels. Actually, the fun part starts around level 5.



Thursday
- Grenades
- Smoke
- Pistol
- HP goes down when infected.
- Smell vision device.
- Map generation: Houses/fences.
- Map generation: Small obstacles.



koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: horddays (7DRL 2014) - devlog
« Reply #5 on: March 14, 2014, 10:14:59 PM »
The source code is available at Github (for Linux and OSX):
https://github.com/a-nikolaev/horddays

Soon, I will upload the Windows build too.

Update:
Windows (32bit) build - https://github.com/a-nikolaev/horddays/releases/download/v0.7d.1.win/horddays-win.zip
Please let me know in case of any problems.
« Last Edit: March 15, 2014, 12:38:02 AM by koiwai »

koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Horddays (7DRL 2014 - SUCCESS) - devlog
« Reply #6 on: March 16, 2014, 07:02:28 AM »
Participation in an event such as 7DRL is a truly exciting life experience. Designing and programming games was my primary hobby for very long time. Since early childhood, I was making games to play with my brother and occasionaly other family members. Although, I was always considering myself to be a slow developer, enjoying the process, spending weekends and sometimes whole weeks, creating worlds first in my head and translating them into code. I have no doubt, I came to programming through games, and I still like
writing code thanks to games!


Planning (Unexpected things happen).

A week ago, it was a late night, Wednesday or Thursday, I was doing some boring work and tried watching Highschool of Dead. I kind of like the zombie worlds, and apocalyptic worlds in general. When I was younger, I read John Christopher's novels quite a lot. All TV Shows like Survivors or Jericho are awesome and I like them a lot. But at the same time, recent seasons of The Walking Drama Queens are frustrating to watch. So, somehow, the desire to write my own Cataclysm-ish RL came to my mind.


The initial thoughts were:

(1) Zombies should not be treated as entirely individual units. Their hordes should be programmed with the flocking model.

Pros: Easy to implement, probably novel, and hopefully fun.
Cons: Never tried that.

(2) Zombies don't need good AI. They must be dumb, and there will be a lot of them. Hoping that flocking behavior can make up for the absence of real smart AI.

Pros: Perfect for the 7 days time limit.
Cons: Dumb mobs are not fun.

After this initial idea crystallized, the next day, I added a few more design decisions that are not extremely novel, but they fit the setting nicely:

(3) Zombies' senses are limited, some can only hear, others can only see, etc.

Pros: Adds variety.
Cons: Programming them takes time, but its reasonable.

(4) Good to have 3D environment. It was kind of a big deal for the Cataclysm community. Although, I did not want the shooting-from-the-roof type of 3D. I wanted some more parkour-ish environment with high and low places, ramps, and whatnot.

Pros: Should be fun, I want to be able to hide and run away from the hordes.
Cons: Never tried programming 3D environments.

(5) Since programming the inventory can be a big hurdle, let's make the inventory work like a stack: the character has to use the first item from the top of the stack.

Pros: That is manageable. Also, adds some constraints, which can be good.
Cons: Questionable decision. Adds some constraints, which can be bad.

At this point I realized that this whole thing sounds like a nice 7DRL idea. And what is even better:

(6) I don't need fancy data structures to implement everything! (Only the linked list for the inventory). So, I can program the whole thing in plain C, and I have some experience programming a crossplatform game in it, so there will be a Windows build too, in addition to the source code for Linux, OSX, and other unixes.

Pros: I love plain C. Also, I have some code for SDL rendering already.
Cons: Never programmed a roguelike in C. It is C, so no fancy stuff allowed.

With all this in mind, I felt really tempted to take part in 7DRL 2014!


The challenge.

It was very enjoyable. Fortunately, loading the tileset images, and the tiles blitting functions were already implemented for my another project, so I could focus on the inner workings. And try to keep things as simple as possible. Maybe surprisingly, C is great for that. It encourage O(1)-time constructions like inegers, arrays, structures, pointers.

The first 1.5 days, I spent laying out the main game systems, particularly, the 3D environment, and the field of view algorithm. For the 2D filed of view, I could translate my old code from OCaml to C (although it was non-trivial, considering the fact that the old code used recursion and anonymous functions, but it was easier that writing the whole thing entirely from scratch). To making vision three-dimensional, I essentially cheated. The world was a simplified 3D world, without things like bridges, floors, or roofs. So, some modification of the 2D FOV code worked good enough.

Then, the mobs were added. By the end of Sunday, I made a reasonably good time system, and flocking behavior for zombies. Also added smell and hearing as the first two perception mechanisms. This is where I got by the end of the weekend.

By the end of Tuesday, I made a reasonably good map generation with connected levels. Mobs and the player are dealing damage. Also added sight as the mobs' third sense. Implemented the inventory and items picking up. No actual items yet. Work makes things go slower, but I'm still going pretty good.

Wednesday was not very productive - I've got food poisoning, but still managed to add some basic items like Medkit, Rock, and Antidote (oh, irony).

On Thuresday, more items were added, including weapons. Even better level generation and overall parameter balancing. Levels are getting bigger with difficulty, and items are added gradually. Overall, there was enough contents to play for 7-9 levels, and most likely even further. Although the game gets harder with each level.

On Friday, I did not have a lot of time to work on the game, but I tried to finalize and wrap up the whole thing. The game was uploaded to github, and I produced the Windows build. There was one unexpected issue, the amount of memory allocated on the stack was too large to run on Windows (32bit), so I had to change the memory allocation method for the main game state object to the heap. Minor problem, but really annoying.

The week of work was definitely successful! Hope, the result will be fun and interesting for players.


Afterthoughts

Not a lot, I'm still trying to have rest and finally sleep for more than a few hours. Started playing games made by others. Participation in something like 7DRL is a good thing, particularly if one has a clear vision of the game, and you exactly know how it can be done. Probably, It's important to hit the sweet spot, balancing the familiarity of implementation and the novelty. The idea must permit easy implementation. You have to like programming games too. Hahaha, obviously.

Even a month ago, I could not imagine myself making a full game in such a short time span. I'm not sure if I will be able to pull it off next time. If I'll get a good idea, really hope so.
« Last Edit: March 16, 2014, 07:08:04 AM by koiwai »

Vanguard

  • Rogueliker
  • ***
  • Posts: 1112
  • Karma: +0/-0
    • View Profile
Re: Horddays (7DRL 2014 - SUCCESS) - devlog
« Reply #7 on: March 16, 2014, 09:13:06 AM »
I like the @_@ face man.

koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Horddays (7DRL 2014 - SUCCESS) - devlog
« Reply #8 on: March 22, 2014, 05:09:52 AM »
Updates in the dev branch on github:

* Smoke now blocks player's and zombies' vision.
* Added wind - smell and smoke are carried away (+ a UI wind indicator).
* Item generation rates are changed.
* Reduced sound perception rates.

Once I implement more stuff, I'll make a windows build again.

The master branch remains unchanged until the end of the reviewing period.

koiwai

  • Rogueliker
  • ***
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Horddays (7DRL 2014 - SUCCESS) - devlog
« Reply #9 on: March 29, 2014, 08:36:11 PM »
More updates in the dev branch
Download this updated version: Win32 build.

The main goal was to make zombies' three senses work better, make good smoke and smell propagation, add new items. I think, the game is more difficult now.

Changelog:
* The Cannibal Corpse loudspeaker is a placable item.
* Added shotguns.
* Added smoke grenades.
* Item names are shown.
* More versatile level generation.
* Zombie spawning rates are randomized for each level.
* Smell and smoke are more realistic - walls act as barriers
* Fixed a bug for choosing zombies' direction to move
* Balancing rates



Plans for the future:
  • Message log as was suggested in the review.
  • Full 3D environment - most of the code supports it.
  • Zombie leaders.
  • Character development?
  • FTL-like next level selection graph (+ better and more realistic maps)
  • Parkour skills.
  • Food and other supplies to survive between levels?
  • Sound and music?
« Last Edit: March 29, 2014, 08:43:44 PM by koiwai »