Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: How to create a flash game using OpenGL with C++

  1. #1
    Intern Newbie
    Join Date
    Nov 2009
    Posts
    41

    How to create a flash game using OpenGL with C++

    Hi all,

    I wants to create a game using OpenGL with C++. The link below shows the flash game. I am eager to create this in 3D using OpenGL with C++. Please give me some Ideas regarding this.

    Flash game


    Sorry for my bad English.

    Advance thanks.

  2. #2
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: How to create a flash game using OpenGL with C++

    http://www.opengl.org/discussion_boards/...an=3#Post305969

    Especially this part,
    4: Clearly state your problem in your text. Make sure to include all relevant details. If you have only written single paragraph, that’s probably not enough detail. A single sentence is completely out of the question. While overdoing the detail is possible, it’s better to put too much detail in than not enough detail.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  3. #3
    Member Regular Contributor
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    302

    Re: How to create a flash game using OpenGL with C++

    If not already done, learn C++ and OpenGL. If you have problems designing the games architecture, read a book about gameengine design. If you have specific OpenGL related problems, post them here.

  4. #4
    Intern Newbie
    Join Date
    Nov 2009
    Posts
    41

    Re: How to create a flash game using OpenGL with C++

    Hi Thank you all for your reply's.

    Basically i want to develop the rotation and translate of cube based on the pressing of arrow keys.
    Based on the arrow key pressed the cube will rotate in that direction and translate based on the pivot position. If you didn't understand please click on the link below. I am not getting the exact idea on this. I am planning to develop using OpenGL and C++.

    http://www.albinoblacksheep.com/games/bloxorz

    Thank you in advance

  5. #5
    Member Regular Contributor
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    302

    Re: How to create a flash game using OpenGL with C++

    Getting keyboard input is not part of OpenGL, look up the documentation of your preferred GUI toolkit for that.

    For the translation/rotation itself, look up how to create the corresponding matrices. That's basic math and is handled in nearly all OpenGL tutorials as well (unless they are outdated and begin with glRotate etc.).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •