Results 1 to 7 of 7

Thread: My first little project

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2004
    Location
    Italy
    Posts
    12

    My first little project

    Hi, first of all excuse me for my bad english, I'm studing Opengl and I don't know if my reasoning is correct:I'd like to write a little game

    (a pong, for example) and so I'm studing in function of this.I follow this way:
    a) My reference is the RedBook (avaiable in pdf on this web-site), so I use also the glut library, I' will study at least the first five

    chapter (or all?)
    b) At this point, I hope to be able to write a game similary, if no,means that I must still study .




    The questions are:
    1)You suggest me to begin with a 2D game?
    2)It's useful, for the first time, to study on the source-code of other person, and the try to write a little game?
    3)A book like "Beginning OpenGl game programming" is obbligatory?

    whatever advise is welcomed!!!
    I'm Italian

  2. #2
    Senior Member Regular Contributor
    Join Date
    Dec 2002
    Location
    Poland
    Posts
    234

    Re: My first little project

    Hello!

    Originally posted by Omicron:
    The questions are:
    1)You suggest me to begin with a 2D game?
    Generally OpenGL was designed to be efficient 3D API but since 2D is only a kind of 'truncated 3D space' once you know how use 3D you will be able to fully work with 2D also. Anyway, begining with 2D is usually more simple because some things are just easier to visualize (for example on a piece of paper). What's more, most of 2D math remains true also for 3D. Anyway, I think that having some good tutorials or books (as Red Book surely is) you can go for 3D right away remebering to slowly and gradually advance in the material you are learning from.

    2)It's useful, for the first time, to study on the source-code of other person, and the try to write a little game?
    Yes, of course! There is nothing better than referencing to someone else's code. Some thing are just easier to understand if you actually see how to use them. It often happens that I read something in documentation and I have no clue what it is about. But when I take a glimpse at the sample code everything becomes clear (usually ). Just be careful to look for trusted source codes.

    3)A book like "Beginning OpenGl game programming" is obbligatory?
    IMO, having The Red Book is all you need at the time. Just read it from desk to desk (even a few times if you need to). Plus, you can check out some great OpenGL tutorials in the Net, like :
    nehe.gamedev.net or www.gametutorials.com

    Hope it helps!

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2004
    Location
    Italy
    Posts
    12

    Re: My first little project

    I will follow your advise !! For the moment I will study on the redbook, when I feel myself ready I begin to write a game. Thanks
    I'm Italian

  4. #4
    Junior Member Newbie
    Join Date
    Aug 2004
    Location
    Italy
    Posts
    12

    Re: My first little project

    I just find the base for my first game. At this link there is a little example of pong 2D using glut and openGL. It's so easy that understood also me
    I'm Italian

  5. #5
    Junior Member Newbie
    Join Date
    Aug 2004
    Location
    Italy
    Posts
    12

    Re: My first little project

    Hi, I have a problem. the paddle, using by player, goes up with this code:
    Code :
    if(playerPaddle < windowWidth/*=700*/) 
    	{
    	if(GetAsyncKeyState(VK_UP))
    		playerPaddle += step;
    	}
    If in the main(), I declare:
    glutInitWindowSize(700, 900);
    the paddle goes up and it dosn't stop.
    How I can make this verification, changing the size of window?
    I'm Italian

  6. #6
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: My first little project

    if(playerPaddle < windowWidth/*=700*/)

    hum no windowWidth = 900 ... try windowHeight.

  7. #7
    Junior Member Newbie
    Join Date
    Aug 2004
    Location
    Italy
    Posts
    12

    Re: My first little project

    Idem, the paddle goes up and up and up...
    if I use, for example
    if playerpaddle < 350
    it is nearly ok, I must find the righ mode!!!
    I'm Italian

Similar Threads

  1. we need help in one project- PLS HELP US
    By elli_avraxide in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-07-2011, 07:43 AM
  2. Help for my project..
    By Maanya in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-31-2009, 01:19 AM
  3. can you help about my project =(?
    By olgaa in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-21-2009, 08:26 PM
  4. Lost in project!
    By confused in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-21-2007, 02:51 PM
  5. Help me in my graduation project
    By kinglion in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-12-2006, 10:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean