Skip to main content
gamedev.net
🔒 Locked

Implementation Question

Started by RamblinPeck 2 replies 450+ views
Original Post
RamblinPeck
RamblinPeck
Lately I''ve been thinking about a game idea a lot, and while I''ll probably never implement anything I''m going to spend some time getting the details worked out in my head. Basically I have an idea for a SimCity style economic simulation, except on a smaller scale, like a small couple hundred resident town. I want the gameplay to be focused on meeting the individual residents needs (Work, Play, Food, Don''t want to walk to far, etc). My goal is to have the "sims" preforms fairly believable actions based on their current needs/wants along with going to work when they''re supposed to. Whats the best way to implement this? I''ve been thinking about a state machine based model, but that doesn''t seem like the best approach. Should I be thinking about getting fuzzy? Let me know. Thanks,
IADaveMark
IADaveMark
For a lot of the portions, you will need to have a FSM in place. This is going to be for things like "what is he actually DOING right now?" As for the needs and wants, that would best be handled by something along the lines of a FuSM. Each need would be represented by an individual scale. Conflicting needs can sometimes be combined into a single scale. For really advanced needs/wants, you may end up with a two dimensional area where the combinations of the two values leads to a discreet zone.

Remember, stop trying to choose a tool and then building your game around it. Lay out what it is you are doing step by step and then select the tool or tools that solve each individual problem.

Dave Mark - President and Lead Designer
Intrinsic Algorithm -
"Reducing the world to mathematical equations!"
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit<
RamblinPeck
RamblinPeck
quote:
Original post by InnocuousFox
Remember, stop trying to choose a tool and then building your game around it. Lay out what it is you are doing step by step and then select the tool or tools that solve each individual problem.

Dave Mark - President and Lead Designer
Intrinsic Algorithm -
"Reducing the world to mathematical equations!"


Maybe you misunderstood me, I already have the game details planned out, to a fairly specific level of detail. I was just looking for a basic idea, and possible a reference to some code that does similiar things so I could get an idea on how to do it correctly, I could make it work with a massive FSM, but it seemed there might be a more elegant solution. Thanks for the advice, but you come off a little harsh there.
IADaveMark
IADaveMark
The point is, there are going to be at least a dozen different state machines or other such structures in place here. Some finite, some fuzzy, some just representational variables, etc. Your question was "Whats the best way to implement this?" You didn''t define "this". Therefore, there is no one answer that any of us can give, nor any code to point you to that will solve "this".

Figure out what you need to measure in each case and design a structure and implementaion that matches what it is you are trying to do. Don''t make it harder than it needs to be to solve the problem.

For example, your agents will likely be performing one action at a time... working, playing, eating, whatever... That''s a finite state machine. How do you make the decisions to transition from state to state? Likely a needs-based alogrithm. Those needs can be represented by values in whatever range you choose (find one that gives you enough granularity to work with but not too many). Each of those values can contribute to a FuSM or any other similar decision algorithm you design.

Dave Mark - President and Lead Designer
Intrinsic Algorithm -
"Reducing the world to mathematical equations!"
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit<

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.