Page 1 of 1

Crowd Simulation

Posted: 2013-04-12, 06:28
by deamonpog
Hello, I am very new in here. I am an undergraduate. I have worked with UDK for sometime. But debugging is a big problem in there. So I found this wonderful engine. For my research I need to simulate a crowd and observe the crowd with different angles in different views ( so basically i need to manipulate the camera often and i don't need an avatar for myself ).
  • Can I do this in Cafu Engine ? (i guess "yes" is the answer :) )
    How to remove avatar and become just a camera?
    How does the AI system work in cafu?
    • Where is the code that creates AI characters?
      Where is the code that is related to IAs? (my project is going to be a Multi-agent crowd simulation)

Re: Crowd Simulation

Posted: 2013-04-12, 19:36
by Carsten
Hi deamonpog,
Can I do this in Cafu Engine ? (i guess "yes" is the answer :) )
Yes, you can, although you should be prepared to add some C++ code or to customize the existing C++ a little.
In your other post about CaBSP you mentioned that you compiled from source, so I guess that that is not a problem.

As a side note, you may want to have a look at http://www.cafu.de/forum/viewtopic.php?f=8&t=1285, where a few aspects regarding upcoming changes (the component system) are mentioned.
How to remove avatar and become just a camera?
In EntHumanPlayerT::Draw(), the else part of the if (FirstPersonView) conditional can easily be removed or commented out.
How does the AI system work in cafu?
Well, currently there is not much AI there. Have a look at
CompanyBot.hpp
CompanyBot.cpp
especially the Think() method for a trivial example.
Where is the code that creates AI characters?
Uhhh, well. You can create entities almost anywhere in the code.

One way to create them automatically is shown here:
MonsterMaker.hpp
MonsterMaker.cpp
Where is the code that is related to IAs? (my project is going to be a Multi-agent crowd simulation)
Assuming you mean AIs, I'm not sure how this question is different from those above? ;-)

Hope this helps! :up:

Re: Crowd Simulation

Posted: 2013-04-13, 07:10
by deamonpog
Hi Carsten,
Thank you very much for all the answers. yeah i guess the last one is the same as above hihi.. :P

I would like to say that the engine is wonderful. I tried with a new folder inside the Game folder and copied only the required files from the DeathMatch to my new folder. Now i have a kind of a minimal game which is working. I will try all the things you suggested. Thank you again :) .

BTW, I would like to point out some things,
When using VS2010 adding
envCommon=Environment(TARGET_ARCH="x86");
to compiler setup is not in the wiki. I found it in http://www.cafu.de/forum/viewtopic.php?f=6&t=874. I think these stuff should be added to the documentation. ( im sorry if its already there, i couldn't find those information in the wiki )
Is there a documentation of the library? (something built using doxygen or similar documentation) If we have such a thing that would be great.
I will attach the minimal game folder that i created (excluding the textures ) so that i would help someone.

Re: Crowd Simulation

Posted: 2013-04-14, 00:13
by Carsten
deamonpog wrote:I would like to say that the engine is wonderful.
:thanks:
BTW, I would like to point out some things,
When using VS2010 adding

Code: Select all

envCommon=Environment(TARGET_ARCH="x86");
to compiler setup is not in the wiki. I found it in http://www.cafu.de/forum/viewtopic.php?f=6&t=874. I think these stuff should be added to the documentation. ( im sorry if its already there, i couldn't find those information in the wiki )
It's there, at the end of section Compiler Setup in it's own subsection "64-bit Windows with Visual C++ 2010 Express Edition".

But you're right, this is not optimal. I hope that future versions of SCons will improve their search for Visual C++ compilers, so that they find the 32-bit compilers even on 64-bit Windows (if no 64-bit compiler is there). In fact, just the past week one of the SCons developers mentioned that he's working in the area of the related SCons code.
Is there a documentation of the library? (something built using doxygen or similar documentation) If we have such a thing that would be great.
Do you mean http://api.cafu.de/ ?
I will attach the minimal game folder that i created (excluding the textures ) so that i would help someone.
Thanks!