Tribe Of Pok: Hunger, Sleep and Predators

In this update I will discuss hunting, hunger and sleep mechanics, as well as a little about family.

To satisfy hunger, the tribe can harvest fruit from trees/bushes or hunt animals for meat. Foraging is simple, you designate trees to be harvested and tribe members will go and collect any available produce. To hunt, you designate a target animal, which your hunters will attack and attempt to kill. If they are successful, the animal dies and a carcass appears. You can either drag this carcass back to the main camp or butcher it on the spot. All food types decay and will eventually disappear, but putting the food in a pit will allow it to last much longer.

Hunting a group of deer

Hunting a group of deer

Hunting prey is the safer option, but you can also hunt down predators. Predators roam the map and may cause trouble for your tribe or kill off prey, so it’s a good idea to deal with them. The only problem is, if they’re aggressive enough, the predators may fight back…

Fighting a predator

Fighting a predator

Satisfying sleep is pretty simple at the moment. When tribe members get sleepy they will try find some bedding to rest on, but if none is available then lying on the ground will do. I plan on implementing some sort of mood mechanic, but haven’t decided how to do it yet. A tribe member’s mood would be affected by factors such as whether they had a comfortable sleep, injured a body part or had a family member die recently.

Speaking of family, that has been implemented as well. Every tribe member is part of a “family” within the tribe. If there is a male and female within the family, they may produce a child. Currently the male walks up to the female, talks to her and she becomes pregnant… I’m still working on this part. Animals can be part of a family as well, and will tend to stick together (until you start chasing them around).

OK, enough blabbering. Here is a gratuitous in-game video of lions at an all-you-can-eat buffet:

By |February 12th, 2014|GameDev|0 Comments

Tribe Of Pok: Establishing a water supply

You start the game with a small tribe on the edge of a procedurally generated map. The first thing to do is designate a meeting area for your people to hang out. Once they make their way to the meeting area, they will decide on the best thing to do next. The first complaint is that their waterskins are empty. Humans can drink directly from a water source, but prefer to drink from their waterskins if possible.

Your people need a water supply

Your people need a water supply

We need to designate a water supply for our tribespeople. One thing to watch out for are mosquitoes in humid areas (the black dots on water). If you guide your people too close to a water source infested with mosquitoes, they risk catching malaria.

Watch out for mosquitoes

Watch out for mosquitoes

Once waterskins are filled, your people will complain about their dirty water. They can still drink it at the risk of catching typhoid (or a variety of other waterborne diseases). Water can be cleaned by bringing it to a fire. To make a fire we need wood, which can be obtained by a woodcutter chopping down trees. Fire also keeps the tribe warm during winter.

A fire provides many benefits

A fire provides many benefits

As a side note, currently I’ve reduced the number of professions to two – hunter and woodcutter. Both of these need specialized tools (hunter needs a knife and woodcutter needs an axe). All other activities can be performed by any tribe member.

Also, I’ve implemented a simple scheme where objects that are being carried/worn by a human show up on their body as a replica smaller version of what they look like when placed on the ground. I thought this was pretty cool, and saves the work required to draw two sprites for every wearable/carry-able item. Hope it doesn’t look too bad.

By |January 15th, 2014|GameDev|0 Comments

Water Flow Mechanics

Water is an aspect that I spent quite a bit of time on. In the current version, above-ground water “seeps” into a cell until that cell is fully saturated. Then any remaining water runs a test on its adjacent cells, and if it finds a cell with a lower water level (taking into account cell height), the water will travel to that cell. So basically, water is designed to flow quite naturally.

In the above video I’ve set one of the cells to produce a unit of water at each update. The numbers represent the amount of unsaturated water in each cell. As you can see, water is moving towards the left side of the map, which is at a lower height. Before a water unit flows into an adjacent cell, a check is performed to determine whether the water should be used to saturate the cell. If so, then the water unit disappears and the cell gains a saturation level.

Evaporation also occurs in the game. It slows the spread of the water and causes small puddles to eventually disappear. The puddle created in the video above will eventually reach an equilibrium between the rate of water creation and the rate of evaporation. At this point it will stop expanding. Larger ponds with enough water units in each cell will be immune from evaporation, although I’m thinking of changing this in the future if it benefits gameplay.

By |June 21st, 2013|GameDev, Map Generation|0 Comments

Generating the Game Map

Ok!

As I mentioned in the last post, I’ve been working on this game for a while so I’ll introduce a different aspect of the game in each post. The whole thing is still a work in progress so anything I say could be changed eventually if I find a better way of implementing a mechanic.

The first thing I needed to do was build a map for all the game objects to live on. The game map consists of a set of 2D tiled hex cells. Each cell contains information on its level of topsoil, rock, organics, saturation, water, height and temperature. When combined, all these variables can be used to determine the type of ground currently present on a cell, which in turn will affect the types of plants that can grow and resources that can spawn there. For example, a cell with high topsoil levels will allow a tree to grow, while a rocky cell will be more likely to spawn boulders.

To determine the level of rock, organics and height in each cell, I’ve created a random map generator that uses Perlin noise. Behold the result:

080613a

As you can see, the worlds generated consist of dense forests with open rocky areas. It should be easy to generate other types of worlds by tweaking the random map generator. For example, a less forested world could be created by lowering the overall level of topsoil. I’ll get around to implementing other world types eventually, but for now this is a good foundation for the game. Next time I aim to post about the mechanics of water and water flow.

If you have any questions or would like to know more, please post in the comments!

By |June 9th, 2013|GameDev, Map Generation|0 Comments

Welcome to PokingWater Games!

This blog will be about a game I’m working on, Tribe of Pok. In essence, Tribe of Pok will be a paleolithic-to-neolithic tribal survival simulation game. It’s about a tribe of hunter-gatherers trying to eke out an existence in a savage environment. Tribe members will be fairly autonomous in satisfying basic needs, with the player giving instructions that members will carry out.

Some notes about the game:

  • Written in C++ using CodeBlocks and SFML graphics library
  • Playable map will consist of hexes viewed from a top-down perspective
  • Art will be basic 2D sprites
  • Seasons will be implemented, with Summer/Spring producing plentiful food, which should be stockpiled to survive the barren Winter
  • Weather patterns will affect the difficulty of surviving in certain environments
  • Water movement is implemented, with heavy rain causing water to pool in locations that were previously dry
  • Wild animals have their own needs and move around the map trying to stay alive
  • Dinosaurs and zombies, although completely historically inaccurate, may or may not be included

I have already done some work in my spare time, although it’s at least a year from being completed enough for release into the wild. I did say completed enough, not polished enough, because I intend to keep working on it and adding features until I’m satisfied after I set it loose.

I’ll aim to post about once every two weeks initially and spend most of my time working on the actual game. I do have a full time job so progress may be slow, but this is something I’ve wanted to do for a while and it WILL be finished eventually!

Thanks for reading,

PokingWater Games

By |May 19th, 2013|GameDev|0 Comments