You must be logged in to post messages.
Please login or register

The Town Square
Moderated by Jayhawk

Hop to:    
Welcome! You are not logged in. Please Login or Register.8 replies
Caesar IV Heaven » Forums » The Town Square » Trying to make a city builder named Annunaki!
Bottom
Topic Subject:Trying to make a city builder named Annunaki!
ambitiousmustard
Pleb
posted 02-21-17 14:22 ET (US)         
Hey guys!

I'm trying to make a Mesopotamian-themed city builder in Unity called Annunaki, after the Babylonian deities who created and taught the human race. Since late on Friday I've already added:

- Buildings! I mean, this is pretty much a given, but it took a surprising amount of work to properly add multi-tile buildings.
- Roads! They don't do that much like change their appearance when desirability go up (I haven't even added desirability yet), but they do enough to support...
- ...Random walkers that walk around for X amount of moves then despawn when they've completed their cycle. They also interact with the buildings they walk within 2 tiles of.

My most immediate goals right now are figuring out path-finding for destination walkers and making a decent housing level system, which is why I came here. I can't find anything that really gets into the specifics of how walkers and houses interact, aside from "Walkers move randomly for X tiles" and "Houses consume this much of whatever a month". Where can I find information on how much of something walkers give to houses, whether there's a max limit on either how much the walkers give or how much a house can hold onto, and other stuff like that? Ideally I'd like to take Emperor's system for food and apply it to all resources/services a house can hold or have access to (ie. water, culture venues, health, goods), but I can't find information on how market walkers convert individual food types to bland/plain/tasty food. Is the best thing to do just to play the games and take notes?

Anyways thanks for reading! I created a subreddit at /r/annunakigame where I'll be posting weekly updates.
AuthorReplies:
Brugle
HG Alumnus
posted 02-21-17 16:42 ET (US)     1 / 8       
Hi ambitiousmustard, welcome to City Building Heaven.

I have only played Caesar III and Pharaoh, where most of that information has been figured out and described in the Game Help forums.
figuring out path-finding for destination walkers
Try reply #1 of C3 and Pharaoh Destination Walker Paths.
"Walkers move randomly for X tiles"
In C3 and Pharaoh (and probably in the other games), they don't. "Random" walks have up to 3 parts. The first and third parts are explained (very briefly) in reply #15 of Randomness of Random Walkers and (much more extensively) in the essay Ambulomancy linked from the opening post of Predicting Roaming Walks. The second part of their walks does appear to be more random, but isn't really, as shown in the opening post of Randomness of Random Walkers (continued).
Where can I find information on how much of something walkers give to houses, whether there's a max limit on either how much the walkers give or how much a house can hold onto, and other stuff like that? Ideally I'd like to take Emperor's system for food and apply it to all resources/services a house can hold or have access to
I suspect that information is available for Emperor. Perhaps someone who knows can help you, or you could post a question on the Emperor: Game Help forum.

I either know or can find that information for C3 and Pharaoh, so if you want it let me know.

[This message has been edited by Brugle (edited 02-21-2017 @ 04:43 PM).]

ambitiousmustard
Pleb
posted 02-21-17 19:44 ET (US)     2 / 8       
Thanks Brugle!

I should be more specific about the walker system, lol. I've already put this into place:

1. The walker finds a place to spawn by scanning the roads adjacent to its mother building in a circle.
2. The walker goes in a straight line until it reaches a dead end where it turns back or when it reaches a crossroads where it chooses a random direction to proceed that isn't backwards.
3. When it walks the maximum amount of tiles, it despawns. I plan to replace this with a pathfinding algorithm for the walker to find the shortest path back to its building.

I've read about how the walker actually saves its first four paths to reuse them, but wasn't sure if this system was worth keeping as a mechanic since either most players don't recognize it or if they do, they exploit it. Nothing's set in place yet, though. I'm going to look at those links!

