Hi guys. So I have decided that I am going to create a virtual medieval town this year for my portfolio and I am going to be doing it in XNA and C# so I was wondering if any of you guys could help me out.
Currently I would like it to be a purely AI powered town that will grow/decrease in size depending on variable factors. I would like each person in this town to have his own AI which will help him decide things like, what job to get and what he should do in various circumstances.
But I was wondering if anyone has ever done this before and documented their path.
And I was also looking for various articles on pathfinding and things that you would deem relevant to the task at hand.
If you would like to know where I am at right now with my project, then I can tell you that I am just laying down the foundations and am soon going to start work on a (simple) procedural terrain generator.
Thanks :)
Virtual Town
Game Development Tutorials - My new site that tries to teach LWJGL 3.0 and OpenGL to anyone willing to learn a little.
I have been thinking about building this for a long time. When I think things through i always discover there is more to the system than i previously thought. So I think the key is to realize just HOW much you want to simulate.
After you work that out you should modularize as much as possible so you can actually complete one chunk at a time and not get stuck with a mammoth cludge of crap.
After you work that out you should modularize as much as possible so you can actually complete one chunk at a time and not get stuck with a mammoth cludge of crap.
I know I am probably going to end up re-writing it again and again but I have a year to do it so I may as well do it right.
In the beginning i am just going to simulate everything which lead to the formation of a small community of like 30 people then build it up from there and see how big it will grow.
In the beginning i am just going to simulate everything which lead to the formation of a small community of like 30 people then build it up from there and see how big it will grow.
Game Development Tutorials - My new site that tries to teach LWJGL 3.0 and OpenGL to anyone willing to learn a little.
Quote: Original post by emforce
I know I am probably going to end up re-writing it again and again but I have a year to do it so I may as well do it right.
In the beginning i am just going to simulate everything which lead to the formation of a small community of like 30 people then build it up from there and see how big it will grow.
When you say everything I assume you mean:
*Character needs (Eating, drinking, shelter, entertainment, etc)
*Town economy (market place)
*Jobs (wood chop, farmer, hunter)
But you say you want to 'build up from there' so you need a way for the town to grow/shrink. Where do new citizens come from? How are houses build? who finds the resources and builds these?
And theres so much more to think about if you want NPC owned shops, crime, businesses with employees, town mayor and tax, guards and omg the list goes on.
So can you provide a little more detail of what you want to simulate>
Just as a word of advice, rather than simulating everything on the large scale I'd recommend going to the individual needs basis. This will get an end result that looks much more impressive and you can actually demo things other than #s going up and down for economy and such.
For pathfinding, amitp's blog has basically everything you need to find out and more.
http://theory.stanford.edu/~amitp/GameProgramming/
If you want to be lazy, check out the Recast & Detour libraries, although I doubt you'd need half of the features they include.
Ok, so I understand that you may want cool stuff like a procedural terrain generator, and that's fine, but you've got to prioritize a little bit. I'd get a system (non graphical) where you've got a basic decision "timestep" implemented. I'd write it in the same way I would a physics engine timestep (Box2D should be a good frame of reference). Then I'd deal with what the AI actors are doing currently, and what they choose to do when they're done (remember, this all happens in the timestep). Some good places to look are:
The generalized assignment problem (http://en.wikipedia.org/wiki/Generalized_assignment_problem)
Another option would be to go to http://aigamedev.com/ and learn about finite state machines, fuzzy logic, and hierarchical task networks (the latter two are fairly advanced).
Once you're done with the ascii version of your town, I'd go to making it graphical (this still doesn't mean anything fancy). If you're planning on making it 3D, I'd start it out being 3D but you better know what you're doing first.
I wish you the best of luck on your endeavors.
A couple small asides:
-use OOP concepts. If you want the people in your game to be any different, I'd simply make them all have the same super class somewhere up the line, and override the methods in that class.
-don't get side tracked. Trust me, I've seen ideas like this get shot down in the sky by overly perfectionist devs.
-get help early on. If you're open to it, this would be a good time to go out and make friends with someone you didn't know outside of cs class and make this project a co-op. If no one is up to it or you don't want to share, I advise finding someone you think is fairly experienced in cs and using them for advice.
For pathfinding, amitp's blog has basically everything you need to find out and more.
http://theory.stanford.edu/~amitp/GameProgramming/
If you want to be lazy, check out the Recast & Detour libraries, although I doubt you'd need half of the features they include.
Ok, so I understand that you may want cool stuff like a procedural terrain generator, and that's fine, but you've got to prioritize a little bit. I'd get a system (non graphical) where you've got a basic decision "timestep" implemented. I'd write it in the same way I would a physics engine timestep (Box2D should be a good frame of reference). Then I'd deal with what the AI actors are doing currently, and what they choose to do when they're done (remember, this all happens in the timestep). Some good places to look are:
The generalized assignment problem (http://en.wikipedia.org/wiki/Generalized_assignment_problem)
Another option would be to go to http://aigamedev.com/ and learn about finite state machines, fuzzy logic, and hierarchical task networks (the latter two are fairly advanced).
Once you're done with the ascii version of your town, I'd go to making it graphical (this still doesn't mean anything fancy). If you're planning on making it 3D, I'd start it out being 3D but you better know what you're doing first.
I wish you the best of luck on your endeavors.
A couple small asides:
-use OOP concepts. If you want the people in your game to be any different, I'd simply make them all have the same super class somewhere up the line, and override the methods in that class.
-don't get side tracked. Trust me, I've seen ideas like this get shot down in the sky by overly perfectionist devs.
-get help early on. If you're open to it, this would be a good time to go out and make friends with someone you didn't know outside of cs class and make this project a co-op. If no one is up to it or you don't want to share, I advise finding someone you think is fairly experienced in cs and using them for advice.
ROFLMAO-GG-HF-GL-LOL-TTYL-BRB-GTG
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement