Irrlicht basics tutorial [Note: HUGE POST]

A forum to store posts deemed exceptionally wise and useful

How would you rate this tutorial?

Great
57
42%
Good
51
38%
Fine
21
15%
Bad
7
5%
 
Total votes: 136

dudMaN
Posts: 111
Joined: Fri Mar 02, 2007 6:37 pm

Irrlicht basics tutorial [Note: HUGE POST]

Post by dudMaN »

This is a simple tutorial i wrote for my friend, decided to post it here because it might be able to help someone :)

This manual is copyrighted and exclusively for private use for Irrlicht forum users and Irrlicht wiki users. any redistribution of this manual without express consent is Illegal.


NOTE: Some users have been having problems with the event reciever. see This Post for a fix.
NOTE: I Tried to fix the video and driver thingy.. but apparently its still in some snippets, see This Post for a fix.
NOTE: The second collision function(bounding box) appears to be broken, see This Post for a fix.


Here it is:



Irrlicht basics tutorial.

This tutorial assumes that you have a basic knowlage of C++,(objects, pointers, etc) and maybe
have written a game before using some 2D library like SDL or Allegro.



List of chapters:
- Chapter 0: Installing
- Chapter 1: Basics and init
- Chapter 2: Creating scene nodes
- Chapter 3: Keypress detection
- Chapter 4: Cameras
- Chapter 5: Collision
- Chapter 6: Advanced scene nodes
- Final Chapter

==Chapter 0==
----
You need to install irrlicht, ofcourse!
----

To install irrlicht, open the folder you downloaded from http://irrlicht.sf.net/download.html
and click "lib", copy either the win32 or linux files to "C:\Dev-Cpp\lib\" or "/usr/lib"
(or anything else, if you use VC++ or something), next, do the same with the "include" folder,
copy to "c:\dev-cpp\include\" or "/usr/include".

Now, to compile your program, you'll have to link with the Irrlicht libraries.

on Linux/g++ this is simple: -lIrrlicht -lGL -lGLU

on Win32, you'll want to go to the trouble of doing:

Code: Select all

#pragma comment(lib, Irrlicht.lib);
somewhere in your code.

you will also need to

Code: Select all

 #include <irrlicht.h>
at the top of your program



==Chapter 1==
----
In this chapter, you will how to start irrlicht up and get a blue
screen to open up without anything rendering on it.
----

First of all, you need to create the basic irrlicht stuff.

Ofcourse, the namespaces:

Code: Select all

 using namespace irr;
 using namespace core;
 using namespace scene;
 using namespace video;
 using namespace gui;
The irrlicht device is the most important of all, running irrlicht:

Code: Select all

 IrrlichtDevice* device = createDevice(EDT_OPENGL, core::dimension2d<s32>(640,480));
will create an irrlicht device with OpenGL rendering. if you wanted to use, say, DirectX 9 rendering,
just change EDT_OPENGL to EDT_DIRECT3D9. A List of irrlicht devices:

Code: Select all

OpenGL - EDT_OPENGL
DirectX 8 - EDT_DIRECT3D8
DirectX 9 - EDT_DIRECT3D9
Software - EDT_SOFTWARE
Sofware 2 - EDT_BURNINGSVIDEO
Now that you've created the irrlicht device, you must grab a SceneManager and some
other managers from it.

Code: Select all

 IVideoDriver* video = device->getVideoDriver();
pretty self explanitory there, grabs the Video Driver from the irrlicht device. you probably won't
ever need to use this, but it's still good to have it there incase you need it later.

Code: Select all

 ISceneManager* smgr = device->getSceneManager();
That code pretty much grabs the scene manager from the irrlicht device. the scene manager is how
you will handle irrlicht from here on out, from creating a cube to adding complex animators.


Now that you have your device and managers set up, it's time for a simple main function!

in your main function, you'll have a while loop. this loop will render the irrlicht scene.

Code: Select all

 while(device->run() && device) 
loops forever running the device(if it is initalised properly).

now, it's time to add some stuff to inside that while loop.

Code: Select all

  video->beginScene(true, true, video::SColor(255,0,0,255));
  smgr->drawAll();
  video->endScene();
the driver beginScene and endScene calls do what they sound like, begin and end the drawing scene.

smgr->drawAll() will draw everything you've added to the scene manager(we'll take another look at
this in chapter 2)


Well, that concludes chapter 1! So far you've learned to initalize irrlicht and render a
blank window!


Here's a simple demo program. we will take this program, and modify
it through this tutorial/book until it is a fully-functional game :)

Code: Select all

int main() {

 IrrlichtDevice *device = createDevice(EDT_OPENGL);
 IVideoDriver* video = device->getVideoDriver();
 ISceneManager* smgr = device->getSceneManager();

 while(device->run() && device) {
  video->beginScene(true, true, video::SColor(255,0,0,255));
  smgr->drawAll();
  video->endScene();
 }
}


==Chapter 2==
----
In this chapter, you'll learn how to
add scene nodes, both meshes and cubes
and spheres and everything else to
the irrlicht scene!
----

Now that irrlicht is setup, you can add cubes, or even 3d models to your scene.

before the 'while' loop, add this line:

Code: Select all

 smgr->addCubeSceneNode();
that adds a cube to the scene manager. if you were to run your program now, you wouldn't be able
to see the cube, because both the camera and the cube are at the same position. so change that
line to:

Code: Select all

 ISceneNode* cube = smgr->addCubeSceneNode();
that way, it creates a pointer that you can change.

now, we will want to move it forward so we can see it. if you know a little bit of 3-D, you'll know
that X is left/right, Y is up/down, and Z is forward/backward.

Code: Select all

 cube->setPosition(vector3df(0,0,5));
the vector3df part isn't important right now, but it's basically:

Code: Select all

 cube->setPosition(vector3df(X, Y, Z));
. and as you might guess, setPosition sets the position in 3-D space of that node. so add
that line right below the adding of the cube and re-compile and re-run the program. you should
see a cube. try experimenting with the position of the cube, and familiarise yourself with
irrlicht's position system.

ISceneNode's have 2 other basic functions:

Code: Select all

 setPosition()
 setScale()
 setRotation()
the syntax for those functions is exactly the same as setPosition. so for example:

Code: Select all

 cube->setScale(vector3df(25,1,1));
will make our cube into a rectangular prysm ;)

mess around with scale, position, and rotation until you fully understand irrlicht's coordinate
system!!


-- Take a break at this point, mess with your program, walk around, etc --

Now, i assume that you know and understand irrlicht's basic movement functions. theres another
way to create scene nodes:

Code: Select all

 smgr->addAnimatedMeshSceneNode((const c8*)"myfile.3ds");
forget about the "const c8*" cast, it's just because irrlicht takes input in const c8 pointers and
not char array pointers, so you need to cast it.

addAnimatedMeshSceneNode returns a ISceneNode pointer, just like addCubeSceneNode. you can do the
same things to a cube as you can to a mesh. Irrlicht can load .x, .3ds, .lwo, .mesh, and a few
other 3d formats. some models will be too big/small for irrlicht, so you'll need to setScale them
to a reasonable size.


Irrlicht scene nodes also have 3 basic functions:

Code: Select all

 getPosition()
 getRotation()
 getScale()
those return a vector3df. see how it's important now? let's say you wanted to move
a scene node forward(for example, if someone pressed the 'W' or UP key), you might do:

Code: Select all

 myNode->setPosition(myNode->getPosition+vector3df(0,0,5));
.

to access the X/Y/Z variables in a vector3df, you just do:

Code: Select all

 myVector3df.X = 10;
for example. try outputting the X/Y/Z positions of your scenenode to the console. experiment
with this. try different things.



Well, looks like you've learned how to load meshes, or create cubes, and move them around, resize
them, and rotate them.


Our simple game now:

Code: Select all

int main() {

 IrrlichtDevice *device = createDevice(ETD_OPENGL);
 IVideoDriver* video = device->getVideoDriver();
 ISceneManager* smgr = device->getSceneManager();

 ISceneNode* cube = smgr->addCubeSceneNode();
 cube->setPosition(vector3df(0,0,5));

 while(device->run() && device) {
  video->beginScene(true, true, video::SColor(255,0,0,255));
  smgr->drawAll();
  video->endScene();
 }
}



==Chapter 3==
----
This isn't really a chapter but
a code-snippet disguised as a
chapter :) you'll learn how to
get key input here
----


