Jump to content

  • Log In with Google      Sign In   
  • Create Account


phil67rpg

Member Since 25 Feb 2004
Offline Last Active May 23 2014 10:18 PM
**---

Posts I've Made

In Topic: opengl question

10 May 2014 - 09:21 PM

thanks I really appreciate that.


In Topic: opengl question

10 May 2014 - 08:51 PM

well then am I just stupid?


In Topic: opengl question

10 May 2014 - 08:19 PM

how does everyone else get so good at game programming and I have such a hard time, am I just stupid?


In Topic: opengl question

10 May 2014 - 08:11 PM

then how do I ask a relevant question?


In Topic: opengl question

10 May 2014 - 07:00 PM

well I have done a lot of reading about opengl, in fact I am reading the "red book" which is the opengl programming guide. however I have a very simple question to ask. I have searched the internet for answers but I am still a little confused. All I want to do is shoot a bullet sprite from a space ship sprite. I want to shoot bullets like in asteroids, in a machine gun fashion. I am using the space bar to shoot bullets. here is the code I working on.

void
 
 
bullet()
{
up += 0.5f;
 
 
 
if (up >= 18.0f)
{
up = 0.0f;
}
}
void
 
 
handleKeypress(unsigned char key, int x, int y) {
 
 
switch (key) {
 
 
case 27: //Escape key
exit(0);
 
 
break;
 
 
case 32: //Space Bar
bullet();
 
 
break;
}
glutPostRedisplay();
}

I know this is a very simple question but I need a new set of eyes to look at this problem.

thank you in advance for your patience. I am doing the best that I can do.


PARTNERS