Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[WIP] Manor Lord (Village Simulation game)

Discussion in 'Works In Progress - Archive' started by ensiferum888, Jan 21, 2014.

  1. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    938
    This looks awesome, cant wait to try it out :D
     
  2. IRS-Remi

    IRS-Remi

    Joined:
    Jan 3, 2015
    Posts:
    14
    Hello ensiferum,

    I follow you for four months now and even if i haven't enought skill to make the same things that you, I love to understand how it works. I have two questions today :

    1) I know you use A* pathfinding, but can you explain which graph do you use (grid, point or mesh)? And can you explain how do you prioritize the roads?

    2) I read in your blog that you use a StateMachine to assign the Task to the citizens. Can you explain how it works, how you assign Task to citizen (which task? how the computer know you must come back home or to job?). And can you explain a bit how your AIState is writen?

    To conclude, what a wonderful job! Keep going on ;)
     
  3. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Thank you so much for the feedback!! It'll be a while before it's ready for people to play but once I have a bit more content I'll ask around for closed alpha testers!

    I've decided to go with a grid graph because I needed a graph that could be updated quickly at run time. The way I prioritize the roads is by setting an initial penalty on the terrain of 10 000. Then when I build a road I simply set the nodes within its collider back to zero penalty. The A* project comes with a class called GraphUpdateObject which you can derive from and make your own update rules.

    It's not a real statemachine, as normally each state would have possible transitions to other states. In my case it's really a queue of tasks to do. Take a look at my update and dequeue method:
    Code (CSharp):
    1. public void DoCurrent(){
    2.         if(Tasks.Count > 0){
    3.             Tasks[0].StateUpdate();
    4.         }
    5.     }
    6.    
    7.     public void DeQueue(){
    8.         if(Tasks.Count > 0){
    9.             Tasks.RemoveAt(0);
    10.             if(Tasks.Count > 0){
    11.                 Tasks[0].SetUp();
    12.             }
    13.             else{
    14.                 AssessNeeds();
    15.             }
    16.         }
    17.         else{
    18.             AssessNeeds();
    19.         }
    20.     }
    21.  
    When a state is done, it is dequeued from the tasks list and the next one will begin. If there are no more tasks to do then find something else.

    Some tasks are blocking and some will just happen once. For example let's say someone wants to eat something but doesn't have a home, they have to find the nearest storage barn, walk there, grab some food and eat it. I've made States for all these actions. These are classes that implement AIState which uses the SetUp(), StateUpdate() and Exit() methods.

    The above example in code would look like this:
    Code (CSharp):
    1.         Storeage store = cScript.getNearestStoreage(cScript._myTransform.position);
    2.         int[] food = AllRessources.foodTypes;
    3.         AddAction(new PlayAnim("Walk_001", cScript));
    4.         AddAction(new MoveToLocation(store.storeTransform.position, cScript));
    5.         AddAction(new PlayAnimAndWait("BendDown", cScript));
    6.         AddAction(new EatFromStorage(food, store, cScript));
    7.         AddAction(new WaitTimer(2f, cScript));
    8.         AddAction(new PlayAnimAndWait("Get_up", cScript));
    The agent will then go through it's queue, first play the walk animation, then move to the storage barn. Once there, play a bend down animation, grab food and eat from the storeage barn. Since this is done over one frame only, wait 2 seconds, then get up.

    At that point the action queue will be empty and the agent will call its assess needs method. The AssessNeeds() method works down a priority list (Should I eat?, am I cold?, Should I look for a house? Can I work?, Is there a field I can work at?, Should I be constructing something? and so on.) The moment it gets a yes it will load up the proper action queue, and start doing the tasks!

    It's a very naive approach, but it works absolutely great and performs very well contrary to what I thought. It's not a real state machine though (I think).

    I hope I answered all your questions, have a great day!
     
  4. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    New Model: The Church




    The church is one of the few buildings that, as the Lord of the land, does not belong directly to you. The church will open up the Friar/Priest position on your council and appoint that person as the manager of the church (limit of one for now). Monks will come to the church and eventually make copies of holy texts which can give a bonus to piety.

    This by far the highest poly model I ever made. It has 1400 verts according to blender. Unforunately since it's unrwapped on an atlas, every vertex is split so it ends up being 2600 verts in Unity. I'm hoping this trade-off is worth it compared to having each building on its own texture image.

    The upside is I only have one texture (4096 x 4096) for all my buildings. The downsides are that I can't really make any custom details on those textures and I have to take into account that I'm pretty much doubling my vertex count.
     
  5. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    938
    I dont think keeping all buildings on one single atlas has a lot of benefits. Dynamic batching wont work as the models are different and would have too many verts anyway (i think for DB you can only have like 300 verts or so).

    The only direct benefit you have will be saved texture memory, as you wont need a lot of it since you are reusing textures all over the place. This comes with the direct downside, as you mentioned, that you cant go full detail on individual buildings. Not sure how much that last one matter from a RTS camera view though.

    To fully make use of your atlas approach, you should really 'batch' the buildings manually, by using Mesh.Combine. How implementable this is depends on your game though.

    You dont really have to worry a lot about the vert count, as computers can handle a lot of them these days. Your focus should be more on the drawcalls, which most of the time is the bottleneck on modern hardware.

    Hope this helps
     
  6. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Hey there wasstraat,

    Thank you for the information. I'm using my own take of the Mesh.Combine method for a lot of things like the grass, crop fields and dynamic meshes like walls, fences or bridges. For example the grass is 25 patches around the camera, each patch contains 2500 grass meshes and are combined to a single mesh. Take frustum culling into account and I have lush, animated grass for about 15 draw calls.

    I thought about combining my buildings together but there are a couple of things I need to take into account. For example this would most likely break any LODs (I don't have them yet but if I want to implement those I guess combining is out of the question). Most of my buildings are below 1000 verts, to be honest I could very easily reuse my code for the grass which automatically culls meshes that are a certain distance away.

    I thought the biggest performance hit came from "context switching" on the GPU which meant material swapping. I thought even though the meshes aren't combined they use the same material so there's no new texture to upload to the GPU is that not the case?

    So at this point there is absolutely no performance benefit from using a single material instead of 30ish?

    I mean it's not too bad I could easily re do my UVs on my model and just bake the textures from the atlas, I'm pretty sure that within a few days it would be done and then I could go on adding details.

    I guess the point of view really depends on the player. I'm the kind of guy that loves zooming in and looking at all the detail in a game like this. I rarely play zoomed out all the way.

    This is still something that would be done much later during development. The atlas at least allows me to quickly texture buildings, the church took less than an hour to texture since I already have a diffuse and a normal map.

    Thanks again I love having feedback like this!
     
  7. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    For a while I really had an issue with my food production and consumption, I would run out of food within a season or two so I thought why not make a UI element that shows me how much food I have, how much I'm expected to use to feed my people and so on.

    Before, everyone had it's own hunger timer, when they were hungry they'd either eat straight from their house inventory or walk to the nearest barn to get food. This did add some degree of randomness as to when people would eat but it made handling food stocks a nightmare. So now everyone gets the same timer, every 200 seconds (month) people must fulfill their hunger needs. Here's what it looks like for now:


    So you constantly see the amount of food available in your barns, when you mouse over you can see a breakdown per food type, the amount required for your next meal, and the time before people must eat (the green progress bar).

    If you have a steward on your council you can know exactly the amount of food in the entire village, not just in your storeage barns. With this new system I'll be able to add the concept of Ration so you can have half, double rations. This will of course have an effect on satisfaction and probably on health.

    You can also notice a new panel in the UI at the bottom right. This is the minor events, right now it will only alert you when you promote someone on your council, when someone gets pregnant and when a kid is born. But I can see a lot of use for this kind of information in the future.

    For some odd reason my hunters are firing their arrows pointing straight down, I'll need to look into that.


    I've removed all OnTriggerEnter/Stay/Exit from my villagers. I was using it to know when they were over a road to adjust the speed. Now I keep a Dictionary<Vector3, float> which contains the speed bonus. In their path state I only have to get that value from the dictionary and add it to the base speed. I got a pretty good performance boost from those.

    I added specific cull distances for all my animated meshes as well and I'm also combining meshes more aggressively now with reflections and shadows I'm at a comfortable 85FPS in editor.

    Just for giggles I thought I'd show you what it looked like almost 2 years ago:

    And now:


    I'll be honest, if I had known how much work gamedev really is I probably wouldn't have started it. But now I love it!!
     
    Thomazml, foomanchu1989 and Mister-D like this.
  8. Thomazml

    Thomazml

    Joined:
    May 17, 2015
    Posts:
    15
    Wow, very good progress. Who would imagine that. I'm a huge Tilted Mill's games (Caesar, CotN, Zeus, etc..), but I'm also a huge fan from Dwarf Fortress and "similars" (if there is any game that is similar to DF; heheh). I downloaded the Unity in an atempt to "build my first game", and so on. And my "dream's" game actually is quite similar to the game you're building hahaha...

    Do you have any other space to discuss it, or just this topic?

    I woud like to ask you some desing questions: how will economy be like? Something similar to Children of the Nile?

    Seccond: I notice that your timelapse is very fast! (200 seconds a month, it's that correct?). It will be possible to follow somebody's life? Like see a person growth? But How will be the "roleplay" thing of the game?

    Third: How do you structure the society? By families (similar, again, to CotN)? Each family has a house, has A job (same job for all the family members, no gender distinctions) has their equipment (food / currency / cloth / others stuffs)? Or by classes (hey, Marx!, hehe)? Or by individuals?

    That's all by now. I'll add to fav. this topic and visit it every day (yeah, I'm that excited by your game, hahaha)

    Sorry for the "non-tecnical" questions, and sorry for the bad english, not even my seccond language :O
     
  9. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Hey there, I'm very very sorry for the delay in response. I had to put down my cat last week and it's been really hard on me and my girlfriend, I haven't touch my computer since the 19th. I'll get back there soon but I'm not ready yet.

    I don't have anywhere else yet when the game is more fleshed out I'll have a website made, here is just fine.

    I'll be honest I've never played Children of the Nile, I just looked up some videos of it and it reminds me a bit of Caesar III which I loved when I was younger. So far the economy is not fleshed out at all, everything is a set price and will not vary at all. Of course I plan to change that and maybe limit production in cities instead of allowing the player to build everything. I can see advantages to both sides of that coin.

    Yes it will be possible to follow people from birth to death, see how they do in life (provided they stay in your town for that time). If you play at normal speed a year takes 40 minutes, at max speed 4 minutes. So going through someone's entire life will take a looooooong time. The role play resembles Crusader Kings II, basically you'll get some events pop up to which you can react. Depending on the kind of people in your city and the way you manage it you'll get different events, and different actions you can take. People will also have special events between themselves, to which you might have to react or not.

    Society is something that's very much still in the prototype phase and has went through a couple of major changes already. Housing is done on a family and class level, as soon as someone finds a suitable house for their class, the entire family moves in. Work is done on an individual and class level, most businesses have a main job. For example the blacksmith will be the person producing tools. This person must have a high enough craftsmanship skill in order to work there. The second job is the runner. This person moves the goods back and forth between the storage barn and the work place. This person needs a high constitution skill in order to be able to carry more goods. The third job is the Overseer, this person handles the resource management and sales of the business, this person needs a high stewardship skill in order to maximize profits. You could have 3 people from 3 different families working there. Of course a proud nobleman might have a problem with being assigned as the runner boy.

    That's only the blacksmith, each workplace has a combination of different professions. For example the forester only plants trees, so there are no runners and no overseers.

    There is absolutely no gender distinction in the game, any man or woman can do any job.

    Marriage is pretty much a class only thing but it's also a tool to help people climb the power ladder. There are no equipment per say but people will consume a set amount of clothes every year, again depending on their classes. Nobles require better garments than farmers.

    I hope I answered all your questions, let me know if you have any other.

    Have a great day!
     
  10. MaxRoetzler

    MaxRoetzler

    Joined:
    Jan 3, 2010
    Posts:
    136
    Hey,

    this project looks really impressive! Are 1000-3000 verts per building really a problem? What platform(s) or min specs are you targeting?

    From a visual point of view, there's a few things I'd probably change or work on. For example:
    • De-saturate some of the textures
    • Add more variation to the ground textures (mix more textures together + use an alpha to improve blending)
    • Depending on the ground textures, exchange the grass for fewer, prettier bushes
    • Replace the realtime reflection on the river with flow maps and foam (does much more than reflections)
    • Use tile textures per building style/evolution (which is a third option besides using an atlas or unique textures, that also allows for lod's)
    • Replace the DOF with fog or atmospheric scattering
    Just my opinion! :) Given the visuals of version from two years ago, its already quite the improvement.
     
  11. Thomazml

    Thomazml

    Joined:
    May 17, 2015
    Posts:
    15
    Ouch, I know how it feels bro, =\

    I've put down my dog last year and, even he was 16 years, it was very painfull to do it...

    If I was you, I'll look a little bit more in CotN. It's a very good game (a bit unpolished, but..), and it's economy mechanics are great, the hole economy it's based in food. Every family has a house based job/class (farmer, shopkeeper, luxury shopkeeper, noble, servant, etc..). There is a division between private buildings and public buildings too. Public classes (such as Priests, Overseers, Comanders, brickmakers, papirus makers, etc..) are paid by the Pharao (in food).
    The nobles in your town gives you the ability to alocate more farmers houses (each small mansion = 4 farmers houses). So the farmers produces food each year. Some of this food (most, hehe) go to the nobles, and, of course, you can tax them (in food too, it's the currency). Some go to the farmers. Each family has some products needs, and they go shopping (the upper class needs luxury products too), so the food circulates, and it's consumed too (people has to eat!). Well, there is more, but I'll let you discover, or ask, if you want.

    What will be the depence in the player? The player will have to assing the jobs? The player will have to build the houses (and, it'll be possible to upgrade them? if yes, by the player or by the family it self?)? If you could explain how much and where the player can directly interfere....

    Love the work you've done so far =)
     
  12. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Hey zortech! Thank you very much for the feedback! I agree with the ground textures variations an maybe some flowers bushes here and there wouldn't hurt! I don't think the buildings are really a problem so far, it seems the biggest cause for concern right now are my trees I know I'll have to replace them eventually I'm just always pushing this back.

    The rivers are actually already generated using a flowmap (a very rudimentary one mind you) it looks gorgeous with movement! The thing is I can handle the flowmap generation but I don't completely understand how the actual shader works so implementing foam at this point is way beyond my abilities.

    Thanks for the feedback, all really nice points!!

    Hey there Thormazml, I really like the fact that you need to have noble families in CotN in order to get more work force, it's something I might start dabbling with in my game as I was looking for a way to have more interesting families interactions. Having to deal with more powerful families makes for an interesting mechanic I think.

    So far yes, the player manages the business he owns (which is all of them by default). Your state stewardship will determine the amount of Fields and businesses you can directly control. You get to decide who works where and who sits on your council. You can put up a business for sale or give it to someone. If that person is a Serf they immediately become a freeman. The houses can be upgraded by its owner if they have the means to pay for it and have the proper social status.

    The player mainly interferes through edicts and politics, by setting taxes, guard patrol routes, sanctioning crimes, interfering with family feuds and of course designing the village. No one else but you can place or remove buildings. New buildings open up new possibilities and events. At its core this is still a base management game so you're to make sure your people are well fed and happy. If not make sure you have the proper forces to keep a hold of them or you could be dealing with either a revolt or a mass exodus.

    Thanks again for the kind words, it's the first time today that I touched the project since the 19th and even though it wasn't as productive as I'd hoped I still came up with a little system to determine production and consumption of items:

    Blue is the total amount in stock, green is amount produced and red is the amount taken from storeage (not necessairly consumed)

    This is a rebuild from a previous system that used particle systems to draw the lines in world space, attempting to scale it with camera was a nightmare. So thanks to the new UI I managed to come up with this in a few hours! I can see a lot more coming from this little system!
     
    Thomazml likes this.
  13. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Procedural Terrain Generation:

    For a while now I've had a very very basic terrain generation process in my game. It was a simple perlin noise algorithm for the heightmap. I would clamp any value below 50 up to 50 so that I get a nice flat area to work with. I would then pick a random point on the bottom right, and spawn a random path until I reached a terrain edge.

    Once the edge was encountered I would lower the terrain around my path and that would be my river. The problem with this approach was that the river was completely independent from the terrain. So it was very common for a river to simply flow through a mountain, of course the mountain would be lowered from the path but it still looked very weird.

    For the past 4 days I've been trying a whole lot of different solutions that didn't work at all. It was hard, and at one point I thought to my self: This is it. That's the point where I can't go on further, I've reached my limit. I can't make this game.

    But being an extremely stubborn person, I literally spent the past 16 hours just reading papers, looking at forums, pdf documents, conferences even not gamedev related documents on how rivers, heightmaps and all that work.

    I'm not entirely done yet, but now it looks great and the rivers do make sense. I'll walk you though what's happening when generating a terrain.
    -------------------------------------------------------------------------------------------------------------

    First we take the current seed value and generate a simple perlin noise heightfield:


    Since we don't want to have mountains everywhere we make a "Control Map" which will determine where we'll keep the mountains:


    This is where most of the changes came. I found that the easiest and most reliable way of spawning a "random" river path on a height field is by using PathFinding. I'm already using the Aron Granberg's AStar pathfinding project. Great!

    But that didn't quite work out as I had no idea how to modify the fCost of each nodes since his package makes up about 20K lines of codes. Instead I found this amazing tutorial :


    So using this I made my own AStar package, and managed to get a graph where each node has a penalty proportional to its height. Since rivers tend to flow to it's lowest neighbor that's perfect. I also tell it that any node above the minimum height is straight up unwalkable.

    Allright so we then generate a path from the bottom left corner to the upper right corner:


    This path is then smoothed out using an interpolation function. We then spawn a river node on every 5th point of that path. Those nodes will help us create the flowmap so that the river moves realistically. Each node is then set to have it's transform.forward pointing at the next node on the path.

    We then lower each point on the height map to the riverbed's height, I also generated a river height mask that surrounds the path so we can also lower the mountains around the path:


    I then merge both maps by multiplying them:


    I have a Plane that's at the water level that goes across the entire terrain. I can then use the river path nodes to determine the direction of the current using a flowmap. The shader comes from the amazing Scrawk: http://scrawkblog.com/2013/12/12/tiled-directional-flow-in-unity/

    I never would have been able to write that shader myself but I understand its inner workings (I think). Using the following image for reference we can compute the actual velocity vector from a node's eulerAngle.y value:


    What I do is for every pixel around a certain radius from each river node is get the nearest river node's flow color and assign it to the pixel.

    Once we add the flowmap, the base heightmap as well as the river path we end up with a good enough terrain:


    It's hard to tell from a static image but the river flow actually follows the river direction. It takes about 30 seconds to create and paint the terrain as well as distributing trees and other resources on the map.

    The reason there are only trees in the middle is that this is the playable area for now. My terrain is 2048 x 2048 but my A* pathfinding graph is only 1024 x 1024, since Unity can work on 64 bit I might try using the full terrain.

    For now I'm only using one river, but I could technically draw any amounts on any terrain. I'll have to revise the way they're being spawned though because right now it's always from the bottom to the top right, if I want multiple rivers I have to make sure they don't cross.

    Soon I'll add some lakes.

    It's been a very rough couple of days but this is one of the reasons I love programming, making something work is one of the most satisfying feelings in the world!
     
    Last edited: Jun 10, 2015
  14. Thomazml

    Thomazml

    Joined:
    May 17, 2015
    Posts:
    15
    Keep the good work =))

    You have some tips for a begginer? Beacause I don't see many tutorials to create a strategy / city / base / village / building game =\
     
  15. lighting

    lighting

    Joined:
    Dec 21, 2011
    Posts:
    42
    It's the masterpiece with creating procedural river.
    Do you also plan co create procedural roads, or even villages, cities :) ?
    If you will be able to make it all working together on one map and still look natural, you are the master of procedural generation.

    Good luck !
     
  16. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Thank you :) There are two tips that I've been applying since the beginning of this project and that kept me on the right track.

    Break it down into the smallest possible problem. This one is easily overlooked, it's easy to see the big picture and think "Hey I want X feature" but that's never how you actually implement it. For the building part for example first I made a script that made it so when I clicked a button, a building would follow my mouse on the terrain. Once I got that going I added a feature where when I clicked on the mouse button it would place that building on the ground while keeping the one that followed my mouse. Once that was done I added the ability to swap different meshes during construction. And so on, always adding a little feature. I eventually ended up with a full fledged building placement system with different placement conditions for each building. The same goes for everything else, start small and slowly work your way up for each aspect of your game.

    Never give up. Yeah, easier said than done and there are a few times where you think that it's just too hard. But what I've learned is you get the most experience from plowing through these hard times. I guess it's easier for me as I'm not waiting on gamedev for money I really only do it because I enjoy it.

    (on that last point) Try everything! Just like you I noticed there are barely any tutorials for RTS games, and much less for city/base building. So refering back to point # 1 try to think of the absolute simplest way of accomplishing something and try it. If that fails try something else. Again this is something I have the luxury to do because I don't have a release date announced and no backers or publisher to answer to.

    That's really all there is to it, a whole lot of patience and a little bit of an idea is all it takes. Whether the final product is worth all the efforts well I guess we'll see when it's done :)

    Hey there lighting! Thank you very much for the kind words! I took a long time but I'm quite happy with my current terrain generation process! I do not plan on making the rest procedural since the core of the game is about the player building the roads and the village :)

    I guess I could for fun but there's so much work left that I'd rather concentrate on the game itself for now.

    Thanks for the great feedback!!
     
  17. lighting

    lighting

    Joined:
    Dec 21, 2011
    Posts:
    42
    Hah, you deserve this :)

    I'm about to start some experiments with procedural terrain with rivers , roads and even urban areas and you've shown best direction, I've met so far. Adding all these elements together (e.g. rivers and roads) make things more challenging.

    One again, thank you for describing the method and inspiration :)

    P.S.
    I've encountered also another method of generating terrain, maybe it'll interest you - http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/
     
  18. Adroytus

    Adroytus

    Joined:
    Apr 1, 2014
    Posts:
    8
    This project looks great! Any chance of a playable demo?
     
  19. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    You're welcome, I'm still tweaking the settings in order to get the best looking terrain as possible. I now realize there are so many ways to create noise maps and even more ways to combine them (add, substract, multiply, power, root, average) It took a long time to get where I'm at but I'm finally really starting to have fun with it!!

    Thanks for the link, that was actually the very first page on procedural generation I saw a year and a half ago when I wanted to have automatic generation in my game. Back then it all made sense but I had no clue how to actually program it. And to this day I can't even begin to understand how I would code a Voronoi graph. I feel this would be amazing to generate world maps through probably not maps of the scale I'm working with.

    But maybe I'm just making excuses also, Voronoi graph just seems so hard to implement.

    Anyhow I'm very pleased with what I have so far, I can finally go back to implementing actual gameplay features :)

    Hey there Adroytus! Thank you for the nice comment! Well I do have a playable build but it's riddled with bugs, and there are no indications of what to do or how to play. I'd rather wait until the game is more stable, intuitive and hopefully more fleshed out before I let people openly try it. Eventually I will have closed testing if you're interested I'll post the details here when I'm ready (in a few months)
     
  20. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    First version of the dynamic wall placement.

    One of my favourite game when I was a kid was Stronghold. The way you could build your castle/village was amazing. It wasn't just a matter of placing building but also walls. So far in Manor Lord this is purely cosmetic for the time being. I don't necessairly want to have combat in the game because I never want the players to directly control people.

    If there is combat it would be something like set attack/defence points, form your units and let the battle unfold. In either case the walls will definitly serve as increasing land value for the buildings placed within the walls. I'm still trying to figure out if a given point is within enclosed walls and so far I haven't found a reliable way to do that.

    The system is limited to 45 degrees angle and right now the 90 just doesn't work I have to make two consecutive 45 for it to work but regardless here is what it looks like so far:


    Starting from the watch tower (barely visible on the left) we'll drag a wall out







    You get the idea, just drag the walls and click to make a new control point to eventually have this


    So far it's looking good, but I'm not using any fancy system. I just lay down nodes limiting angles and then spawn each point of the path. I place a wall piece according to it's surrounding 2 nodes so I can tell which piece to use. (straight, left, right, etc)

    The walls were made very quickly and texture repeat is extremely noticeable when up close also they feel sort of smallish but since my grid is small to begin with (the width of the dirt road is one unit) I'm not sure if using bigger walls could / would work.



    To finish here is a nice windmill next to a river in fall.
     
    Thomazml and Debhon like this.
  21. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    New home upgrades:

    I finally got around to making the house upgrades. It takes me a while to get started when I make new models because I still find it very hard.

    The first houses that people can make are simple wattle and daub shacks with thatched roofs. These provide enough shelter and storage room but not much else. Eventually the richest will be able to purchase their freedom (or you could just give it to them if you feel nice).

    Once free and able to make more money they'll be able to upgrade their houses. Going from a shack to a timber house with a stone foundation. These will provide much more satisfaction and allow people to house more resources and if they're rich enough hire servants.

    Here are the serfs shacks next to each other:


    And here are two timber houses next to each other:


    I made them so they actually connect to each other. It gives the effect of a denser city. Here are two wards next to each other:


    I only have two models so far so they end to repeat themselves I plan on having 4 or 5 at least.

    These are direct upgrades to the Serfs shacks, they can also be built on their own if certain conditions are met. Next will be the rich merchants and noble houses which will have a bigger grid size so these will need to be built from the ground up.
     
    Thomazml likes this.
  22. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Update on dynamic wall placements
    I redid all the wall pieces as I thought they were too small, also made a 90 degree piece.




    They feel a bit bigger as stone walls probably should. The problem which is very apparent now is the extreme tiling on the walls as the texture keeps repeating itself every 2 units. I'm really not sure how to go about that to be honest.

    A wall piece is placed along the path at every 2 units, once a wall is done I combine the pieces together. Every 40 pieces is combined in a single mesh.

    Then we need to let people in and out of the city walls, to do that you can place a gate:


    Once the gate is finished I simply rebuild the combined meshes after destroying the walls that were inside the gate:


    Of course this is mainly for prototyping and testing purposes. You won't have the man power or resources to build a stone wall right at the beginning with such a small village. What's nice about this system is I would only need to create the art for a wooden wall and that's it!

    If anyone has an idea how I can determine whether a building is located inside the walls or not that would be amazing as right now I'm really not sure how to do that!
     
  23. Adroytus

    Adroytus

    Joined:
    Apr 1, 2014
    Posts:
    8
    Those walls are looking pretty good! Maybe you could break up the repeated texture by placing decals on the wall in random locations (not sure on how to do that though).

    As for telling if a building is located inside walls, if you think of your walls as a polygon you could use the even-odd rule (https://en.wikipedia.org/wiki/Point_in_polygon). Basically, if a ray casted from a building intersects a wall an even number of times it is outside the wall, if it intersects an odd number of times it is within the wall. Your case is a little harder because buildings aren't points, they have volume.
     
  24. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Hey there, thank you for the kind words! I think decals could help, I also thought about making tiling the UVs of the mesh from their worldPos but that means I would need to alter UVs on potentially hundreds of pieces.

    Maybe I'll just place a random flag, or window or just a wooden post.

    I saw that algorithm yesterday thank you it looks nice, I think it could work since I'm generating box colliders for each segments of the wall.

    It's fine since I would only be checking the building's origin as you can't build a wall where there's a building, and you can't place a building if it's colliding with something else so there will never be a case where a building is touching or placed inside a wall.
     
  25. Ed Frost

    Ed Frost

    Joined:
    Sep 10, 2014
    Posts:
    10
    looks awesome, so... when does closed beta or something start? and can i join?
    oh and btw, i could help you with a simple website... no forum tough.

    and again, remembered something.... im one of those people who dont give a f*** about bugs as long as i can test and play.
     
    Last edited: Jul 6, 2015
  26. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Hey there Ed Frost! Thank you so much for the interest in my project!!

    I'll definitely keep your name in mind when the time comes, I'll need people to try the game firstly to balance things out but also to make sure it's fun!

    I want to wait until there is a little more cohesion because now it more or less feels like a bunch of disconnected systems all interacting with the sandbox once everything is tied together I'll begin recruiting for closed testing.

    I'm hoping to be ready for that in a couple of months and even then you can expect a bug riddled semi-game :)

    Thanks again for the encouragement!
     
    Ed Frost likes this.
  27. Venryx

    Venryx

    Joined:
    Sep 25, 2012
    Posts:
    444
    Do you mean just checking whether a building to-be-placed would intersect with the wall? You should just be able to loop through the Bounds of the colliders or renderers of the wall-pieces, and check whether any of them intersect with those of the preview-placement building.

    So something like this:
    ==========
    Helper methods:
    Code (CSharp):
    1.     public static Vector3 Vector3Null { get { return new Vector3(float.NaN, float.NaN, float.NaN); } }
    2.     public static Bounds VEncapsulate(this Bounds self, Bounds bounds)
    3.     {
    4.         if (self.center.Equals(Vector3Null))
    5.         {
    6.             self.center = bounds.center;
    7.             self.size = Vector3.zero;
    8.         }
    9.         self.Encapsulate(bounds);
    10.         return self;
    11.     }
    12.  
    13.     public static Bounds GetBounds(this GameObject self, bool includeInactive = true)
    14.     {
    15.         var result = new Bounds(Vector3Null, Vector3Null);
    16.  
    17.         foreach (Renderer renderer in self.GetComponentsInChildren<Renderer>(includeInactive))
    18.             result = result.VEncapsulate(renderer.bounds);
    19.         foreach (Collider collider in self.GetComponentsInChildren<Collider>(includeInactive))
    20.            result = result.VEncapsulate(collider.bounds);
    21.  
    22.         return result;
    23.     }
    Usage code:
    Code (CSharp):
    1.     public static bool DoesBuildingIntersectWallPieces(GameObject building, List<GameObject> wallPieces)
    2.     {
    3.         var intersectionFound = false;
    4.         foreach (GameObject wallPiece in wallPieces)
    5.             if (building.GetBounds().Intersects(wallPiece.GetBounds()))
    6.             {
    7.                 intersectionFound = true;
    8.                 break;
    9.             }
    10.         return intersectionFound;
    11.     }
    If you're worried about performance, you can of course quickly ignore any wall-pieces that are farther away. E.g., any wall-piece more than 10 meters away has the foreach loop call "continue" to instantly skip it.
     
    Last edited: Jul 12, 2015
  28. Venryx

    Venryx

    Joined:
    Sep 25, 2012
    Posts:
    444
    I just realized you said you're combining the wall-pieces into groups. The above code won't work off the bat that way, of course. If you have box-colliders set up for it though, you can modify the DoesBuildingIntersectWallPieces method to something like this:
    Code (CSharp):
    1.     public static bool DoesBuildingIntersectWallPieces(GameObject building, List<GameObject> wallPieces)
    2.     {
    3.         var buildingBounds = building.GetBounds();
    4.         foreach (GameObject wallPiece in wallPieces)
    5.             foreach (Collider collider in wallPiece.GetComponentsInChildren<Collider>(true))
    6.                 if (buildingBounds.Intersects(collider.bounds))
    7.                     return true;
    8.         return false;
    9.     }
     
  29. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Hey there Venryx! Thank you so much for taking the time to try and approach this problem!

    My issue isn't related with the actual building placements unfortunately. For that I check the collisions before even allowing the player to build a building. So you cannot accidently place a building where a wall is placed or vice versa. No my issue is after the building has been built. Take a look at this image:

    You can imagine a box collider along every segment of the wall.

    In the image above all the buildings in green are completely enclosed by walls which means they will never be attacked by wild beasts and have a much lower chance being attacked by bandits. The building in blue is completely in the open and therefore much more subject to attacks. I'm looking for a way where I can query a building (the center of if anyways) and determine (am I completely surrounded by walls?)
     
  30. Venryx

    Venryx

    Joined:
    Sep 25, 2012
    Posts:
    444
    Okay, that makes sense. I figured I was misunderstanding something, since it seemed you already had the basic wall-building finished.

    For the problem above, one approach that comes to mind is to start from the building center, and do raycasts in each of the four directions, finding the four surrounding lengths of wall. Then get each of the hit-points, move into the wall that was hit by 1 meter, and raycast along the wall length. That should give you all the objects along that line, and you can find any gaps by checking that list of objects for matches at each wall-piece slot along the wall-length.

    If there are gaps, raycast out in four directions from each of those gaps to find unprocessed wall-lengths, and continue the process for those walls. (I think you only need to do this once per gap-length, i.e. once in the image above)

    If at any point you raycast out and don't hit a wall-length in one of the directions, then you can stop, because you know the area is not fully enclosed.

    If instead you process all the hit wall-lengths (found recursively), and none of them have any gaps, then you know the area is enclosed.
    ==========
    This should be pretty performant, since each gap only extends the searching process by four raycasts.

    In the image above, I think the total raycast count would come to something between 10 and 24 (depending on how many optimizations you make), and would not increase with greater wall lengths--only the number of extensions/gaps it contains.
     
    Last edited: Jul 12, 2015
  31. Venryx

    Venryx

    Joined:
    Sep 25, 2012
    Posts:
    444
    Another simpler way might be to just raycast in one direction to find one wall-piece, then start a simple recursive neighbor-search along the perimeter. If the search comes back to the initial wall-piece, then the wall is complete. Otherwise, there's a gap.

    This could take longer if you have lots of interconnected wall areas. But given your game's environment, that's probably not the case.

    Anyway, I would probably use this latter approach, since it's easier to code, and should be "good enough" performance wise. I guess the above post was kind of just out of interest for the thought-experiment (i.e. fun).
     
  32. Ed Frost

    Ed Frost

    Joined:
    Sep 10, 2014
    Posts:
    10
    I'll keep waiting then :)
    if you'd need some help thinking about making it more cohesive, just pm me with some details and i'll see what i can think of.

    edit:
    i agree with this suggestion, and besides, if you have this in place, and you might encounter problems long the way, you can change it whenever you want, without other having to wait longer for it, because there is a system for it, which can be changed when needed, you could also make the 2 approaches an option to choose from, so people can choose what they would prefer. just my 2c
     
    Last edited: Jul 14, 2015
    ensiferum888 likes this.
  33. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Thanks @Venryx I believe I'll go with the second option when the time comes!

    I'm really proud to finally show you the game in action!


    This my first ever video capture and editing, it's not really a nice quality video but that was my first attempt at doing so. My game does not VSync and runs at about 100FPS in the final build, I set OBS to capture at 30 in order not to stress the system but the lag is definitly noticeable (not actually in the game)

    Hopefully this will provide more information as to what kind of gameplay you can expect from this game.

    Thanks for your time!
     
    Thomazml, Ed Frost and Venryx like this.
  34. Thomazml

    Thomazml

    Joined:
    May 17, 2015
    Posts:
    15
    Good videos! It's not clear how you handle personal belongs, and things like cloth/ceramics, etc..

    And it'll be great to be able to see where the people live in the selection job UI (because you may wanna to put people who live near in the job, to be more eficient). And, there are numbers of peasants / families??

    How do you treat classes?
    And, the servants houses are to fancy.. make some poorer models (a tier 0 house)... :B
     
    ensiferum888 likes this.
  35. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Hey Thomazml! Glad to see you here!

    Thanks for the comment on the video! I know the quality is awful and the editing isn't that great but as a first experience I liked it. I know I'll need to get a better computer to capture better quality footage it seems. The serfs hovels are built at 0:36 in the video, they're wattle and daub houses with a wooden frame and thatched roofs. No floors so they're pretty poor :)

    The ones with the slated roofs are the freemen houses which cost more materials to build.

    Sorry for the incoming wall of text

    The personal belongs are handled by the villagers themselves not by the player. I don't have an "inventory" system in a sense that people cannot equip items. They can only take, consume and / or drop resources.

    So for example a Serf will consume one unit of plain clothes per year. A Merchant might need 2 units of expensive clothes whereas a noble will need 10 in order to fulfil their needs.

    Freemen will require some furniture in their houses whereas serfs don't really care about that as they're too busy trying to get enough food to survive.

    I agree, in the video above I think I had 30-40 population and they were all really close to the windmill. You'll want your miller to have a high craftsmanship skill so they can produce more flour with the same amount of grain. House distance really matters because if they get hurt while working (the chance of getting hurt is directly affected by their constitution and craftsmanship skill) then they'll need to go rest at home for 45 seconds (a whole season is 600). Unless there's a physician then they'll go there for 15 seconds, get patched up and get back to work.

    At the begining of every season they'll also make an inventory of their houses and if they don't have enough food to least an entire season they'll go get some food from the storeage barns and bring it home.

    That's the only time a worker will be interacting with its home. Of course of you set a production limit then your worker will do whatever he likes on his free time. Be careful inactive workers are still getting paid. (instead of giving workers a set salary I'm thinking about paying them according to their production)

    I'm still fiddling with different ways of handling the economic side of it. For example, do I want people to have to pay for their food? Serfs definitely won't have to because they were under the lord's protection since the serfs are your main source of food it's only normal they're entitled to a part of it. But for freemen and merchants I don't know, it would make sense that they do but then who do they pay? The person producing the food or the player?

    The classes have an impact on different aspects of your village. You begin with 5 Serfs families and your own noble family. The serfs can be used to harvest crops, hunt, fish, gather wood etc. They're fairly easy to please, a well, enough food and a house will be more than enough to keep them quiet. Once a serf has gained enough money (still not sure on the amount) they can buy their freedom. They can become a Freemen.

    Freemen are entitled to bigger houses (more needs to fulfil) but they pay you more taxes and can work some positions like the Mason (can repair and build more advanced constructions). Freemen can still harvest crops but they'll require a pay in exchange. The Steward positions on your council can only be occupied by a freemen and above.

    Merchants are freeman who either own a business or make a living from trading resources. They are really just rich freemen though they have more needs to fulfill. Merchants will reside in your village but a lot of them will be just passing through, hoping to trade some resources before moving on to another village.

    Then there are 2 classes that haven't been implemented yet because I'm still seeing if it would make sense to include and what I could do with them : The Knights (right now you can hire guards or soldiers but they're really henchmen) and the Clergy. I have a priory that you can build and hire monks, the problem is there is no monk or ecclesiastical class yet. And it feels weird to take a serf and tell him "from now on you're making copies of holy text" because they most likely don't know how to read. So I'm thinking of adding Clergy as a class which is made of educated people.

    Finally we have the nobles, so far there is only one noble family which is yours. Nobles have insane food and needs requirements. But after seeing a bit of CoT footage it gave me an idea that nobles could enable you to hire more people. This is still something that's being designed so it's all subject to change but so far this is how I envision the classes working together.

    Let me know if you have any more questions I love answering them because it forces me to think about my design. It's so easy to get caught up in a specific feature or bug.

    Thanks for your time!
     
    Thomazml likes this.
  36. Thomazml

    Thomazml

    Joined:
    May 17, 2015
    Posts:
    15
    I think the aspect of the buildings and the ambience are too light, for the Dark Age, hehehe

    Hmmmm...
    You need a more comprehensive economics. Define what'll be the currency, and how it'll affect the gameplay. It's essencial for a simulation game to have solid design in such things. How people will trade? How you will handle NPC's economy? Only the serf produces food? The manor will consume things? If you use gold, you have to get an input and an outup, and consider it very carrefuly. The property will be commune? Or not? How "private" npc will live? Selling their work? And if they don't sell? To who they will sell?? And the noble class, who'll pay for their luxury needs and absence of work?


    Sugestion:

    Freeman should notice you when they are "freeing" themselves. They could ask for a piece of land, or an artisan job. With this, they would not starve to death, or become criminals and, after judgment, serfs again (hehehe, that option of turning freeman in to serf, if they are starving, or in debt seem's logical and historically acurate). Or you could designate comune fields for farming, or pastures, and serfs and freeman could work there (only the pay would be diferent).

    The church could take her tithes (from everyone!). This would allow them to dedicate themselves to do religious stuff. But they must be educated (maybe only rich freeman and nobility could "give" family members to clergy). You could build monasterys too, and the monks could farm/ do economic stuff.

    As for knights, they could be from another noble family (each noble male is sworn to the manor lord, and will serve in times of war as knigths). A noble family would buy weapons to equip their members, and have serfs of their own.
     
    ensiferum888 likes this.
  37. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Thanks again for making me think about these aspect!

    Well I say Dark Ages, the game takes place in a fictional universe. But if we wanted to place it somewhere it would be in the 8th century, it's more the early medieval period. Although my game has a lot of aspects of the high middle ages as well. It's mainly to describe the social climate, lots of poor people trying to get by, lots of rich people trying to get richer. Most towns were ruled by barons or knights who constantly waged wars on each others.

    The rise of the trade, and the appearance of merchants allowed cities to flourish, some were even granted a sort of independence from the king. This is something that I find very interesting. The more opportunities you give to your population the better your town will be.

    I agree the building do look more like the high medieval period, maybe I could make the very first tier buildings poorer you're right.

    As far as economics goes the main currency is of course gold. But people can resort to normal trade where you can trade the item's gold value. The stewardship skill of the trader allows for more negotiation options and therefore better value.

    Here's how things currently are implemented:

    Homeowners receive a fix amount of money every season (the game is budgeted on seasons rather than months, 1 season = 10 minutes). The reason for this was to inject money in the economy, I realize it's a cheap way out but that's all I found for the time being. Say 5g. Paid work (everything except farmer) gets also 5g per season. So far yes only serfs actively produce the food or at least the raw materials for food. Most of your serfs will probably be assigned to field work or livestock.

    Serfs bring all the food they produce to the tithe barn where it can be picked up by everyone for consumption or for production. For example you have a wheat field, in fall the wheat gets placed in the barn. It's picked up by the miller who turns it into flour, then brings the flour back to the barn. The flour is then picked up by the baker which is turned into bread. The bread can then be consumed by the people.

    So far no one pays anything when they get food from the barn. Which makes sense as Serfs were entitled to a portion of the produce. I also though about making demesne field and common fields. Demesne crops will be yours whereas common would be put in the barn for usage. Freemen and above should pay for food though, but should they pay the lord or should they pay the person who produced the food? Also say I have 4 bakers in my village, which one do I pay when someone picks up bread?

    One way I though of doing it is have the industries produce a given amount of resource. For example let's take the blacksmith, someone with around 10 craftsmanship will be able to produce 40 tools per season. They get to keep 1/10th of that for themselves. The rest goes in the barn to be used by your village (production, construction and maintenance). With the 4 tools per seasons they can repair their houses, or offer them to be sold. For inner village trade these are the resources that would be used, those that you can't see as the manor lord.

    There is an offer queue, and a request queue. People with certain needs will say I'm willing to pay this much per units of tools , then people with tools to sell will say I'm willing to sell these at this price. If the system finds a match the tools get transferred to the buyer and money gets transferred to the seller.

    Nobles have connections, so if they need something that's not in your village they can pay for it. For example nobles love game meat (not the same as meat which comes from cows and sheep). The standard price is 2g per unit but they can pay 6g to have it delivered if it's not readily available.

    As the lord your main source of income at first will be only trade and judicial rights. Trade will be very scarce as you're not producing much, and judicial rights won't pay that much since your population will be very poor. Eventually you'll be able to rise your power level and actually start taxing people properly getting a more steady income.

    The main problem from having every villager being simulated is that for now most of them do not have the money to pay their taxes. So I look at my budget, I expect to get 75g in taxes, but I only get 23, then everyone else is mad because I took everything from them.

    Usually how it worked was that serfs would buy their freedom from their lord, this is another source of income. The thing is serfs will farm your fields for free, freemen will require a salary. (a serf blacksmith still requires a salary for example this is only for farming)

    If you have any ideas please feel free to share!

    To your suggestions:
    I have a church(priory) already, I thought about making a religious tithe and it would be appropriate. It's just not implemented yet. The monks in your priory will make copies of holy texts. These can be kept in your church to attract pilgrims and all the trade they bring. Or they can be sold for money and renown.

    The tithe could be used to help the poor in your village, people who do not have money to purchase food would be seen to by the church itself.

    Even if you're the lord, you're still someone's vassal, be it a higher duke or the king himself. So you'll need to pay taxes, or send some food or even provide fighting men to your lord every once in a while. I'm afraid if I add the tithe there it's going to be too much. But there's nothing like prototyping I guess!

    I really really like your idea with the knights, I was looking for a more important role for the noble class and I think you just found it. They would provide the bulk of your fighting forces, in time of peace there could be feuds between noble families that you have to resolve.

    Thanks again I really enjoy these posts!!
     
    Thomazml likes this.
  38. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Oh and here's a castle I've been working on:
     
    Thomazml likes this.
  39. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    First step torwards making the economy more interesting.

    I've now split fields into ether demesne and freehold fields. Field in your demesne will be worked by serfs, 100% of the production will be given to you. With that you must feed your serfs, keep a stock for next year's planting and sell the rest if you desire.

    Freehold fields will be "given" to your serfs for their own production. Of course 25 percent will be due to you in taxes, but the rest can be kept for their own uses.

    Your stewardship as well as your reeve's stewardship will be used to determine how many demesne fields you can handle at a time.

    Here are two fields with the same dimensions:




    Wheat doesn't seem to be worth much of course, but it can be turned into grain, and then into bread which is the staple food for your population.

    There's going to be a lot of tweaking required but I believe it's a step in the right direction. I was looking for a way to inject money into the economy and it seems I've found it. Everytime a merchant passes through town, after concluding business with you he'll ask around your villagers, if they have more food than they need they'll sell the excess.

    Here we see Serf Arturus has sold a lot of peas to a passing merchant. The prices are adjusted according to the seller's stewardship. Any points above 10 will increase the value by 3%, any points below 10 will decrease it. At 10 you just pay or get the base price.


    Now I just need to balance the numbers, but I still have a lot of work ahead of me.
     
    Thomazml likes this.
  40. Thomazml

    Thomazml

    Joined:
    May 17, 2015
    Posts:
    15
    Lovely castle =))

    There's a book, "Castle", by David Macaulay, that can give you interessing ideas, both from the text but, more, from the art (beautifull :O)

    I liked your system, but the thing about the seeds... Isn't too much micromenagement? Pehaps if your reeve could menage this things (optimize production, etc..). But nice aditions! I'm still following your work =D
     
  41. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Update on Trading:
    Hey everyone! It's been a while since I posted an update on the game. I've been on vacation for the past 2 weeks it feels great, I did take some time to work on the game though!

    First I fixed a lot of bugs, sometimes people would bring the needed resources to a construction and there would be like 2 units of wood missing, therefore the construction would never begin. That has been fixed I haven't seen the bug for a few hours so that's good. Second is when I had multiple storeage barns everything would just stop, again I fixed my logic to find the nearest storage barn that contains a specific order. That seems to have worked as well I experienced with expanding settlements and there were no problems:


    Now the interesting part! For a while the only way to do trade was to wait and hope that a merchant passes through your town. At first this is really hard because the chance of a merchant passing through is very low. Now you can build the caravansary! This is like a work place but it will do a single job once.

    You begin by hiring a trader, at its most basic form the only person who can work there is the trader.


    Then you determine how many items you want to be transported. The bar at the top right indicates the caravan's carrying capacity.

    You'll want someone with a high stewardship skill to get you the best price possible. Again your town power level will give you a trade penalty or bonus depending on its value.


    The diplomacy skill of your trader will determine how much renown you will gain from the trade.


    The trader's Ruse skill will influence the trade route risk (bandits, accidents, etc) but this hasn't been implemented yet. When all the required items are loaded in the caravan you'll be able to send the trader away, after a while he will come back with the money.

    This is good because for a while I didn't have a way of getting rid of my resources for example a hunter that produces hides but no tanner to turn them into usable leather. The caravan at worst can be used a resource sink to make room in your storage barns.

    Eventually this system will be hooked up to the world map and you'll be able to decide where to send your caravan to in order to get the best possible prices.
     
    RavenOfCode and Thomazml like this.
  42. hamesy

    hamesy

    Joined:
    Apr 23, 2015
    Posts:
    5
    I've been watching this thread for some time now, and I love what you are doing. When you open this up for beta testing, I'd love to be a part of it.
     
    ensiferum888 likes this.
  43. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Thank you very much hamesy!

    I'll post here when I'm ready for some closed testing hopefully before Christmas this year!!
     
  44. Thomazml

    Thomazml

    Joined:
    May 17, 2015
    Posts:
    15
    Just passing by, to say that I'm still here :3
     
    ensiferum888 likes this.
  45. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    So am I :)

    I've been working on my event system lately so I don't really have anything worthy to show just yet!!
     
  46. AussieSwissDave

    AussieSwissDave

    Joined:
    Apr 20, 2013
    Posts:
    97
    Followed this thread for a while and it's really exciting to see the game come along.

    Cities Skylines proved that you can make a top-notch simulation game with Unity3d if you have the vision and the balls. It's fantastic to see other entries into the genre.

    I've almost finished reading Bill Bryson's "At Home", which basically details private life throughout the ages. The biggest problem people faced in this time was disease, both to the people and to their crops. Have you considered implementing something along these lines? Perhaps the odd poor harvest that courses starvation, or a sweeping disease that knocks out half the population?

    Keep the screenshots and videos coming!

    David
     
  47. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Hey @AussieSwissDave , thank you so much for the support, it means a lot!

    The scale of my game will unfortunately never get close to city skyline, I'm still wondering how they achieved so many agents in the world, or how to make roads follow a spline for that matter. Also my building system is much more similar to Banished where you decide what you want to build and people will bring needed resource rather than zoning.

    Yes absolutely! There's already generic diseases in the game that people can catch and are more likely to catch if their family members are infected. I haven't really decided on crops yields yet. Balancing the game is much harder than I thought it would be, the slightest change seems to throw me from "Oh god everyone is mad because there's no food" to "Why can't I hold all these limes?" seriously games like Settlers or Anno must have had amazing people balancing them because it's damn hard!!

    Thanks for your input and feel free to ask any questions!
     
  48. StarGamess

    StarGamess

    Joined:
    Jul 21, 2014
    Posts:
    179
    Looks really nice. Not a big fan of the UI though. I mean its not bad but i think it can be improved ;p Whats your progress on the game anyware close to being ready for a release?
     
  49. Ed Frost

    Ed Frost

    Joined:
    Sep 10, 2014
    Posts:
    10
    would like to say the same thing about that one :p
    also wanted to say i'm still waiting for a release, even though i am having a tighter schedule since i just started on my new study.... which is in fact also partly about game design ^^
     
  50. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    Thanks for the nice feedback! Are you referring to the main white (default sprites) UI at the top right or any UI in the screenshots?

    Unfortunately for the time being, the ones you see (not the white ones) are really the best of my photoshop skills :$

    @Ed Frost As far as release goes I'm hoping to begin closed testing by Christmas, hopefully getting the game on greenlight by next summer if everything goes well. There are still 3 major systems I need to design and implement before I can even think about letting people play the alpha.

    Thank you all for the support :)