I need help getting started

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
hungryninja
Posts: 26
Joined: Wed Jan 26, 2011 12:13 am

I need help getting started

Post by hungryninja »

I am new to Irrlicht and the tutorials are confusing and lack
information. I am using a .NET wrapper, IrrlichtLime. IrrlichtLime
is like the old Irrlicht.NET wrapper, but for newer Irrlicht. I can
understand some C++, but I am best with VB.NET.

How do I aim the camera and move it in that direction? The
AddCameraSceneNodeFPS doesn't work in an Windows Forms window.

What is the best way to do multiple scenes, such as the outside of a
starship and the inside?

How do I make an object or a camera hover?

What is the best way to turn on collision detection for all objects?

The shooting in the demo is confusing. Can you give me a simpler
(preferably VB.NET) version?

If you know how to do these things in IrrlichtLime, please use IrrlichtLime code. If you don't, please use Irrlicht code.
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

If you really want the complete irrlicht experience, I'd suggest you move away from VB.NET and learn C++, this will give you a speed and performance boost and a better understanding of programming in general
I'm not familiar with the Irrlicht Lime project, nor do I know which irrlicht features are completely implemented, so I can't help you there

The basic irrlicht tutorials however are as easy as they can get, and they explain about everything you asked for, if you have any problems understanding these concepts, I suggest you do some simpler projects to get a better understanding of the language you are writing in

And one pointer, although some people on this forum may disagree with me, asking for code will most of the time not help you with understanding the underlying concepts of what you are trying to implement, as it promotes simple copy-pasting
You are almost always better of by understanding the concepts you want to implement before you write them
hungryninja
Posts: 26
Joined: Wed Jan 26, 2011 12:13 am

Post by hungryninja »

The tutorials don't have what I need.

Is there a better way to do collision detection than a metatriangleselector?

The shooting is confusing and it doesn't work properly if something gets in the way. It also doesn't tell me how to find out what I hit.
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

Irrlicht has a collision implementation meant for more simple projects, if you want advanced collision detection you should use a physics engine

And 'the shooting is confusing' sounds vague, if you would actually follow the tutorials you would see that they show a complete implementation of triangle and scene node picking which show you 'what you hit'
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Use one triangle selector for your world, then write your own collision for destructible / moving objects.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
hungryninja
Posts: 26
Joined: Wed Jan 26, 2011 12:13 am

Post by hungryninja »

The shooting in the demo doesn't hit things if they get in the way of the shot. It doesn't work properly if the object moves.

Please look at what I said at the beginning and try to help me with those.
Anthony
Posts: 121
Joined: Sun Jan 09, 2011 12:03 pm

Post by Anthony »

I am new to Irrlicht and the tutorials are confusing and lack
information. I am using a .NET wrapper, IrrlichtLime. IrrlichtLime
is like the old Irrlicht.NET wrapper, but for newer Irrlicht. I can
understand some C++, but I am best with VB.NET.
switch to c++, some day you propably would anyway. Also knowing multiple languages boosts your skills (as it is all just the same, remove the differences and you have the principle of computer systems)
How do I aim the camera and move it in that direction? The
AddCameraSceneNodeFPS doesn't work in an Windows Forms window.
Just basic math
What is the best way to do multiple scenes, such as the outside of a
starship and the inside?
take a look at the tutorials then at the classes you use. Ignore those you don't know at first. But don't take too long to look at them. Examine classes and the members.
How do I make an object or a camera hover?
Just basic math, physics engine
What is the best way to turn on collision detection for all objects?
Wouldn't do that myself but create very low poly meshes but don't render them. Only use it for collision detection
The shooting in the demo is confusing. Can you give me a simpler
(preferably VB.NET) version?
Don't know the tutorial and VB I only saw just a sec years ago. I guess it is just a collision detection. Maybe a raycast (does irrlicht have that)
If you know how to do these things in IrrlichtLime, please use IrrlichtLime code. If you don't, please use Irrlicht code.

Code: Select all

bool trying = true; 
s32 errorCount = 510; 
if( errorCount ) 
  while( trying )
  { 
    read first line log
    read code; 
    read docs; 
    read c++ | VB docs; 
    continue; 

    posting entire error log; 
    MB_ICONERROR 
  }
Please look at what I said at the beginning and try to help me with those.
Almost all answers where given and as people are just here to enjoy themselve some did take the time to help you. If you ain't respect that, okay :) nevermind

The tutorials do have what you need. When I looked them the first time some tutors made my head spin but the answer is there. Just do it step by step. try to visualize what is going on. And yes you would need to have an understanding of the language. Wich will be a benefit to you.

Also search around the forum - I know it's a pain I asked about that :) - it does have answers to find aswell.
No :shock: I am no noob, just checking if your not one too :roll:

Thanks to Niko and all others that made Irrlicht possible.
hungryninja
Posts: 26
Joined: Wed Jan 26, 2011 12:13 am

Post by hungryninja »

Can you just give me some code?
ChaiRuiPeng
Posts: 363
Joined: Thu Dec 16, 2010 8:50 pm
Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..

Post by ChaiRuiPeng »

hungryninja wrote:Can you just give me some code?
I think it is kindly and in our desire to help a first learner. but it would not do much help if we just did the all work for you.
Anthony
Posts: 121
Joined: Sun Jan 09, 2011 12:03 pm

Post by Anthony »

Only experience gameprogrammers can make a (very simple) full working game in a day - and lying a bit about the time : P. Having said that;

Take tutorial 12 and you have some code that is working. From there try to think what you need. If you need a player wich can walk around, focus on that to get your 'feet' on the ground i.e. terrain.

When that works - I think you mean that your player has a hoverjet or at least I'll pretend here - try to make that camera follow your keyboard input to start hovering, fly around and stop hovering. Joystick input is a later concern.

This is how it is get done and goes for even the biggest commercial games ever. Simply put then, okay :wink:

If you get stuck in this process ask about where you get stuck. When you show some code, people have something to help with.

And then people might even get enthousiastic about your project 8)
No :shock: I am no noob, just checking if your not one too :roll:

Thanks to Niko and all others that made Irrlicht possible.
hungryninja
Posts: 26
Joined: Wed Jan 26, 2011 12:13 am

Post by hungryninja »

AddCameraSceneNodeFPS lets me aim the camera, but it doesn't let me move it.

Please tell me how to get it to move when i press the arrow keys.

I am trying to build it piece by piece, but can't find some pieces.
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

hungryninja wrote:AddCameraSceneNodeFPS lets me aim the camera, but it doesn't let me move it.

Please tell me how to get it to move when i press the arrow keys.

I am trying to build it piece by piece, but can't find some pieces.
The FPS camera should do this automatically, are you running this inside a windows form?
Anthony
Posts: 121
Joined: Sun Jan 09, 2011 12:03 pm

Post by Anthony »

By default, the FPS cam is steared with the cursor keys.

Code: Select all

//Create and array for the key and actions
       SKeyMap keyMap[10];
        u32 keyMapCount = 10;
        keyMap[0].Action = EKA_MOVE_FORWARD;
        keyMap[0].KeyCode = KEY_UP;
        keyMap[1].Action = EKA_MOVE_FORWARD;
        keyMap[1].KeyCode = KEY_KEY_W;

        keyMap[2].Action = EKA_MOVE_BACKWARD;
        keyMap[2].KeyCode = KEY_DOWN;
        keyMap[3].Action = EKA_MOVE_BACKWARD;
        keyMap[3].KeyCode = KEY_KEY_S;

        keyMap[4].Action = EKA_STRAFE_LEFT;
        keyMap[4].KeyCode = KEY_LEFT;
        keyMap[5].Action = EKA_STRAFE_LEFT;
        keyMap[5].KeyCode = KEY_KEY_A;

        keyMap[6].Action = EKA_STRAFE_RIGHT;
        keyMap[6].KeyCode = KEY_RIGHT;
        keyMap[7].Action = EKA_STRAFE_RIGHT;
        keyMap[7].KeyCode = KEY_KEY_D;

        keyMap[8].Action = EKA_JUMP_UP;
        keyMap[8].KeyCode = KEY_KEY_J;

        keyMap[9].Action = EKA_CROUCH;
        keyMap[9].KeyCode = KEY_KEY_C;

        camera = smgr->addCameraSceneNodeFPS(0, 100.0f, 0.6f, -1,
            keyMap, // apoint the array
            keyMapCount, // you need to tell how big the array is
            false, 0.6f);
Taken from Tutorial 12.

EDIT: typos
No :shock: I am no noob, just checking if your not one too :roll:

Thanks to Niko and all others that made Irrlicht possible.
hungryninja
Posts: 26
Joined: Wed Jan 26, 2011 12:13 am

Post by hungryninja »

I got it to work out of a winforms window, but how do I get it to work in one?
Anthony
Posts: 121
Joined: Sun Jan 09, 2011 12:03 pm

Post by Anthony »

No not really, have you fooled with SetFocus( HWND ); or something familiar named function in the WinAPI. Meaning the window i.e. the control of the window wich holds the device, should receive the keyboard input. Am not real sure here as I never used Irrlicht with WinAPI.

Irrlicht has a nice GUI itself so you could try to use that instead. Take a look at Blender, they have created the GUI with OpenGL too. This is why I haven't and propably never will look at putting it WinAPI windows.
No :shock: I am no noob, just checking if your not one too :roll:

Thanks to Niko and all others that made Irrlicht possible.
Post Reply