NPC-System "IrrSteer" (svn)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

NPC-System "IrrSteer" (svn)

Post by Acki »

IrrSteer
The main goal of IrrSteer is a NPC-System !!!
it should be flexible enough to create NPCs for any sort of games (RPG, RTS, FPS)...
Forum and Project Page: http://abusoft.g0dsoft.com/IrrSteer

a small demo: IrrSteer-Demo.7z
tutorials: How to use IrrSteer

for team and versioning reasons I created a svn repositry !!! 8)
and of course I granded public access, too !!! :lol:
svn: http://g0dsoft.net/irrsteer
it contains everything you need !!! 8)
- Irrlicht v1.7 (GNU-win32 OGL/DX9)
- IrrOpenSteer v1.1 (GNU-win32 + source)
- IrrSteer v0.1 (source + demo)

Irrlicht can be replaced with any other version, but remember to recompile the other projects afterwards...
IrrOpenSteer and IrrSteer are Code::Blocks projects and should compile on any system...

Image

done:
- use a Manager-System
- create vehicles (NPCs)
- assign scene node and animations to vehicle
- give vehicle orders (idle, wander, follow a path)
- create obstacles
- implement neighbors
- vehicle avoidance for obstacles and neighbors

todo:
- waypoint system (+ path finding)
- scripted vehicle orders
- more vehicle orders (flee, follow, attack, etc.)

cu, Acki
Last edited by Acki on Sun Feb 07, 2010 4:34 am, edited 18 times in total.
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
DtD
Posts: 264
Joined: Mon Aug 11, 2008 7:05 am
Location: Kansas
Contact:

Post by DtD »

Wow, this looks very cool. I hadn't heard of OpenSteer before...

~DtD
netpipe
Posts: 670
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

Post by netpipe »

the bots dont show up but i can add and remove obsticles... the only changes i really made was removing the igridscenenode is that related to the blue arrow meshes somehow ? everything else seems to compile/work
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

tecan wrote:the bots dont show up but i can add and remove obsticles... the only changes i really made was removing the igridscenenode is that related to the blue arrow meshes somehow ? everything else seems to compile/work
huu :shock:
no, the grid scene node is completely independend from the demo, it's just for visual reasons there !!!
there are 2 things that won't work with standard Irrlicht, the grid and the font loading...
but you can remove them without harm... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

I just checked it and it works as expected !!!
like I said, the grids and fonts can be removed without harm...
(now I also included the demo source for standard Irrlicht ;) )

but forcing me to look over the code again was not so bad...
I found some bugs in the "pedestrian walking an eight" plugin...
because it was just copied from the "pedestrian" plugin there where some multiple declarations in the original code...
therefore I changed them to unique names, but unforunately I missed some of them... :oops:
but they are now corrected and the pedestrian now realy walks an eight !!! :lol:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

hmmm, it seems there is another problem with the "capture the flag" plugin...
if it restarts the 2nd time (runs the 3rd time) it hangs completely !!! :shock:
I also can't do a debugging because it holds my pc completely, too !!!
because of this it also could be my gfx card, I think it's going to die now... :cry:

can anybody confirm the behavior of the "capture the flag" plugin ?!?!?
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Murloc992
Posts: 272
Joined: Mon Apr 13, 2009 2:45 pm
Location: Utena,Lithuania

Post by Murloc992 »

Yeah, it hangs the third time :(
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Murloc992 wrote:Yeah, it hangs the third time :(
aha, so it's not my pc !!! :lol:

so I guess it runs in some sort of infinit loop, probably at initialisation (reset)... :?

well, the original demo was coded horribly, such a mess... :lol:

I also still have a little problem with the visualisation of the map used by the "Map Drive" demo... :roll:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Acki wrote:so I guess it runs in some sort of infinit loop, probably at initialisation (reset)...
:rofl: I guess this was it !!! :lol:
the obstacles were never deleted !!! :oops:
(but I wander how this can lead to this behavior of the prog :shock: )

well, there are 3 functions that need to be changed (of course I'll update the download, too ;) ):

cCaptureTheFlag.cpp:

Code: Select all

void CtfBase::removeOneObstacle(){
  if(obstacleCount > 0){
    obstacleCount--;
    delete allObstacles[obstacleCount];
    allObstacles.pop_back();
  }
}
cCaptureTheFlagPlugIn.cpp:

Code: Select all

//! Reset Scene
void CtfPlugIn::reset(){
  // count resets
  resetCount++;
  // reset the seeker ("hero"/"attacker") and enemies
  ctfSeeker->reset();
  for(int i = 0; i < maxEnemyCount; i++) ctfEnemies[i]->reset();
}

//! Clear Scene
void CtfPlugIn::close(){
  if(nGround) irrPointers.SMgr->addToDeletionQueue(nGround);
  nGround = NULL;
  // delete seeker
  irrPointers.SMgr->addToDeletionQueue(ctfSeeker);
  ctfSeeker = NULL;
  // delete each enemy
  for(int i = 0; i < maxEnemyCount; i++){
    irrPointers.SMgr->addToDeletionQueue(ctfEnemies[i]);
    ctfEnemies[i] = NULL;
  }
  // clear the group of all vehicles
  all.clear();
  // delete obstacles
  while(CtfBase::obstacleCount > 0) CtfBase::removeOneObstacle();
  CtfBase::obstacleCount = -1;
  lstObstacleMesh.clear();
}
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
link3rn3l
Posts: 81
Joined: Wed Nov 15, 2006 5:51 pm

Post by link3rn3l »

yes, yes !!!!!!!

:lol:


Thanks!!!


.
Bennu (Best 2d and 3D dev-tool)
http://bennupack.blogspot.com

Pixtudio (Best 2D development tool)
http://pixtudiopack.blogspot.com

Bennu3D(3D Libs for bennu)
http://3dm8ee.blogspot.com/

Colombian Developers - Blog:
http://coldev.blogspot.com/
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

This is awesome. Thanks for posting your work Acki.
netpipe
Posts: 670
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

Post by netpipe »

in source/osClock.cpp i had to edit this to make it work on linux

Code: Select all

#include "osClock.h"
#ifdef WIN32
#include <windows.h>
#else
#include <sys/time.h>

static const unsigned usec_per_sec = 1000000;
static const unsigned usec_per_msec = 1000;

typedef long LONGLONG;
typedef long LARGE_INTEGER;

bool QueryPerformanceCounter(int64_t *performance_count)
{
    struct timeval time;

    // Sanity check.
    assert(performance_count != NULL);

    // Grab the current time.
    gettimeofday(&time, NULL);
     *performance_count = time.tv_usec + time.tv_sec * usec_per_sec;

    return true;
}

bool QueryPerformanceFrequency(int64_t *frequency)
{
    // Sanity check.
    assert(frequency != NULL);

    // gettimeofday reports to microsecond accuracy.
    *frequency = usec_per_sec;

    return true;
}
#endif
netpipe
Posts: 670
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

Post by netpipe »

thanks again Acki for this incredible peice of work!
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

pc0de wrote:This is awesome. Thanks for posting your work Acki.
tecan wrote:thanks again Acki for this incredible peice of work!
thanks !!! :)

but this was just the beginning !!! :lol:
it's still in work...
and I also started a small tutorial...

check out my homepage !!! 8)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Sundar
Posts: 84
Joined: Mon Jun 05, 2006 11:05 am

Post by Sundar »

This is amazing. Thanks acki. I tried to do this long back and i couldnt understand Mixin based approach well so i ended up bricking my approach. Nice to have this one so i could learn bit of advanced cpp
Post Reply