1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. We want to know how you learned Unity! Help us by taking this quick survey and have a chance at a $25 gift card
    Dismiss Notice
  5. Are you an artist or level designer going to Unite Europe? Join our roundtables there to discuss artist features.
    Dismiss Notice
  6. Unity 5.6 is now released.
    Dismiss Notice
  7. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice

[WIP] NEEDSIM Life simulation - Just what your NPCs need?

Discussion in 'Works In Progress' started by Fantasieleben, Aug 17, 2015.

  1. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    Current news (15. Dec. 2016): Looking for participants in a usability study. Up to five people can get a free key for NEEDSIM Life simulation.

    Hi fellow game developers,

    The NEEDSIM Life simulation has been released!! You can buy it here: NEEDSIM Life simulation asset store page

    Our NEEDSIM Life simulation makes it quick and easy to simulate daily life of humans, wildlife or even machines. Assign interactions to game objects, and NPCs will use them to satisfy their needs: You can make people watch TV when they are bored, or have animals drink from a lake when thirsty.

    I will discuss minor updates and support in the [RELEASED] NEEDSIM Life simulation thread. I will keep this thread alive to discuss features that will soon be prototyped, but are not ready for the next patch releases (and - if we don't get them done right - might not be released) such as

    - Player characters interacting with objects
    - A better system for using time of day
    - Ownership of slots

    In case you are wondering what NEEDSIM Life simulation is my co-founder Achim made this video as a quick introduction:


    In case you can share ideas on what you would like to do with the NEEDSIM Life simulation in your game, or what type of game you would like to use it in, we would be excited to hear your scenarios!

    Our webpage has a MANUAL of the version shown in the video, as well as a WEBPLAYER DEMO.

    Furthermore, if you are interested in the reseach behind this technology check out the slides and paper at http://www.aihabitat.com/resources/

    Thank you very much for your feedback!
    Cheers,
    Tilman
     
    Last edited: Dec 15, 2016
    TRoNDaNeflin likes this.
  2. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    432
    I can see this interacting nicely with Love/Hate and dialogue system...

    So would you add interaction animations to needsim to where the NPC would sit down and eat or sit down and drink at a bar or walk up and start a conversation etc.?
     
  3. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    Hi Licarell,

    Thank you for your interesting question. The answer mostly depends on whether you want to use Mecanim or your own animation system.

    We were hoping to focus on the states of the artificial intelligence, not on animation. In your example you could create a bar stool and an invisible conversation circle, and add the interactions 'drink' and 'talk' to these. Our NEEDSIM life simulation would then send characters to the bar stool when they are thirsty, and to the conversation when they are lonely. However, animation states can be different from artificial intelligence states, e.g. a simple artificial intelligence state called "drink" might consist of many animation states, including sitting down at the bar, sometimes lifting the glass to drink a bit, then looking around whilst holding the glass, and so on.

    One of our example scenes comes with sprite sheets, so that we can present an idea how NEEDSIM could interact with Mecanim. The idea is that you name transition conditions in Mecanim the same way as you name your interactions in NEEDSIM. Once an interaction is started in our artificial intelligence solution an animation order with the interactions name is put on a stack and an example script that is delivered with that scene pops the animation order and sets a trigger of the same name in Mecanim.

    If I understand you right you were asking whether we would add the animation data for how to sit down at the bar stool, drink, look around, etc., to the bar stool, not to the character using the bar stool? This can be useful for some games, especially if you have a lot of animations and want to keep them organized, and NEEDSIM can in such a way be used with your own animation system - but to get that to work with Mecanim we have to wait for Unity 5.2. or even 5.3, and then evaluate with a prototype whether the solution we have in mind is really compelling. Maybe it is not a feature we can deliver.

    How valuable would a tight integration with Mecanim be for you? We would probably have to re-write parts of your Mecanim state machine automatically - would that be really cool, or annoying?

    Cheers,
    Tilman
     
    Licarell and Teila like this.
  4. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    432
    Yes in a word that was what I was asking... I will use Mecanim, I guess what I was asking was if you define a need say sleep and you assign a sleep node to a bed then when the NPC is sleepy it will travel to the bed then trigger the lay down on bed animation then sleeping animation then when so much time has passed say you have a timing system for your game 8am the NPC runs it's waking animation then it's get up animation then starts it's daily routine, hungry eat, go to work etc. The architecture for this is great, but the last mile is the tie to animation states whether it be through slots or nodes or whatever. That way you can have drinking animations or sleeping animations that you could plug into slots of your npc's then NEEDSIM talks to those slots and tells them which to run and when.

    I also think there needs to be a way to tag your npc's that when they are sleepy they go to their house sleep or to a certain bar/club for entertainment or home to watch TV.

    Clear as mud right?
     
    Teila likes this.
  5. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    5,564
    Sounds fabulous! I am very interested. Big Sim fan here and I love the interactions. We also use Mecanim so would love to see tighter integration.
     
  6. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    5,564
    I finally watched the video, not sure how I missed it. This looks great and very easy to use.
     
  7. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    Thanks to both of you for the positive and interesting feedback, and for letting us know that you will use Mechanim!

    I made a screenshot to clarify how we currently work with Mecanim in one of our example scenes - this is not a core feature of our tech, I just explain it in some depth because the discussion went into this direction.

    Basically the base layer has connections to all sub-state machines from any state, so it remains simple and clean, even if you have tons of sub-state machines. The triggers for the transitions have the same name as the interactions in the NEEDSIM Life simulation - thus a simple sample script can handle the control of the base layer. The sample script will always call SetTrigger(interactionName) in the animator. So if you called the interaction to sleep 'Sleep', and you named the trigger the same way, then as soon as a character has arrived at a slot and the NEEDSIM Life simulation has given the final ok that he or she is allowed to do the interaction 'Sleep' SetTrigger("Sleep") will be called at the animator of the character and thus the sub-state machine for sleeping animations will be played.

    substatemacine.png
     
    Licarell and Teila like this.
  8. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    5,564
    Makes sense and looks great! :)
     
  9. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    5,564
    Are you still developing this?
     
  10. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    Hi Teila, thanks for the encouraging interest! We are working on it, and hope to release it rather soon. I sat down with a friend who never used it during the Ludum Dare game jam two weeks ago and let him work with the NEEDSIM Life simulation, and we made a small game: http://fantasieleben.itch.io/angsthase. Our plug-in worked very well, and I feel like the library and the editor extension is ready, but that we should work a little bit on presenting the product properly.

    Angsthase is a stealth game that gets a unique touch from characters being controlled by NEEDSIM Life simulation instead of fixed routines. You are a bunny that has to activate traps, so that characters think you are a monster, but if seen everyone will be reminded how cute you are. The theme of the game jam was "You are the monster". The controls are a bit akward, I have an idea for fixing it whilst staying true to the original intention that the bunny should not be able to change its trajectory once you start jumping, but first some more work needs to be done on our Unity plug-in ;).

    [​IMG]
     
    Licarell and Teila like this.
  11. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    New feature: Preconditions. Now you can chose which species is required to perform an interaction in the NEEDSIM Life simulation. In this example the fox is on top of the food chain and fern on the bottom. You could also do things like forbid adults to play with toys, and only let your child characters be active on simulated playgrounds. If you have exciting ideas we would be interested in hearing them, so we can evaluate whether we need to adjust our software to your needs or whether your vision can already be realized with the current NEEDSIM Life simulation.

    [​IMG]
     
    sowatnow likes this.
  12. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    432
    If I use something like UniStorm or Time of day that has a time system would I be able to use the time system from those assets to set the clock to NEEDSIM?
     
  13. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    Hi Licarell, this is a very interesting question, and one we discussed at length some months ago. Back then we decided not to simulate a 24 hour day in the release version. Many life simulations, for example the current Fallout Shelter game, do not have time of day. This led us to the conclusion that time of day is not a core part of life simulation, but an optional feature.

    However, as reaction to your question I decided to prototype the functionality of the feature as we designed it. As expected I don’t think that within our time frame I can solve this as user friendly as we would want. So whilst we will not officially support this for release I can soon show you character behavior that I hope would satisfy you, and that I can provide an example scene for, although we have not decided whether to include this scene into the release version.

    It would be very interesting to hear more details on how you are planning to use time with the NEEDSIM Life simulation.

    The games that simulate the time of the day have different requirements for the behavior they want to produce. In the major The Sims games there is a vague schedule, but needs are dominant. That means Sims have a strong urge to go to bed at night, but not if they already slept during the day, and thus are not tired anymore. Such a need oriented solution is the general direction we prefer. I am hoping to soon upload an example scene for you (super simple with only some capsules) that shows how this type of behavior could look like.

    Other games like The Sims Medieval or Fallout 3 have a different approach, where a schedule, not need satisfactions, dominate or solely decide which interactions are chosen. If schedules dominate then even if you would cast a sleep spell on someone all day long they would still go to bed at night - not because they are tired, but because schedule dictates this behavior. If you need a strict schedule in your game then the advantages of the NEEDSIM Life simulation might be less relevant to your project, so overall we think our customers will be less interested in this type of behavior.

    Cheers
    Tilman
     
  14. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    432
    My goal is to develop a dynamic world, where if it rains people run for shelter if outside, or if they are hungry the go to a random place to eat (home, restaurant, bar) and those decisions are based on the time of day. Weekends they go to the park of hangout at home or go to the beach. When NPC's go to work depends on where they work, clothing shop (day), bar (night)....

    That's where I'm going with this.
     
    Tinjaw likes this.
  15. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    5,564
    Yeah, not as useful to us without a tie-in to time. Still cool but if NPC's are out hunting at night or working in the fields in the rain, that won't work. I will keep watching.
     
    Tinjaw likes this.
  16. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    Thanks to both of you for taking the time to give feedback. I have uploaded a webplayer build of a simple example scene if you have time to check it out it might clarify my last post a bit, especially if you respawn the character a couple of times and see which interaction he selects based on his need satisfaction and time of day. Theoretically you could set weights to zero, so interactions for that need are not selected.

    We are now planning to add the scene to the release version of the NEEDSIM Life simulation when we submit to the Unity Asset Store. I am reposting the description that is also found below the game here - the part in italics, and will then go into some specifics.

    runtimeExample_SMALL.png

    The "Respawn character" button will create a new character with random levels of satisfaction for his needs. The needs are hunger (orange), diligence (yellowish brown) and sleep (grey) and their satisfaction value (range 0 to 100) is shown with the color-coded bars on top of his/her head. If the character performs an interaction satisfying a need an outline is drawn around the respective bar.

    The environment has places that offer satisfaction of needs via interactions (eating, working, sleeping). However, in this example, the time of day manipulates how valuable each need satisfaction is at a specific time of day. For example at night sleeping is very valuable to characters, so unless they are really very hungry they will go to sleep. Three times a day satisfying the need to eat is valuable, so the character will go to eat, unless she/he is caught up in some other activity (each interaction has a duration, e.g. to finish animations) or did for example have a really great breakfast and was missing out on a lot of opportunities to work and satisfy his diligence.
    As I mentioned the UI part of this is not so trivial from our perspective, as such functionality is difficult to generalize. For example Licarell mentioned week days - offering UI for all such cases would make the UI difficult to navigate, as there would be too many options at some point. However, in the case shown in the webplayer example the code is really simple. I have a Dictionary NeedModifiers with arrays as values for needs, each with 24 values - one for each full hour. Then its is just one line of code to update the value of a need by looking up the value for a virtual hour:

    Simulation.Manager.Instance.Data.WeightsForNeed["Hunger"] = NeedModifiers["Hunger"][virtualHours];

    Is this type of solution relevant to you?
     
    Last edited: Sep 23, 2015
  17. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    432
    Yes... maybe, I guess what we are talking about is adding some rules
    weekdays Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday=work, not work
    Day=9a to 5pm (Time duration set by designer)
    evening=5p to 12a (Time duration set by designer)
    Night=12a to 9a (Time duration set by designer)
    Within each of those timezones you can set your NEEDSIM values work, play, hunger, socialize, that way areas that you have tagged for your NPC for their home, places to eat, places to play, or places to hangout can be given random values of importance to give a more dynamic feel so the NPCs won't feel like their programmed per say.

    And of course inclement weather or explosion basically (override) all other needs as like a panic need and then after the elements has cleared their basic needs kick back in and they go back to whatever it is they need to do.

    Setting these up as presets allows to build base NEEDSIMS and then tweek as needed for certain NPC's, also having some variables globalized will help with integrating relationship AI's like @TonyLi Love/Hate

    Clear as mud right?
     
    Last edited: Sep 23, 2015
    Tinjaw likes this.
  18. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    @Licarell, thank you very much for your feedback! Very helpful for adding the examples to our product that hopefully will show you how to achieve the results you desire!

    Now a Unity Webplayer demo is online, please go to the example scene 'Fuchsalarm' to check how interuption of NEEDSIM Life simulation behaviors and a day/night cycle in a more densly populated world could play like. During night you can press the 'Spawn Fox' button. Please let me know if you prefer standalone or WebGL builds.

    20151028_FuchsalarmScene.png

    This scene is made with example scripts. After release we will make an internal prototype of a user interface for time of day, but this will take a long time, and might not get released. Week days however seem straight forward to include into the example scripts soon after release.

    Currently we use a manager that is a singleton and gives you reference to tons of global data. Unfortunately I have not yet had the time to take a closer look at Love/Hate, but have, from the distant, been watching this tool since release. In fact I worked on my own relation ship model for a while, so that is certainly something I am quite excited about. Internally and for testing purposes we integrated our tool with some tools from the asset store, and it went smooth and somewhat surprisingly easy, so whilst I can not make specific promises I am confident that NEEDSIM Life simulation will integrate well with most other solutions.

    Cheers
    Tilman
     
    Last edited: Oct 28, 2015
    Tinjaw likes this.
  19. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    During a live demo yesterday I received some feedback on the webplayer and most importantly on the scene discussed in my last post, currently called 'Fuchsalarm'. Some of the requested changes are now made, and the webplayer, as well as the last post, are updated. As a result the scenes should be easier to understand.
     
  20. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    497
    @Fantasieleben
    Are you looking for beta testers? If so, I would like to test. You can PM me the details if you would like my help testing.

    Thanks
     
  21. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    @Tinjaw, Thanks for your interest, and for offering your help! I'll keep you in mind if we do beta tests in the future, but can not promise anything. We are focusing on the release right now, and have already enhanced the product based on feedback from a number of beta testers. However, in the unlikely case that you can participate in on site testing in Germany we would be super excited ;).
     
  22. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    566
    This looks interesting.

    How much will this cost?

    Edit:

    I just finished watching the video in the OP.

    Got a few questions though -

    1. I am curious is this supposed to be just an AI solution? Or can I use it on Controllable characters? I am thinking of games such as The Sims, Tropico, Sim City, etc. here. :)

    2. Can we define spaces that certain characters own or cannot go into? Just curious.

    Example: Bill owns apartment 1b and Bob owns apartment 2b. So Bill wont go into bobs apartment and Bob wont got into Bills apartment.

    Either way I am impressed. :)
     
    Last edited: Oct 30, 2015
  23. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    Hi @HeadClot88

    Thank you for your interest! Concerning your questions:
    The product will cost less than US$ 100,- excluding VAT. Before announcing a final price we will wait for the feedback from Unity when we submit NEEDSIM Life simulation for review.

    NEEDSIM Life simulation features innovative technology that was presented at the Foundations of Digital Games Conference and the Vienna Game AI conference, and the production was overseen by a number of veterans from artificial intelligence and the gaming industry. Some people we showed this to expected four digit prices, but we are trying to make this tech available for as many people as possible.

    Hopefully soon. This type of gameplay is certainly something we are hoping to see being build with our tool! In fact we discussed our tech with developers from one or two of the games you mentioned. NEEDSIM Life simulation needs to be called in order for it to run, so if you instead decide to tell your character with a mouse click where to go thats fine. Of course you can change the state of objects, etc. However, at the moment NEEDSIM Life simulation will not work with selecting slots that NPCs can use at an object - so if you want your avatar to eat at the same place like an NPCs you currently would need to write somewhat complicated code that we should do for you instead. The prototype that I build originally did feature a controllable character, so I know which problems to look into. If this is an important feature for you its best to wait with purchasing the product until an example scene for player controlled characters has been added.

    No. Well maybe. Ownership over objects has been requested by @Licarell as well as you and a number of people we talked to in person, so its on the list of things we will prototype in the near future. If we do it will be concerned with which interaction or objects can be used, not spaces. If you want a system using zones I could give you a few hints on how to make that interact with the NEEDSIM Life simulation. Maybe it works if the agent, when receiving a slot by the NEEDSIM Life simulation to perform an interaction, checks whether it is in either zone, and then rejects or accept the offer for the slot accordingly, but I have not tested that.

    Cheers.
    Tilman
     
    Last edited: Nov 2, 2015
  24. mliukka

    mliukka

    Joined:
    Nov 1, 2015
    Posts:
    11
    This looks like a very interesting and extensive system! I especially like the way you've designed the system to be as general as possible, so users can design their own needs instead of having to use a certain set of hardcoded needs like many stats-based player systems or survival systems do.
     
  25. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    Thanks, @mliukka! Really glad to hear that you appreciate our work to create a general solution! To generalize ideas, algorithms and design concepts from some of the best games out there has been a major goal for us.
     
  26. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    218
    Let me ask you a straight
    if I use this AI solution.. Can I make Games Like The Sims?
    I mean. This AI solution help to make Games Like The Sims?
     
  27. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    @thedreamer, the short answer: I am certain that NEEDSIM Life simulation is the best starting point if you want to build such games.

    However, I don't have an easy answer to your question. Each of the four The Sims titles has quite different AI solutions. For example there is a reason that in The Sims 4 you have loading screens between different houses - but that is not a path we want to take with NEEDSIM Life simulation. I studied all of these solutions, and of course solutions chosen by other games from the life simulation genre, such as, just for example, Prom Week, Versu, Facade and Prison Architect. We were only two people building the NEEDSIM Life simulation, so we still have some way to go to get all the good and cool features from the tech behind all those great titles into our life simulation ;).

    Whilst there are many things that are possible in each of these titles that NEEDSIM Life simulation cannot do yet, our technology gives you the opportunity to make some things better than most building and life simulation games out there.

    The AFFORDANCE TREE technology allows you to build open worlds with many interactions, either by hand or procedurally, whilst keeping complexity manageable. In The Sims a house will afford (that is: offer) custom interactions to characters. So theoretically you could put a bed in a restaurant (as a game designer - the player cannot edit them in The Sims 3), and in The Sims 3 the restaurant would still only offer characters to eat, not to sleep. The AFFORDANCE TREE that is part of NEEDSIM Life simulation however calculates an abstraction that lets agents know that they could theoretically sleep at the restaurant - but without having to think about the actual bed! Because if the character would think about every object in the world complexity would not be manageable in bigger worlds. This means the AFFORADANCE TREE makes it possible to build worlds with many smart objects procedurally! Building an example scene to show how to use this tech is on our to-do list.

    Cheers,
    Tilman
     
    Last edited: Nov 4, 2015
  28. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    Hey everyone,

    In case you are interested in a closer look at tthe NEEDSIM Life simulation we updated the manual:

    PDF version of the manual

    HTML version of the manual

    Of course we are also interested in feedback concerning the manual. Will you actually read a manual, or do you prefer to just use the example scenes?
    Cheers,
    Tilman
     
  29. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    The NEEDSIM Life simulation has been released: NEEDSIM Life simulation asset store page.

    You can help shaping the future of this tool now by buying it and letting us know which improvements and new features would be most relevant for you and the games you are working on.

    I will keep this thread alive to discuss the bigger features that are somewhat further down the road. We will first release one or two minor patch releases, and then discuss prototypes of the features you asked for in this thread. We expect to send the first patch to Unity this week (they will then need some time to check whether its ok).
    As a teaser - the first patch will include a small UI update to set specific non-random starting values for how satisfied needs are when the agent is spawned:

    hungryFox.png

    As always we are very interested in your feedback!
    Cheers,
    Tilman
     
    AdamGoodrich likes this.
  30. Fantasieleben

    Fantasieleben

    Joined:
    Aug 17, 2015
    Posts:
    21
    Get free NEEDSIM Life simulation key when participating in usability study:

    As I am preparing to patch NEEDSIM Life simulation we want to make user tests. Lukas, a Cognitive Science student will conduct usability experiments over Skype or similar tools that allow to share screens. Up to five users can get a free version of NEEDSIM Life simulation in order to participate in the test. You will download the asset and a test scene during the experiment, and do a number of tasks that five you a first idea of NEEDSIM Life simulation, and allow us to observe whether issues from a previous usability study are solved now. The skype meeting will take approx. one hour, can be done in English or German, and requires you to share our screen and to answer some general questions about your experience with NEEDSIM Life simulation. Write to tilman@fantasieleben.com if you want to participate.