Put this code at the top of your program:

Code: Select all

 bool keys[irr::KEY_KEY_CODES_COUNT];
this before int main() :

Code: Select all

class MyEventReceiver : public IEventReceiver {
 public:
  bool OnEvent(SEvent event)  { 
  if(event.EventType == irr::EET_KEY_INPUT_EVENT){
   keys[event.KeyInput.Key] = event.KeyInput.PressedDown;
   return false;
  } 
   return false;
  }
};
this right after irrlicht init:

Code: Select all

 MyEventReceiver rv;
 device->setEventReceiver(&rv);
this before your scenenode creation, but after irrlicht initalisation:

Code: Select all

 for(int x=0; x<irr::KEY_KEY_CODES_COUNT; x++) keys[x] = false; 

and that should do it. from here on out, you can use:

Code: Select all

 if(keys[KEY_KEY_W]) {
  // do stuff
 }
to get key input. for any key on the keyboard from Q-P, A-L, and Z-M, you can use
KEY_KEY_[that key]. for other keys, check the irrlicht documentation :)



so far, our code is:

Code: Select all

 bool keys[irr::KEY_KEY_CODES_COUNT];

class MyEventReceiver : public IEventReceiver {
 public:
  bool OnEvent(SEvent event)  { 
  if(event.EventType == irr::EET_KEY_INPUT_EVENT){
   keys[event.KeyInput.Key] = event.KeyInput.PressedDown;
   return false;
  } 
   return false;
  }
};

int main() {


 IrrlichtDevice *device = createDevice(ETD_OPENGL);
 IVideoDriver* video = device->getVideoDriver();
 ISceneManager* smgr = device->getSceneManager();

 MyEventReceiver rv;
 device->setEventReceiver(&rv);

 for(int x=0; x<irr::KEY_KEY_CODES_COUNT; x++) keys[x] = false; 

 ISceneNode* cube = smgr->addCubeSceneNode();
 cube->setPosition(vector3df(0,0,5));

 while(device->run() && device) {
  if(keys[KEY_KEY_W]) {
   cube->setPosition(cube->getPosition()+vector3df(0,0,5));
  }

  video->beginScene(true, true, video::SColor(255,0,0,255));
  smgr->drawAll();
  video->endScene();
 }
}

look at that snippet, and try to make the W/A/S/D keys move your cube around. :)


==Chapter 4==
----
In this chapter, you'll learn what a camera
is and how to use one.
----


So far, you've setup irrlicht, made a cube, and you can move it around with the W,A,S,D keys.

Not a bad start :)

but now, you'll want to learn about cameras. cameras are the viewpoint in which you see everything
in your game. before now, you've been using the static camera at 0,0,0 that looks to 0,0,900.

but now, you're going to create your own camera!

Code: Select all

 ICameraSceneNode* cam = smgr->addCameraSceneNode();
now, sounds like creating a cube or something, right? right. the camera scene node acts
the same way as a normal scene node, except you can't scale or rotate it. try to move it around,
see how the viewpoint changes! there is another function of interest here:

Code: Select all

 cam->setTarget(cube->getPosition());
setTarget() ses the look-at target of the camera. if you set it to a vector3df, the camera will
look at that position. try it out, maybe make it so when you press a key, the camera looks to
the node!

-- Stop here and try some things out. take a break. walk around. etc. --

Back? Great!

there's another camera type i'd like to introduce you to. the FPS Camera. this camera behaves
exactly like one in a first-person shooter would. the mouse looks around, and the arrow keys
move according to where you're looking. FPS cameras can be rotated, unlike normal cameras.

Code: Select all

 cam = smgr->addCameraSceneNodeFPS();
try this out, see how the moving of the camera and the scene nodes look. like it? cool.


Let's take another look at our game:

Code: Select all

 bool keys[irr::KEY_KEY_CODES_COUNT];

class MyEventReceiver : public IEventReceiver {
 public:
  bool OnEvent(SEvent event)  { 
  if(event.EventType == irr::EET_KEY_INPUT_EVENT){
   keys[event.KeyInput.Key] = event.KeyInput.PressedDown;
   return false;
  } 
   return false;
  }
};