And if you could find that info on Caesar III/Pharaoh that would be awesome!! I'm really struggling with a storage/consumption system for buildings and I'm basically stumped right now..

Thank you so much for the info!
Brugle
HG Alumnus
posted 02-22-17 15:16 ET (US)     3 / 8       
I've read about how the walker actually saves its first four paths to reuse them,
Don't believe everything you read.

Paths aren't saved, only the direction (NE, SE, SW, NW) used in calculating the initial part of the walk is saved. The path for a walker is calculated whenever one is needed.

The walker doesn't save the direction, the building saves the direction. Some buildings can generate multiple "random" walkers, who share that direction. (I don't know if any buildings in Zeus or Emperor can generate multiple "random" walkers.)
wasn't sure if this system was worth keeping
I would prefer that you make some changes whenever you can. For example, Pharaoh not only has a very different look from C3 and a bunch of new stuff, it also has a lot of changes (some quite small) in the way that the game works, which made me like it more. Of course, other player may feel differently: some might not care and some might prefer a new game that works the same as one they've played before.
if they do, they exploit it
Of course. A competent player will exploit everything.

(If I was designing a game, I would want everything I put in to be exploited by at least some players.)
if you could find that info on Caesar III/Pharaoh that would be awesome!! I'm really struggling with a storage/consumption system for buildings
To keep this reply from getting too long, I will only discuss the storage and consumption of foods and goods in houses. If you want to know more about the storage or consumption of other buildings or the way that other walkers interact with buildings, let us know.

Foods and/or goods are delivered to a house when a bazaar trader (Pharaoh) or a market trader or market buyer (C3) reaches the center of a tile and is within 2 tiles of a house and when the house wants foods and/or goods that are in the market or bazaar.

C3 Foods

