• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
max.lavince

need help with a game m developing

9 posts in this topic

Greetings everyone,
M new here on gamedev.net and also in game development. I got interested around 6 months back, created a game with basics of C++ and this is a new game that m creating uses C++ and OpenGL.
Well m facing problem with texturing and controls, I'll get to texturing the next time.
The game is an aeroplane dog fight, for that I need aeroplane controls.
m really confused how to do it, I tried moving the plane along z-axis but then when i rotate the plane usong keyboard the plane rotates but doesn't move forward.
I know this isnt the right way to do it, i told it so yu all know that i tried.
Please help me, i reaaly wish to finish this game in the coming dew weeks.
Thanks in advance.
0

Share this post


Link to post
Share on other sites
Thanks for responding.... Ahh I've got into this bad habit.
I'll work on it....
Its quite a large code
I'm not sure which part should I post here.
I'll post something soon probably by tomorrow, as I'm online through mobile at the moment
0

Share this post


Link to post
Share on other sites
Thanks for responding.... Ahh I've got into this bad habit.
I'll work on it....
Its quite a large code
I'm not sure which part should I post here.
I'll post something soon probably by tomorrow, as I'm online through mobile at the moment
0

Share this post


Link to post
Share on other sites
Are you moving your plane forward (z axis) using a key on the keyboard? Because if your plane stops moving forward when you press another key (to rotate it), you probably have a very simple logical problem in the code that checks for key states, where one check is overriding another.

If the plane is moving along the z axis by itself, and it stops when you rotate it, there's probably a much more complicated problem, but I'm guessing it's the first scenario, which I described.
0

Share this post


Link to post
Share on other sites
// as the function name suggests this function creates the environment, basically its just the plane and a couple of buildings and a road... simple polygons
void environment(void)
{
// i was just trying something with the rotatef codes , i dont actually plan on using this ... i just wish to rotate my object and not the world.
glRotatef(worldx,1.0,0.0,0.0);
glRotatef(worldy,0.0,1.0,0.0);
glRotatef(worldz,0.0,0.0,1.0);
glColor3f(0.4,0.2,0.2);
glTranslatef(0.0,0.0,-100.0);

//+VE Z-AXIS
drawbuilding(70,-30,15,10,64,10);

genroad();
glBegin(GL_POLYGON);
glColor3f(0.1,0.1,0.0);
glVertex3f(100,-30,250);
glVertex3f(100,-30,0);
glVertex3f(-100,-30,0);
glVertex3f(-100,-30,250);
glEnd();
}

void display(void)
{
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
gluLookAt(eyex,eyey,eyez,lookx,looky,lookz,0.0,1.0,0.0);
environment();
makejetplane();
attributes();
//maketplane();

Sleep(5);
glutSwapBuffers();
}

void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
gluPerspective(90.0, (GLfloat) w/(GLfloat) h, 1.0, 200.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}

void keyboard(unsigned char key, int x, int y)
{
switch (key)
{
case 'q':
exit(0);
break;
case 'w':
movz+=1.0;
glTranslatef(0.0,0.0,movz);
glutPostRedisplay();
break;
case 'a':

zpoz-=5.0;
rolll = 1;
glutPostRedisplay();
break;
case 'd':
zrpoz+=5.0;
rollr = 1;

glutPostRedisplay();
break;

case 't':
//worldx-=0.5;
xpoz += 5.0;
pitchu=1;
glutPostRedisplay();
break;

case 'g':
xrpoz -=5.0;
pitchd=1;
glutPostRedisplay();
break;
case 'f':
yawl=1;
rolll=1;
ypoz+=2.0;
zpoz-=1.0;
if(zpoz<=-45.0)zpoz=-45.0;
glutPostRedisplay();
break;
//rolll=0;

case 'h':
yawr=1;
rollr=1;
yrpoz+=2.0;
zrpoz+=1.0;
if(zrpoz>=90.0)zrpoz=90.0;
glutPostRedisplay();
break;
//rollr=0;

//CAMERA CONTROLS
case 'j':
lookx-=5;
glutPostRedisplay();
break;

case 'l':
lookx+=5;
glutPostRedisplay();
break;

default:
break;
}
}

//ANIMATION
void animate()
{

movz+=0.1;
//movement+=0.1;
eyez+=0.1;
lookz+=0.11;
glutPostRedisplay();
}

oid makejetplane()
{
if(pitchu>0)
{
glTranslatef(movx,movy,movz);
glRotatef(xpoz,1.0,0.0,0.0);
glTranslatef(-movx,-movy,-movz);

} //glRotatef(xpoz,1.0,0.0,0.0);

if(pitchd>0)
{
glTranslatef(movx,movy,movz);
glRotatef(xrpoz,1.0,0.0,0.0);
glTranslatef(-movx,-movy,-movz);
}
// glRotatef(xrpoz,-1.0,0.0,0.0);

if(yawl>0)
{
glTranslatef(movx,movy,movz);
glRotatef(ypoz,0.0,1.0,0.0);
glTranslatef(-movx,-movy,-movz);
}//glRotatef(ypoz,0.0,1.0,0.0);
if(yawr>0)
{
glTranslatef(movx,movy,movz) ;
glRotatef(yrpoz,0.0,-1.0,0.0);
glTranslatef(-movx,-movy,-movz); }
//glRotatef(yrpoz,0.0,-1.0,0.0);
if(rolll>0)
{
glTranslatef(movx,movy,movz) ;
glRotatef(zpoz,0.0,0.0,1.0);
glTranslatef(-movx,-movy,-movz); }
//glRotatef(zpoz,0.0,0.0,1.0);
if(rollr>0)
{
glTranslatef(movx,movy,movz) ;
glRotatef(zrpoz,0.0,0.0,1.0);
glTranslatef(-movx,-movy,-movz); }
//glRotatef(zrpoz,0.0,0.0,1.0);
// BODY
and rest are just the vertex3f codes ...
i've posted everything please guys help me out here.
and apologies for any rookie mistakes as it has just been 3-4 weeks since i've learnt opengl.
Thanks
0

Share this post


Link to post
Share on other sites
to antiHUMANDesigns--

thanks for responding ....
the plane is moving on its own n if i press a key i want the plane to rotate.
Now if i rotate the plane without any translations .... the plane kinda moves according to what i desire but not entirely - it does not face the other side ....the tip doesnt rotate rather the object rotates yu know how it is.
n if i translate it then the plane rotates as in the tip rotate but the plane yet moves in the z axis only ....
which looks a little stupid ( lol ).
i was thinking i create an axis and with the help of the axis ... the plane judges which way to rotate and move ... but its just a thought not sure how to go forward in that plan .. [img]http://public.gamedev.net//public/style_emoticons/default/dry.png[/img]
0

Share this post


Link to post
Share on other sites
this is the screen shot ...
im thinking of putting in a skybox for the 3d world effect .... but first i need to solve this movement issue.
0

Share this post


Link to post
Share on other sites
I don't completely understand what the problem is and I'm quite new to DirectX as well, but I'll throw this in anyway..
Just in case, check if you are rotating first and then translating. Otherwise the result is quite different to the expected.
0

Share this post


Link to post
Share on other sites
theo2005 , this is opengl not directx .... the problem is the movement of the plane ... not the rotation...
the plane is moving on its own .. using the animate funciton
and the rotation is done by the keys , i want the plane to move in the respective direction even after the key pressed rotation
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0