int main() {


 IrrlichtDevice *device = createDevice(ETD_OPENGL);
 IVideoDriver* video = device->getVideoDriver();
 ISceneManager* smgr = device->getSceneManager();

 MyEventReceiver rv;
 device->setEventReceiver(&rv);

 for(int x=0; x<irr::KEY_KEY_CODES_COUNT; x++) keys[x] = false; 

 ISceneNode* cube = smgr->addCubeSceneNode();
 cube->setPosition(vector3df(0,0,5));

 ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS();

 while(device->run() && device) {
  if(keys[KEY_KEY_W]) {
   cube->setPosition(cube->getPosition()+vector3df(0,0,5));
  }

  video->beginScene(true, true, video::SColor(255,0,0,255));
  smgr->drawAll();
  video->endScene();
 }
}
WOW! Look how our little game here has grown from a few-line blank screen to a cube-moving,
camera-moving adventure!



==Chapter 5==
----
Oh, no! another code-snippet chapter!
Here you will learn how to do
basic collision detection between nodes,
without having to bother with Triangle
Selectors!
---

This is a REALLY short chapter! Here is a function i use for REALLY
simple collision detection, which isn't pixel-perfect, but good enough
for checking if a bullet hit an enemy or checking if the player hit a powerup,
etc, etc.

Code: Select all

bool collision(ISceneNode* one, ISceneNode* two, int size) {
   if(one->getAbsolutePosition().getDistanceFrom(two->getAbsolutePosition()) < size)
    return true;

   return false;
}

That function basically checks if the distance of the nodes is less than size.

to use this, you might do:

Code: Select all

if(collision(cube,sphere,100)) {
 std::cout<<"Cube hit sphere!"<<std::endl;
}

See if you can move the cube around and make it print "Cube hit sphere!" when they collide.

Cool, eh?

or, another more "accurate" collision function:

Code: Select all

bool collision(ISceneNode* one, ISceneNode* two) {
 if(one->getBoundingBox().intersectsWithBox(two->getBoundingBox())) {
  return true;
 return false;
}
havent tested this one but it should work.


And the "game":

Code: Select all

 bool keys[irr::KEY_KEY_CODES_COUNT];

class MyEventReceiver : public IEventReceiver {
 public:
  bool OnEvent(SEvent event)  { 
  if(event.EventType == irr::EET_KEY_INPUT_EVENT){
   keys[event.KeyInput.Key] = event.KeyInput.PressedDown;
   return false;
  } 
   return false;
  }
};

int main() {


 IrrlichtDevice *device = createDevice(ETD_OPENGL);
 IVideoDriver* video = device->getVideoDriver();
 ISceneManager* smgr = device->getSceneManager();

 MyEventReceiver rv;
 device->setEventReceiver(&rv);

 for(int x=0; x<irr::KEY_KEY_CODES_COUNT; x++) keys[x] = false; 

 ISceneNode* cube = smgr->addCubeSceneNode();
 cube->setPosition(vector3df(0,0,5));

 ISceneNode* sphere = smgr->addSphereSceneNode();
 sphere->setPosition(vector3df(0,0,300));

 ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS();

 while(device->run() && device) {
  if(keys[KEY_KEY_W]) {
   cube->setPosition(cube->getPosition()+vector3df(0,0,5));
  }
  if(collision(cube,sphere,100)) {
   std::cout<<"Collided!"<<std::endl;
  }

  video->beginScene(true, true, video::SColor(255,0,0,255));
  smgr->drawAll();
  video->endScene();
 }
}


==Chapter 6==
----
Here, you'll learn how to attach
nodes to other nodes, animate nodes,
etc.
----


Irrlicht supports frame-based animation. i assume you know that frames in model animation
are like a flipbook. each page would be a frame. setting the frame loop is used for, say, a door:

pages/frames 1-15 is opening
pages/frames 16-30 is closing
frames 31-60 is being destroyed

we obviously dont want to loop through all of those, so we set the frame loop like so:

Code: Select all

 myNode->setFrameLoop(1,15);
that tells irrlicht to only loop through animation pages 1-15, no others. now, we must
set the speed. basically:

Code: Select all

 myNode->setAnimationSpeed(25);
will flip through those pages 25 times a second. maybe we want a slower speed? =]

ofcourse, this will only work on actual meshes, not cubes or spheres, so i can't really
add anything to our example :)

now that you know about node animation, what about attaching?

