Sunday, January 19, 2014

Cutting the World

Land Regions

Land regions have been coded! What does this mean? The world is cut into a fabric of different land regions. The intent is for landlocked regions, mountainous regions, coastline regions, fully ocean regions (which will have no ownership possible) and more! Each land region has its own kind of resources (trees, grasses, bushes, minerals, animals). For now, animals will stay in their own land region but some future iteration may introduce migratory patterns.

Families

Families have been introduced, tracked at the faction level, but remain untested. They allow a set of parents, adult children and children. Currently, children don't exist so any new children are instantly adults (and also, there's no pregnancy so they just fire out adults from the uterus). There are some open design issues. A progress bar to the next birth is tracked at the family level but what happens if...

  • A female parent leaves? Does she take some of the progress with her to her new family?
  • A female parent dies? Does the progress bar get reset?
  • The above two questions but with polygamy (specifically, multiple female parents)

And actually historically speaking, the usual family unit was the extended family. Grandparents, parents and children. Homosexual adults were suspected to have played the role of additional parents in a family during the early stone age (ie. helping to raise the children of their siblings). Sigh!

Pathfinding Issues

I've made terrain passible or impassible. This introduced the new problem of the greedy pathfinding algorithm no longer being 100% successful. Poop! People would dance about walls as if I coded in special spells that would allow them to pass through mountain blocks. They were wrong and they dance forever. So I introduced a basic A* pathfinding algorithm for short distance (below 5 grid spaces). Is that good enough? I don't know!

For one, the A* I coded is terribly unoptimized. You can get pretty close to linear runtime complexity (for those of you who know what that means) through a few tricks (because real world use of A* is usually not that complicated). I also chose 5 grid spaces because I intend for buildings to be about 3x3 in size. However, they'll be irregularly shaped and so I may have to increase use of A* to longer distances... which implies I may need to optimize. I'll cross that bridge when I get there.

Continuing Graphical Plague

Imagine a world where things appear partially submerged in rock or soil when they should not. I have had a few graphical glitches that continue to harass me unto the night where "blocking" is not working. A mountain square from further away appearing above a mountain square closer. Items that don't appear on top of the floor but submerged in them. I've been working through these but because the game has not been feature complete I have not put them high on the list of to do. When it comes time to showcase this game to people, these will have to be fixed. Of course so would the horrible horrible UI.

Next Stuff

I'm going to add a game clock. This tells you what year the game is. And the day. Oh and the season. It'll be useful for tracking reproduction and ecological changes (trees growing, animals pooping babies). It also means I don't need to go into debug mode to figure out what day it is in my game.

Consumption of goods and a health/happiness indicator. This is the core of the game afterall. You collect poop. You punch the poop into various shapes. You consume the poop. Then because you are materialistic, fully rational, capitalist monster this makes you both happier and healthier. It ties into everything. Healthier people get faster progress on their next birth. Happier people don't stab each other.

No comments:

Post a Comment