Click to See Complete Forum and Search --> : Opengl?
macmoy
June 4th, 2007, 08:25 AM
i think i chose opengl for making graphical games..
can anyone point me to a good(very good and very easy to understand) tutorial???
i'll rili appreciate whatever info you give..
thanks in advance!!!
TheCPUWizard
June 4th, 2007, 08:53 AM
i think i chose opengl for making graphical games..
can anyone point me to a good(very good and very easy to understand) tutorial???
i'll rili appreciate whatever info you give..
thanks in advance!!!
The best advice I can give is to actually spend times with the tutorials for all of the appropriate graphics engine, before making a choice. Otherwise how can you even begin to tell if the engine you picked is the most appropriate one???
Some interesting OpenGL tutorials are at http://jerome.jouvie.free.fr/OpenGl/Tutorials1-5.php
nitin1979
June 5th, 2007, 12:24 AM
bro. macmoy me also developing a game
MY game is
Nim logic game. It is a 2-player game, but you can play against the computer. The rule of the game is to take one or more pieces from one row on the board. Then, the other player goes, etc. The winner is the player that takes the last piece.
I first want to develop this only part after that i want to extend this to Multi player Game. So that user on network can play this game in group of 2 like a game of pool in yahoo.
I am not using OpenGL though i learned OpenGl to aquire more knowledge.
I am using GDC bcos i don't want to develope 3D game and don't wanna use much graphical format.
as our Big Bro. CPUWizard suggest we have to first go through our game whether it need that much about of graphical format or not.
I think i Game main thing is Logic instead of Graphics.
Hence me decide to use GDC to develop my Game bcos i have to socket programming also so that my Game can have three facility.
1. user with computer game
2. user with user game
3. more then 2 user on Network can play this game in group of 2.
If you want good tutorial for Open think check this link. I found this tutorial very nice and having much valuable information.
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=01
and If your mood change and you want to use GDC then check this link.
http://www.quepublishing.com/articles/article.asp?p=328647&seqNum=3&rl=1
Bro. let me know about your game.
I had develop my game on console base. Now I have to change it to graphical view. and do socket programming. Lot of work have to do :(
I have one question CPUWizard. how to can we handle click events in OpenGL if you know then i am very thankful to you.
Or we can use OpenGL for developing Interface only and handle click event using win32 API only.
If you can give me some suggestion the i am very thankful to you CPUWizard.
MAMEman
June 5th, 2007, 07:12 AM
nitin1979,
You can't handle mouse clicks or infos from any other input device since OGL is graphics only!. However Win32 API will rescue you because you can trap mouse events using WM_MOUSEDOWN etc. messages in your WinProc. You can let your objects handle them from there.
Hope this helps,
MAMEman.
nitin1979
June 5th, 2007, 08:28 AM
MAMEman,
Can you give one example or link so that i can understand how to know the position where mouse is clicked.
What i wanna do is that i make one triangle and then put some balls in them (put means draw). Now i want that if i click on any of the ball in triangle then that ball should disappear or change the color of ball.
Thanks for your suggestion
cstyle29
June 7th, 2007, 05:53 PM
macmoy,
I purchased a book from a used book store on OpenGL. It's called OpenGL SuperBible ISBN 1-57169-164-2
I can tell you it is GREAT! I have been trying to understand directx for years and got no where. I am trucking along in this book.
I do think you can do 2d and 3d game programming with GL. I'm still early in the book but, I've learned how to build a 3d cube. I took what the instructor said in the book about drawing lines, and created a cube.
You can't handle mouse clicks or infos from any other input device since OGL is graphics only!.
In my book it shows you how to capture mouse event with GL. This example come right out of the book.
The parameters are listed as follows:
GLUT_LEFT_BUTTON
GLUT_MIDDLE_BUTTON
GLUT_RIGHT_BUTTON
The state parameters are as follows:
GLUT_UP
GLUT_DOWN
void MouseHandler(int button, int state, int x, int y)
{
if(button == GLUT_LEFT_BUTTON && state == GLUT_DOWN)
MessageBeep(-1);
// You would check for this in your main fucntion, or any other function.
glutMouseFunc(MouseHandler);
}
I had develop my game on console base. Now I have to change it to graphical view. and do socket programming. Lot of work have to do
In the book it takes you through console mode that creates a window and you make your 3d stuff. Drawing lines, spirals, etc... and you rotate them. Later on in the book you actually make a window using WinMain() and other windows base stuff.
This is the first example on drawing triangles:
glBegin(GL_TRIANGLES);
glVertex2f(0.0f, 0.0f);
glVertex2f(25.0f, 25.0f);
glVertex2f(50.0f, 0.0f);
glVertex2f(-50.0f, 0.0f);
glVertex2f(-75.0f, 50.0f);
glVertex2f(-25.0f, 0.0f);
glEnd();
I hope this gets you started. Like i said, it's the first book that's ever made sence to me. I hope this was helpful for you.
nitin1979
June 8th, 2007, 12:49 AM
Thanks cstyle29 bro.
me today only try to find out this book
billw
June 8th, 2007, 05:17 AM
OpenGL has a set of functions for picking/selection, and also for feedback. If you are doing OpenGL then you should get the OpenGL Programming Guide (AKA the Red Book) at least.
Good tutorials at:
http://www.lighthouse3d.com/opengl/: specifically you will want to look at "Picking Tutorial" for mouse selection.
http://nehe.gamedev.net/: industry standard OpenGL tutorials.
ne0n82
June 12th, 2007, 05:27 PM
i also own a copy of the OpenGL superbible its a little dated although i dont think much has changed and it reads like a 5th grade textbook, very easy to understand, and an awesome text for the subject i highly recommend it A+++
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.