Code: Select all

 myNode->setParent(cam);
that attaches myNode to cam. now, whenever cam moves, myNode moves with it. however, since
myNode is a child of cam, if myNode moves, cam won't.


Another thing you will use all the time in a game is a skybox. it gives the appearence that
your game is in the sky, in space, etc. a skybox is basically a box of images around the camera.

Code: Select all

  ISceneNode* SkyBox = smgr->addSkyBoxSceneNode(
	driver->getTexture("Top image"),
	driver->getTexture("Bottom image"),
	driver->getTexture("Forward image"),
	driver->getTexture("Backward image"),
	driver->getTexture("Left image"),
	driver->getTexture("Right Image.bmp"));
ofcourse, you would change "... Image" to your image file. :)

Let's attach the sphere to the camera and add a skybox to our game:

Code: Select all

 bool keys[irr::KEY_KEY_CODES_COUNT];

class MyEventReceiver : public IEventReceiver {
 public:
  bool OnEvent(SEvent event)  { 
  if(event.EventType == irr::EET_KEY_INPUT_EVENT){
   keys[event.KeyInput.Key] = event.KeyInput.PressedDown;
   return false;
  } 
   return false;
  }
};

int main() {


 IrrlichtDevice *device = createDevice(ETD_OPENGL);
 IVideoDriver* video = device->getVideoDriver();
 ISceneManager* smgr = device->getSceneManager();

 MyEventReceiver rv;
 device->setEventReceiver(&rv);

 for(int x=0; x<irr::KEY_KEY_CODES_COUNT; x++) keys[x] = false; 

 ISceneNode* cube = smgr->addCubeSceneNode();
 cube->setPosition(vector3df(0,0,5));

 ISceneNode* sphere = smgr->addSphereSceneNode();
 sphere->setPosition(vector3df(0,0,300));

 ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS();

 sphere->setParent(cam);

 ISceneNode* SkyBox = smgr->addSkyBoxSceneNode(
	driver->getTexture("background.bmp"),
	driver->getTexture("background.bmp"),
	driver->getTexture("background.bmp"),
	driver->getTexture("background.bmp"),
	driver->getTexture("background.bmp"),
	driver->getTexture("background.bmp"));

 while(device->run() && device) {
  if(keys[KEY_KEY_W]) {
   cube->setPosition(cube->getPosition()+vector3df(0,0,5));
  }
  if(collision(cube,sphere,100)) {
   std::cout<<"Collided!"<<std::endl;
  }

  video-->beginScene(true, true, video::SColor(255,0,0,255));
  smgr->drawAll();
  video-->endScene();
 }
}
Now, try moving the cube & camera around and checking for collisions between them :)




==Final Chapter==

Well, a single guide can't cover everything in game development, but i hope this guide
got you started with irrlicht.

Check out the docs and tutorials for info on GUIs and such:

Code: Select all

http://irrlicht.sf.net/docu/
http://irrlicht.sf.net/tutorials.html
About AI, You could do a basic pathfinding with:

Code: Select all

if(enemy->getPosition().X > player->getPosition().X) 
 enemy->setPosition(enemy->getPosition() + 5);
or something like that.. try adding velocity for an enemy that slides around
like ice trying to hit you :)


Well, bye for now :)


Code: Select all

 bool keys[irr::KEY_KEY_CODES_COUNT];

class MyEventReceiver : public IEventReceiver {
 public:
  bool OnEvent(SEvent event)  { 
  if(event.EventType == irr::EET_KEY_INPUT_EVENT){
   keys[event.KeyInput.Key] = event.KeyInput.PressedDown;
   return false;
  } 
   return false;
  }
};

