PDA

View Full Version : New to OpenGL and have a few questions before I begin



Milk
08-24-2006, 09:46 AM
Good afternoon everyone,

My names Mike and im 12 years old and desire to be a games programmer so I thought I best start learning now ^_^

I am competant at C++ programming (Socket programming, Window Programming and all the basics with that in windows) however I know nothing about OpenGL.

I should probably state that I desire to learn GLUT.

Right now on to the questions.

I have always found that the best way to learn a language is to write a program that you are interested in and try to manipulate the tutorials into your desired program. This always seems to keep my motivation up. Anyway I want to know if I can code the following game using OpenGL or whether I have the wrong end of the stick, which is usually the case:

It will be a card game similar to Naughts and Crosses or for the Americans among us Tic-Tac-To However it will be 2 players and will be played across the internet so it will need socket programming. The user will select a card and place it on the board and this move will be mirrored to their opponent and then the opponent does the next move.

Now is this kind of game capable of being coded in OpenGL and C++ for the socket programming?

There will also be a lobby available where other online players are and you can select your opponent from the list and challenge them to the card game, so both of you are taken out of the lobby to play the game.

If this is possible then I understand it is a hell of a first project, but as I said its the way I learn best.

Now my next question. This card game I want to make will have pictures on the cards which I have in JPG form, is there away in OpenGL that i can map the JPG on the playing card in the game or will the picture need to be Drawn from scratch using the OpenGL API?

Now for the final annoying question that you must answer 50 times a day :-P

Can you recommend any beginner tutorials for GLUT? I heard NeHe was good but it seems to be using GLAUX not Glut.

Thanks for your time and patience in reading that mammoth post.

08-24-2006, 10:17 AM
http://www.lighthouse3d.com/opengl/glut/

hth

Milk
08-24-2006, 10:19 AM
Cheers mate, that answers one of the questions. Anyone else know the answers to the first two? Thanks

zeoverlord
08-24-2006, 10:49 AM
1. Yes it's possible, hard, but possible.
The best thing would be to make a simple single player version first and then add on the bit's that are missing over time.

2. this is no problem, uv mapping is one of the first things you will need to learn, but you might want to switch the texture format to .tga since it's way easier to load than .jpg

3.nehe.gamedev.net is good, and although Nehe does use glAux for now(the new lessons will not), you could allways just skip ahead to the tga loading lessons.
But glAux that does not have anything to do with glut at all.

dorbie
08-24-2006, 10:54 AM
Yes it is possible to write this.

You map images in OpenGL using texture. You need to load the jpeg to memory then send it to OpenGL as an appropriately formatted data array.

http://nehe.gamedev.net/

Texture is lesson 6.

Milk
08-24-2006, 10:56 AM
Thanks a lot for the reply :-) You're right about the single player first so i'll give that a stab. I think I can code the Lounge area without touching OpenGL so that will be simple enough.

Right its time to start learning OpenGL.

One other question I do have though which is once again a common question so sorry in advance

As I said I want to get into game programming which is why im learning early. However I know that D3D is just as big as OpenGL. As i know about 3 different programming languages (C++, VB and Ada) i found once ive learnt one of them the other 2 were very easy to pick up. Can the same be said for learning D3D once you've mastered OpenGL? I mean i assume the concept will be the same just different APIs etc.

Thanks

dorbie
08-24-2006, 12:09 PM
Yes there are a lot of common concepts and even similar hardware. OpenGL is the better cleaner option for learning, then you can move to D3D.