Results 1 to 4 of 4

Thread: OpenGL and tic tac toe

  1. #1
    Member Newbie
    Join Date
    Apr 2008
    Location
    virginia
    Posts
    30

    OpenGL and tic tac toe

    Ok, I'm trying to learn opengl. I have a couple of books. I was wondering though. How would I go about making the board? I was thinking about taking 9 sqaures and going into photo shop and making a board and then dicing it up to match the squares. then making images that replace the image (orginals) on the square when a "O" or an "X" is played.

    or

    Can you have just 1 square instead of 9 sqaures and use some of corrdinate system to mate the images for the Xs and Os to the right spot?

    I've never done anything like this and I'm not use to thinking in programing terms so I'd like some ideas.
    Sean

  2. #2
    Member Newbie
    Join Date
    Apr 2008
    Location
    virginia
    Posts
    30

    Re: OpenGL and tic tac toe

    I was also thinking. How hard would it be to make the board 1 piece using a simple Texture for the board lay out and then making 2 more textures for the "X" and the "O" as a png so I can have a transparent background and then make up like 9 clickable mouse spots that when clicked applied the image (X or O) with in the predefined area??? How would you setup the predefined area?
    Sean

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

    Re: OpenGL and tic tac toe

    All these 3 implementations are possible.

    The simplest for you is probably to have 3 different textured quads : empty background, background with x, background with o. Then you can draw as many as you need, ie 9 empty at the start, etc.

  4. #4
    Member Newbie
    Join Date
    Apr 2008
    Location
    virginia
    Posts
    30

    Re: OpenGL and tic tac toe

    Quote Originally Posted by ZbuffeR
    All these 3 implementations are possible.

    The simplest for you is probably to have 3 different textured quads : empty background, background with x, background with o. Then you can draw as many as you need, ie 9 empty at the start, etc.
    I was thinking that might be the easiest. I plan on heading back to school for programing in the spring time. I am hoping programming II will open more doors.
    Sean

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