need help in creating a game that is similar to ResidentEvil

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.
Post Reply
~ Dream
Posts: 12
Joined: Fri Jun 29, 2007 11:28 am
Location: The Dream World

need help in creating a game that is similar to ResidentEvil

Post by ~ Dream »

Hi, people.
I need to create a game that is similar to Resident Evil 1, 2, 3 style. Currently, I've used the Collision tutorial to load a quake 3 map and some quake 2 models.

Currently I need to do some tasks steps by steps and I need some help in doing some of these things.
1) I need to lock the camera so that it will not move; so that I can create something that is similar to Resident Evil.
2) I need to load a model (main character) into the map and uses the keyboard to move her. Left and right will rotate the character while up and down lets the character moves front and back (based on the direction the model faces).
3) Apply collision detection to the model.

Currently, I decided in order to make the whole game. I think I'll start with these three steps. Some help would be great because I just learn OpenGL and C++ for about 6 weeks only. Thanks in advance.
~ Dream
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

1) use addCameraSceneNode like in example 1 rather than addCameraSceneNodeFPS ;)

2) use node->setRotation to rotate, and node->setPosition to move. to know which direction is forwards, use the node's transform to rotate a vector:

Code: Select all

vector3df forwards(0,0,1); // or whatever is forwards for your node
node.getRelativeTransformation().rotateVect(forwards);
node->setPosition( node->getPosition() + forwards*speed*time); // speed and time are floats
backwards is simply "forwards*-1.0f"

3) see the collision example. if you're using pre-rendered backdrops, it's worth noting that your mesh doesn't need to be visible to be collidable.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
~ Dream
Posts: 12
Joined: Fri Jun 29, 2007 11:28 am
Location: The Dream World

Post by ~ Dream »

Thanks, I managed to "lock" the camera and the output is like this, http://www.hostpic.biz/uploads/61daaeea1c.jpg
I've a couple of new questions.
It looks slanted, how do I fix it?
Another thing is the direction the camera is facing. Currently it's what I wanted but what if I want the camera to face another direction but at the same spot?
~ Dream
Andreas
Posts: 166
Joined: Sun Oct 31, 2004 7:15 am
Location: Münster / Germany
Contact:

Post by Andreas »

what if I want the camera to face another direction but at the same spot?
You might use something like:

Code: Select all

camera->setTarget(player.getAbsolutePosition());
camera->setPosition(vector3df(X,Y,Z));
in your event receiver...
Post Reply