Archive for the ‘Unspecified Strategy’ Category

h1

Pixel Based AI agents.

January 15, 2009

During my entire code career I have always been interested in pixel AI. The theory is that every pixel on a image can occupy one or more AI entities, a AI is never larger then a single pixel but might be part of a cluster forming a mega AI where each part work separately to determine influences from and on nearby pixels but doing one or more shared actions. A example how it might work.

A City AI is one pixel large. By scanning a range from it’s position it finds out that it got access to a river, forest and a gold mine. By adding pollution of the river, decreasing the value of the gold and the thickness of the fortress, the pixel has absorbed enough resources to spawn a child city pixel. Then the city will scan all pixels in next to it, up down left right, to determine if any of them are valid to place a child city part on. If not, the city will terraform the tile with the highest possibility to the extent it can, wasting the resources that would go into the child piece. Then it will gather more resources, pollute the river even more, draining more gold, cutting more forest. The tile is now valid to build on, one more child piece will be spawned. This might be one of many actions, it could be to increase the towns defence by spending gold on a defense or offense value or improve housing allowing one pixel to carry more population. Ones the city got one more tile the number of actions that can be performed are not double but rather a lower value like (1+1/3tiles size) actions to not making the city grow like a virus straight away. Forests could work roughly the same way, determine the temperature and water access in the area, increasing it’s strength by one for every water, with a 1/4 chance to spawn a new forest tile if the strength is over 10. With a hibernation factor if the weather gets to cold.

Fire could be devastating. Spreading to nearby trees in 5/6 chance. The important part here is to not burn the entire forest away, but reducing random positions to power 1 instead of 0 and declining them to grow or catch on fire until all tiles around them are free of fire.

There is essentially nothing that can’t be simulated on a AI point of view in that way. That being said after a while you will need to add more details, deciding how roads are going to be built, probably with the help of a random walking AI type using some kind of fuzzy logic. mark all traveled pixels some how, then mark the way in a node network that expands the same way the city did. make connecting cities know about each other and allow them to trade resources between each other.

All in all it’s a fun way to play around with stuff and i hope that more people then me enjoy it, even if it’s a bit geeky.

h1

About the unspecified strategy game!

January 14, 2009

Since both me and my girlfriend are gamers, we often look for games that we can play together, there has been a lot of castle crashers and left 4 dead, and I guess Resident Evil 5 will be well received as well once it’s out there.

But the thing we realised is during all this time there has been a few (non sport) games thats not about killing or beating the living crap out of each other. Being a programmer I decided to try to do something about this in a not to distance future.

On of the the main ideas of te game, beside possibility to play in coop, is a randomly generated world kinda like dwarf fortress world generation (www.bay12games.com/dwarves), the main difference will be the distance to the world. Cities will be many tiles large, forests and mountains as well, in DF a city or sight is only one tile large in the over all world view. During game-play you will probably never see any actual people running around, but you will be able to get stats for areas, how people are feeling, what they are missing etc.

The game play:
The game is not focused on armies or battles, they will happen but they will not involve you directly, your goal is to make the world thrive by manipulating resources in the world. You may make cities grow by adding gold in the nearby mountains, may guard forests by adding monsters and horrors, this combination might result in noble adventurers looking for adventure and treasure for defeating the evil monsters. The cities will grow based on distance to resources, some resources makes the city shrink if it doesn’t have other resources to balance it out.

For instance if we take the monster/gold scenario again, the access to gold will make the city grow, but a growing town is expensive and requires resources, to prevent the city from cutting down all the forest the player add a monster resource too the forest, gold must now go into defending the forest from monsters as well as trying to make it expand. If the city can’t be defended the town will move back tile after tile, leaving nothing but ruin tiles behind, or until enough funds can be diverted from the blocked expansion into military. This will make the resources work in a symbiotic relationship to each other, monsters can attack growing stronger, city shrinks, and thus get more funds , military grows stronger, both resources are used and the player archive more points for building more resources. Other “resources” might be a dragon with treasure, a wizard tower, forest spirits, good soil for farms etc etc.

The players will never be in direct conflict with one another but their resources placed might work agains each other, thus allowing the players to challenge each other in a arena using a avatar of their choosing, this battle won’t be player controlled either, only the skills/equipment of the avatar can be chosen, then rand() or “faith” decide the winner. To set up a duel, one player must choose a resource with in a certain distance from at least one of their own resources, this is the price to claim if they win, the other side may choose one resource within the area as their price if they win.

The dual system will work like rock, paper scissor, lizard, Spock. Where opposing elements do more damage or block better as armour, the avatars will have mana, physical attacks and hit points.

That’s it for now, the game will use a tile based engine will tile transition making a multi tile city stick together with a nice wall pointed outwards,  same thing for forests, water and mountains.

There will probably be a cliché like good and evil, and that you can influnce the world differently based on who you are. A thing like a volcano that might seem destructive might increase the health in a nerby city due to the frequent use of hot water springs, and something like gold without any threats might turn the city into a greaypower hungry military state. One turn with all the updates will happen at mostly ones every 30 or 60 minutes, partly to make the engine calculate whats happening and reacreate buffers, but also to allow the players to react to a possible resource threatening situation quickly.

Follow

Get every new post delivered to your Inbox.