i am a good programmer i had designed a program that control small robot but i didnt feel that game progrmming would be so tuff
plzz help me how do i move a object sydney.md2 i want only main section plz dont addd any other object plzzz let it be simple
plzz help i read the 4th tuitorial i am feeling difficult on it i am just asking a single code on moving a object and only main section plzzz helpp me plzzzz
i am very sad no one replying my question
-
- Posts: 14
- Joined: Tue Jun 05, 2007 8:04 am
- Location: INDIA,MAHARASHTRA
-
- Posts: 14
- Joined: Tue Jun 05, 2007 8:04 am
- Location: INDIA,MAHARASHTRA
i know i was little got fraustrated from 4 days i am trying the same thing in moving a object but i can move sphere but i cant move sydney.md2 plzz help if u want i would bring the code plzz
i want to know only how to initialize a object and how to move it i created the myevenreceiver and added&receiver but it still it dont move plzz help out
i want ony guideline in small steps plz give me that
i want to know only how to initialize a object and how to move it i created the myevenreceiver and added&receiver but it still it dont move plzz help out
i want ony guideline in small steps plz give me that
Reason why i don't answer to your posts :
-> you post the same question several time, and you flood them. All your posts refers to the same question
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=22128
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=22058
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=22087
-> you're asking us to do all your work : nobody is going to write the game for you
-> you say you are a good programmer : looking a bit at your code, it seems that you don't even know how to use a switch instruction. You should start by learning c++.
-> there are some people that replied, did you try what they suggest ?
-> and finally, stop crying all the time in your posts. It's a bit boring to see "plzzzzz" every two words...
So i think you should be more patient, look again at all tutorials (especially tutorial 4) and take the time to understand them. If you still have problems, post your code, and people wil try to help you.
-> you post the same question several time, and you flood them. All your posts refers to the same question
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=22128
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=22058
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=22087
-> you're asking us to do all your work : nobody is going to write the game for you
-> you say you are a good programmer : looking a bit at your code, it seems that you don't even know how to use a switch instruction. You should start by learning c++.
-> there are some people that replied, did you try what they suggest ?
-> and finally, stop crying all the time in your posts. It's a bit boring to see "plzzzzz" every two words...
So i think you should be more patient, look again at all tutorials (especially tutorial 4) and take the time to understand them. If you still have problems, post your code, and people wil try to help you.
I doubts you are. Actually there's no such name as "game programming language". Any programming languages can be used to create games.i am a good programmer
And by the way, Turbo C++ is an IDE. You should learn the language first, not the IDE.
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
-
- Posts: 14
- Joined: Tue Jun 05, 2007 8:04 am
- Location: INDIA,MAHARASHTRA
finally i read the 4th tuitorial and the code that porky hosted yesterday for his car he cleared my irritation a lot and now i am coool here is my code
the problem with this code is that i compiles with no error, executes with no error but when i press any key such as w,a , s or d she stop moving her legs while executing probhaly there might be some bug in iti dont know why
here is the code the error that i got while debugging is access voilation
//at the end thanks a lot for any help
/code at the end can u tell me any free software for creating md2 model
//sorry for any mischeif
the problem with this code is that i compiles with no error, executes with no error but when i press any key such as w,a , s or d she stop moving her legs while executing probhaly there might be some bug in iti dont know why
here is the code the error that i got while debugging is access voilation
Code: Select all
// project.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream.h>
#include <conio.h>
#include "irrlicht.h"
#pragma comment(lib,"Irrlicht.lib")
using namespace irr;
using namespace core;
using namespace io;
using namespace gui;
using namespace scene;
using namespace video;
IAnimatedMesh *mesh = 0;
IrrlichtDevice *device = 0;
IAnimatedMeshSceneNode* node = 0;
//class my event receiver starts
class MyEventReceiver:public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event)
{
if (node != 0 && event.EventType == irr::EET_KEY_INPUT_EVENT&&
event.KeyInput.PressedDown)
{
switch(event.KeyInput.Key)
{
case KEY_KEY_W:
{
core::vector3df v = node->getPosition();
v.Y=v.X -2;
node->setMD2Animation(scene::EMAT_RUN);
node->setPosition(v);
return true;
break;
}
case KEY_KEY_S:
{
core::vector3df v = node->getPosition();
v.Y=v.Y +2;
node->setMD2Animation(scene::EMAT_RUN);
node->setPosition(v);
return true;
break;
}
case KEY_KEY_A:
{
core::vector3df v = node->getPosition();
v.X=v.X -2;
node->setMD2Animation(scene::EMAT_RUN);
node->setPosition(v);
return true;
break;
}
case KEY_KEY_D:
{
core::vector3df v = node->getPosition();
v.X=v.X +2;
node->setMD2Animation(scene::EMAT_RUN);
node->setPosition(v);
return true;
break;
}
//class my EVENT RECIVER FOR KEY PRESS COMPLETES
}
}
//class my EVENT RECIVER FOR KEY release starts
//is key released then stop object from running
if (node != 0 && event.EventType == irr::EET_KEY_INPUT_EVENT&&
!event.KeyInput.PressedDown)
{
switch(event.KeyInput.Key)
{
case KEY_KEY_W:
{
node->setMD2Animation(scene::EMAT_STAND);
return true;
break;
}
case KEY_KEY_S:
{
node->setMD2Animation(scene::EMAT_STAND);
return true;
break;
}
case KEY_KEY_A:
{
node->setMD2Animation(scene::EMAT_STAND);
return true;
break;
}
case KEY_KEY_D:
{
node->setMD2Animation(scene::EMAT_STAND);
return true;
break;
}
}
}return false;
}
//class myeventReceiver completes
//completes the envent receiver class
};
int main(int argc, char* argv[])
{
class MyEventReceiver receiver;
IrrlichtDevice *device =
createDevice(video::EDT_DIRECT3D9,core::dimension2d<s32>(640,480),16,false,false,false,&receiver);
if(device==0)
{
return 1;
}
ISceneManager *smgr = device->getSceneManager();
IVideoDriver *driver = device->getVideoDriver();
IGUIEnvironment *guienv = device->getGUIEnvironment();
//let us add a object to it
mesh = smgr->getMesh("../../media/sydney.md2");
node = smgr->addAnimatedMeshSceneNode( mesh);
driver->getTexture("../../media/sydney.bmp");
node->setFrameLoop(0, 310);
node->setPosition(core::vector3df(0,0,30));
node->setMaterialFlag(video::EMF_LIGHTING, false);
smgr->addCameraSceneNodeFPS();
device->getCursorControl()->setVisible(true);
while(device->run())
{
driver->beginScene(true,true,video::SColor(16,234,0,0));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
/code at the end can u tell me any free software for creating md2 model
//sorry for any mischeif
Your problem is here :
You have to use the keyword "class" only when you define a class. Here, you want to declare an instance of this class. Change this to :
rmq :
- in a switch, you have no need to write break after a return
- now that you seem to better understand how the event receiver works in Irrlicht, may be you can look at this link :
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=19657
Vitek's code show a good way to handle keyboards event, it could be interesting for you.
Code: Select all
int main(int argc, char* argv[])
{
class MyEventReceiver receiver;
Code: Select all
MyEventReceiver receiver;
I know there is a script to export to MD2 from blender, but i've never used it.code at the end can u tell me any free software for creating md2 model
rmq :
- in a switch, you have no need to write break after a return
- now that you seem to better understand how the event receiver works in Irrlicht, may be you can look at this link :
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=19657
Vitek's code show a good way to handle keyboards event, it could be interesting for you.
-
- Posts: 14
- Joined: Tue Jun 05, 2007 8:04 am
- Location: INDIA,MAHARASHTRA
-
- Posts: 14
- Joined: Tue Jun 05, 2007 8:04 am
- Location: INDIA,MAHARASHTRA
hey that didnt correct out the problem for me dude there fore i started using masteventreceiver class i posted on the mastevent receiver section here is link for it plzzz correct out the problem
url= http://irrlicht.sourceforge.net/phpBB2/ ... c&start=15
plz check it out i posted there because i taught that whoever had designed the class would check i out and correct out problem since i used mastevent receiver
thanks a lot anyways
url= http://irrlicht.sourceforge.net/phpBB2/ ... c&start=15
plz check it out i posted there because i taught that whoever had designed the class would check i out and correct out problem since i used mastevent receiver
thanks a lot anyways