Once per month, a C3 house (that isn't a tent) consumes one-half the number of residents units of food. If the residents consume multiple foods, it will divide the food consumption equally between those foods. If the house contains more foods than are consumed, only the more popular foods are consumed.

The house wants to store at least an "adequate amount of food" for each of the number of foods its residents would consume if the house was evolved to the next higher level. An "adequate amount of food" is four times the maximum number of residents that the house has held. When a market trader or buyer is in position, if the house wants more food, it will run through the foods, starting with the most popular, and if the house does not have an "adequate amount of food and the market has some, the house will take the "adequate amount of food" from the market (or what the market holds if it has less).

Pharaoh Foods

Once per month, a Pharaoh house (that isn't a hut) consumes either one-fifth (if Bast's temple complex or Sebek's altar exists) or one-fourth (otherwise) of the number of residents units of food. If the residents consume multiple foods, it will divide the food consumption equally between those foods. If the house contains more foods than are consumed, only the more popular foods are consumed.

The house wants to store 6 units of each food per resident. When a bazaar trader is in position, the distribution of food is complicated, as described in Bazaars - food distribution. However, much of the time (especially when food is plentiful) it doesn't matter much: the bazaar gives the house enough to have around 6 units of each food per resident.

C3 Non-food Goods

Twice per month, a C3 house which consumes a good consumes 1 unit, except that a palace consumes 2 units of wine twice per month.

The house wants to store a good if it uses that good or would use it if it evolved to the next higher level. The amount it wants to store is 8 units of pottery or 4 units of another good, except that a grand villa or palace wants to store 8 units of wine. When a market trader or buyer is in position, the house will take enough to reach that level (or what the market holds if it has less).

Pharaoh Non-food Goods

Once per month, a 1x1 Pharaoh house which consumes a good consumes 1 unit. Twice per month, a 2x2 or larger Pharaoh house which consumes a good consumes 1 unit, except that an estate consumes 2 units of luxury goods twice per month.

The house wants to store a good if it uses that good or would use it if it evolved to the next higher level. The amount it wants to store is 2 units if it is 1x1 or 8 units if it is 2x2 or larger, except that a stately manor or estate wants to store 16 units of luxury goods. When a bazaar trader is in position, the house will take enough to reach that level (or what the bazaar holds if it has less).
ambitiousmustard
Pleb
posted 02-22-17 22:05 ET (US)     4 / 8       
Thanks for the info! I was considering copying the consumption system for food and applying it to goods as well (or vice versa), just so that it's more comprehensible to the player. It's all up in the air, though, since if we're being totally honest I'm at a total blank at how to implement storage for buildings. I've been trying to go for the Emperor system but I think that the Caesar/Pharaoh one (even if they're slightly different) is easier to program. Either way, I feel like I bit off a little too much to chew!

Thanks again for your help
Mazeppa
Pleb
posted 04-14-17 03:03 ET (US)     5 / 8       
Would be nice if there was a big world map for city interaction, a bit like in Caesar, Zeus and Emperor.

Really didn't like how Pharaoh restricted the world map like that, to such an extent that they had to squeeze in places like Actium etc. It's honestly one of the many things I hated about Pharaoh.

[This message has been edited by Mazeppa (edited 04-14-2017 @ 03:05 AM).]

Pelagius_II
Pleb
posted 10-29-17 06:37 ET (US)     6 / 8       
Of course. A competent player will exploit everything.

(If I was designing a game, I would want everything I put in to be exploited by at least some players.)
Speaking as someone who regards, e.g, the mind-warping alien geometry of your Palace Peaks with an odd combination of awe and horror, I think there are reasons for not-exploiting certain game mechanics that don't boil down to incompetence per se.

I'll admit that C3 tends to blur the line between 'exploit', 'bug' and 'optimisation'- there are players who consider using gatehouses or road loops to control walker access to be unnatural, and it's certainly fair to say it can produce city-layouts that don't much resemble real cities. (I tend to feel strange using aqueduct-loops to trap wolves, but given gatehouses let them pass I don't see good alternatives, and I've been known to use gardens as shortcuts.) So I'm not exactly a purist on this score, but things like using 'undo' to get multiple barracks or extra warehouse walkers definitely feel like cheating to me.


I can't speak for ambitiousmustard, but if one of their goals is to encourage, say, a certain historical verisimilitude, then it's reasonable to talk about what mechanics will or won't conform to that end.
Brugle
HG Alumnus
posted 10-29-17 09:19 ET (US)     7 / 8       
gatehouses or road loops ... can produce city-layouts that don't much resemble real cities
I don't think C3 cities resemble real cities much anyway.

Real cities have many road loops. In the distant past I remember someone who wanted to see cities with no dead-end roads (which seemed somewhat unrealistic), but having no road loops seems highly unrealistic.

Not using gatehouses (except in defensive walls) is something I've done (and enjoyed) a few times. I was designing a better "Timeless Tarraco" in that way, but got tired--I may finish it some day.
I tend to feel strange using aqueduct-loops to trap wolves, but given gatehouses let them pass
Gatehouses block wolves. (Wolves that are already moving will go through a gatehouse that is built in their path.)

My "No Trade Lugdunum" didn't pen in wolves with aqueducts or anything else--a fort eventually killed them. (My Pharaoh city "Sawu" has a housing block built around a pack of hyenas--that was fun.) Long ago I started to design "Large Lindum" that used walls and gatehouses to pen out the wolves, but got tired of that too.
Pelagius_II
Pleb
posted 10-29-17 19:25 ET (US)     8 / 8       
Gatehouses block wolves. (Wolves that are already moving will go through a gatehouse that is built in their path.)
Huh. The more you know...

I'm sure that plenty of cities have closed road loops in certain areas- like out in the suburbs, where you're actively discouraging drive-thrus- but my point is that C3's fundamental mechanics reward constraints on movement, whereas the purpose of real transport networks is typically to broaden horizons. It leads to quite different layouts.


Anyway- @ambitiousmustard: If you're thinking about soundtrack, maybe look this guy up?
You must be logged in to post messages.
Please login or register

Hop to:    

Caesar IV Heaven | HeavenGames