int main() {


 // Init irrlicht
 IrrlichtDevice *device = createDevice(ETD_OPENGL);
 IVideoDriver* video = device->getVideoDriver();
 ISceneManager* smgr = device->getSceneManager();

 // Setup event reciever
 MyEventReceiver rv;
 device->setEventReceiver(&rv);

 // Init keystates array
 for(int x=0; x<irr::KEY_KEY_CODES_COUNT; x++) keys[x] = false; 

 // Add a cube
 ISceneNode* cube = smgr->addCubeSceneNode();
 cube->setPosition(vector3df(0,0,5));

 // Add a sphere
 ISceneNode* sphere = smgr->addSphereSceneNode();
 sphere->setPosition(vector3df(0,0,300));

 // Add a camera
 ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS();

 // Attach sphere to camera
 sphere->setParent(cam);

 // Add a skybox
 ISceneNode* SkyBox = smgr->addSkyBoxSceneNode(
	driver->getTexture("background.bmp"),
	driver->getTexture("background.bmp"),
	driver->getTexture("background.bmp"),
	driver->getTexture("background.bmp"),
	driver->getTexture("background.bmp"),
	driver->getTexture("background.bmp"));

 // Main game loop
 while(device->run() && device) {

  // Cube movement
  if(keys[KEY_KEY_W]) {
   cube->setPosition(cube->getPosition()+vector3df(0,0,5));
  }

  // Cube/Sphere collision detection
  if(collision(cube,sphere,100)) {
   std::cout<<"Collided!"<<std::endl;
  }

  // Irrlicht rendering
  video->beginScene(true, true, video::SColor(255,0,0,255));
  smgr->drawAll();
  video->endScene();
 }
}
[/url]
Last edited by dudMaN on Thu May 29, 2008 8:21 pm, edited 18 times in total.
GameDude
Posts: 498
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

Its pretty good for a small tutorial.
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

How about moving it to the irrlicht manual?
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
dudMaN
Posts: 111
Joined: Fri Mar 02, 2007 6:37 pm

Post by dudMaN »

How about moving it to the irrlicht manual?
No.

But, i might move it to the Irrlicht wiki..

Anyways i added a chapter 0 on installing and includes, hopefully NOW you can send all the "hwo do i mak a gaem thgx" people here :P

-dudMan
Last edited by dudMaN on Sat Dec 01, 2007 8:53 pm, edited 1 time in total.
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

About your "collision" function, how accurate does it gets?
Wouldn't it be better (keeping the simplicity) to check the bounding box of each node instead of it's position?
Last edited by MasterGod on Sat Nov 24, 2007 4:54 pm, edited 1 time in total.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
dudMaN
Posts: 111
Joined: Fri Mar 02, 2007 6:37 pm

Post by dudMaN »

Don't know about bounding box, never used it, but sounds good. i'll look at that..

About the accuracy, as long as the objects are around the same in scale(e.g. one isnt huge and the other tiny), it's pretty accurate. not pixel-perfect, but you won't collect a powerup 5 ft infront of you.

Also, i've pretty much run out of chapter ideas, what should i do for the next chapter?

EDIT: quickly hacked the bounding-box collision into chapter 5

-dudMan
GameDude
Posts: 498
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

You could make it a little more advanced like adding a health bar and how to deduct and add health when you hit something or obtain a health power up, just an idea I had
dudMaN
Posts: 111
Joined: Fri Mar 02, 2007 6:37 pm

Post by dudMaN »

Ok sounds good, maybe i'll make chapter 6 GUI and chapter 7 2D images..

EDIT: cept i dont know anything about gui :shock:
EDIT2: ok, explained animation, parents, and skyboxes in a chapter 6, anyone have something to add to "advanced scene nodes"?

-dudMan
GameDude
Posts: 498
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

Well I haven't done much GUI work myself. Perhaps later I can add something
dudMaN
Posts: 111
Joined: Fri Mar 02, 2007 6:37 pm

Post by dudMaN »

GameDude
Posts: 498
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

Also, if your using the wxDev-CPP IDE, then you don't need the pragma comment, you can just link to it in the linker options. Just thought I'd put that up as a side note
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

May add to that little place you talk about SkyBox something about SkyDome. It shouldn't take more then 2-3 lines...
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
humbrol
Posts: 83
Joined: Sun Nov 18, 2007 8:22 pm

Post by humbrol »

can you include how to do collision detection where the node wont past through the other node?
dudMaN
Posts: 111
Joined: Fri Mar 02, 2007 6:37 pm

Post by dudMaN »

I Do, look at chapter 5. either collision function will tell you if the nodes touch eachother :)

-dudMan
humbrol
Posts: 83
Joined: Sun Nov 18, 2007 8:22 pm

Post by humbrol »

ive got that part working but how do i make the nodes impassible, it tells if they touch each other but doesnt bar them from passing through each other.
Post Reply