Skip to content
sashman edited this page Dec 16, 2013 · 22 revisions

#The planned features of Kingdomforge#

##Short term goals

As the character moves, the actual sprite should stay in place (or have a bit of free-playing space), and the map will pan around. This will involve being able to render multiple sub-maps at the same time and have the character traverse them with smoothly.

  • Expand settlement generation.

Implement a more detailed terrain generation in the terrain_generator module. Use the output to render individual houses.

  • Plan back end "world server".

Essentially the server side component that will keep track of the world.

##Long term goals

These features are planned for the game in the distant future and are likely to be dissolved into multiple short term goals. It should also be noted that these goals are purely theoretical.

###Foregrounding and backgrounding architecture

The concept of backgrounding can be explained with an example: if a tree falls in a forest without anyone to observe it falling, does it really fall? Say we observe it at two points, first when the tree is just about to start falling and then when it has finished. If we observe it in these two states, has it really went through every single state on the way down?

What if we can describe the process mathematically, as in when the tree falls, its decreases from 90 to 0 with relation to the ground. So the angle can be described as a function of time, hence given a certain time, we can extract the angle of the tree at that time, and therefore the state of the tree at that time.

While we are close enough to see the tree, we can have the state update regularly, for example every frame. This can be regarded as having the tree object foregrounded. And if we are too far to observe it, we can give up on the regular updating and calculating of the state, regarding the tree as being backgrounded. To switch the tree from backgrounded to foregrounded, we can apply the function to get the current state and keep on updating it from that point on. The backgrounding of the tree can be a trivial task of stopping the regular updates, however need to be very careful with this in more complicated cases.

To expand this idea, the backgrounded functions can be applied in a hierarchy to describe a richer environment, building up from the most detailed (and simple) objects to more global states. So building up on the tree example, we can have a description of a woodcutter's task to cut the tree down. The wood cutter would have to leave the house, walk to the tree, chop it down, wait for the tree to fall (described by the above example), strip the branches and leaves, drag the log back to the house. Using this, we can determine how long it takes for a tree to be cut down, and given a time for a tree to mature and a set of functions for the woodcutter to plant one, an even more high level state can be described: what the population of surrounding trees is, along with number of logs the woodcutter has.

###NPC Natural language interaction

It is most natural for the human controller players to interact using natural speech. This leads to a very flexible way of interaction. If this can be applied to NPC interaction replace hardcoded dialog options, this can lead to a very intricate way to extract information out of NPC as well as giving the NPC a more natural, more human player-like look.

If the player's interaction with NPCs will require chat messages, the game screen suddenly become very prone to heavy cluttering. The play will need a interaction function available to engage into a conversation where all other chat messages will be filtered out.

The mechanism of parsing out the information the player is trying to communicate to the NPC will have to be done with the aid of a chat bot. The incoming message must be parsed into given data and must generate a response. The held messages must also be parsed for context.

It should be possible to set up a separate mini-world populated by one such NPC, where testing can take place.

###NPC combat training

To break up the monotonous scripted combat, the NPC fighters can be trained up using genetic programming.

The combat behavior of the NPC can be represented as a tree (or graph), each node representing actions such as move, attack, etc. The fitness function for such a tree can be either distance to the enemy (for just trying reach the enemy), the health left of the enemy (the less the better) or own health left when put up against a simple scripted enemy.

It should be possible to set up a separate mini-world populated by one such NPC, where testing can take place.

###City and Village generation

The generation of settlements should be expanded into growing the ones located at favorable spots into major cities and spawning village settlement around them. This should be done in a step by step procedural manner, a like growing a forest. The settlement should start with a single building and depending on the surrounding environment, it should evolve with each given time step.

This presents difficulty when a player is present nearby. This then should take advantage of the the foregrounding and backgrounding. A backgrounded settlement should develop incrementally and change itself on each evolution event, while a foregrounded settlement should show the inhabitants building and developing it to the next step and only change once all the changes are in place.

Miscellaneous settlements/structures should be generated across the world, such as castle fortresses and camps.

Clone this wiki locally