Sign in to follow this  
jblevins1991

Where to start

Recommended Posts

Get the GL programming guide (aka Red book), OpenGL super bible, visit some tutorial such as NeHe although they are extremely outdated.
glaux.h is quite old as well. Use DevIL to load your bitmaps.

Share this post


Link to post
Share on other sites
Step 1) Decide not to learn C++
Step 2) Decide to learn programming through any language of comfort (prime candidates include, but are not limited to: Python, C#, Java et al)
Step 3) Learn a 2D library or two. There is PyGame for Python and XNA for C#.
Step 4) Learn basic game programming by making simple games like Pong, Tetris etc. (note: original designs are OK as long as they are deadbeat [i]simple[/i])
Step 5) Make pokemon game clone mentioned above

You could also skip step 4, but that will increase the time spent on step 5. Whatever you do, make sure you're having fun with it! :)
Also, if you absolutely [i]insist [/i]on using C++ for this then the answer to your question (which btw, is [i]not [/i]the above) is SDL. That has everything needed for a pokemon clone -- no need to get into D3D/OGL for this. You did leave out many pieces of vital information; such as 2D or 3D and what exactly you are aiming for more exactly -- thus I have assumed you are attempting to make a clone/simile to the pokemon franchise's early games (Red, Blue, Gold etc) and not a full-fledged AAA+ 3D game or anything such.

Share this post


Link to post
Share on other sites
[quote name='DarklyDreaming' timestamp='1318425988' post='4871823']
Step 1) Decide not to learn C++

........
[/quote]

What do you mean by "Decide not to learn C++".
In his post he says he has learned C++ ("I know quite a bit of c++").
He wants to put his knowledge to work.

Making a basic game with it is certainly possible. Make a few basic ones like pong and tetris and pac-man and then move onto bigger things.

Share this post


Link to post
Share on other sites
[quote name='V-man' timestamp='1318508016' post='4872183']
[quote name='DarklyDreaming' timestamp='1318425988' post='4871823']
Step 1) Decide not to learn C++

........
[/quote]

What do you mean by "Decide not to learn C++".
In his post he says he has learned C++ ("I know quite a bit of c++").
[...]
[/quote]

Well, that's all fine and dandy... except for the fact that unless he's worked with it for quite some time, he knows absolutely [i]squat [/i]about programming in C++. But hey, if he wants to go for it I say hell yes -- just making sure he understands that it's not needed for what he wants to do nor will it help in any way to speed up his goal; I also strongly suspect (this is inferred) that he knows 'quite a bit' (read: 'I read some tutorial(s) on teh interwebz') and that he would achieve faster results in a more suitable language.

But all that is besides the point; I already gave him advice if he wants to go with C++ -- unless he has spent a couple of years in it finding out just what kind of beast it is, I'd'nt recommend it for learning programming (again, I assume he's not experienced - if he was, no need to ask this type of question) but it's his choice I guess.

Share this post


Link to post
Share on other sites
[quote name='DarklyDreaming' timestamp='1318508858' post='4872185']<br />[quote name='V-man' timestamp='1318508016' post='4872183']<br />[quote name='DarklyDreaming' timestamp='1318425988' post='4871823']<br />Step 1) Decide not to learn C++<br /><br />........<br />[/quote]<br /><br />What do you mean by &quot;Decide not to learn C++&quot;.<br />In his post he says he has learned C++ (&quot;I know quite a bit of c++&quot;).<br />[...]<br />[/quote]<br /><br />Well, that's all fine and dandy... except for the fact that unless he's worked with it for quite some time, he knows absolutely <i>squat </i>about programming in C++. But hey, if he wants to go for it I say hell yes -- just making sure he understands that it's not needed for what he wants to do nor will it help in any way to speed up his goal; I also strongly suspect (this is inferred) that he knows 'quite a bit' (read: 'I read some tutorial(s) on teh interwebz') and that he would achieve faster results in a more suitable language.<br /><br />But all that is besides the point; I already gave him advice if he wants to go with C++ -- unless he has spent a couple of years in it finding out just what kind of beast it is, I'd'nt recommend it for learning programming (again, I assume he's not experienced - if he was, no need to ask this type of question) but it's his choice I guess.<br />[/quote]
I don't know where the OP is from but if it's the UK, typical British understatement means that "know quite a bit about" actually means "know lots about".

They've asked the the question in the OpenGL forum not the General Programming, Game Programming or even the For Beginners forums so I assume they are an beginner at OpenGL, not programming in general.

@jblevins1991: V-man mentioned some resources but they frequently cover old style OpenGL programming. You can find course notes from a recent conference presentation on an [url="http://www.daveshreiner.com/SIGGRAPH/s11/"]Introduction to Modern OpenGL Programming[/url] which will help you avoid learning the old deprecated OpenGL features.

Share this post


Link to post
Share on other sites
For all of you who derailed my question into a C++ sucks thread, the games where made in C/C++, not only that but C++ is more to what i want...not C# because C++ has lower level control over hardware (why do you think its used to make drivers guys). Everybody who told me to learn a new language is useless because that does not answer my question.

I know enought to start learning OpenGL, i have the OpenGL Super Bible (the blue book) and have the SDL library. The issue is that the SDL documentation doesn't adhere to game graphics, just video.

I need some from the beginning tutorials on how to initialize the graphics for a map, where the map should be stored in a VC++ project.. the template and code of an example map using opengl...stuff like that.

Oh and i will admit i did leave some information out, i am making a Fire Red update with new maps and graphics.

Share this post


Link to post
Share on other sites
Wait a week n buy my dvd :)

For now, its hard because all information on anything related to making games is so scattered. try nehe.gamedev.net. Of course the best thing you can do is make your game 2d and program all the logic and attacks, then go and replace your 2d placeholder images with 3d models/animations etc. It's a good way to separate the work.

Share this post


Link to post
Share on other sites
[quote name='dpadam450' timestamp='1318543904' post='4872328']
Telling someone not to learn something because it is too hard is stupid. Nobody goes from nothing to pro in anything in the world in a day.
[/quote]

Exactly. And you don't need to be a pro in C++ and know every little detail in order to write a application. In fact, C++ is perfect for game engine writters. Everything else is perfect for your next generation browser and email software.

Share this post


Link to post
Share on other sites
[quote name='V-man' timestamp='1318557456' post='4872388']
[quote name='dpadam450' timestamp='1318543904' post='4872328']
Telling someone not to learn something because it is too hard is stupid. Nobody goes from nothing to pro in anything in the world in a day.
[/quote]

Exactly. And you don't need to be a pro in C++ and know every little detail in order to write a application. In fact, C++ is perfect for game engine writters. Everything else is perfect for your next generation browser and email software.
[/quote]

Thank you very much good sir, now can we get back on track?

so what is the verdict? Pure OpenGL? SDL? What do you guys think?

im aimaing for the graphics to look something like the graphics in black/white.

Share this post


Link to post
Share on other sites
If you are going to use GL, then I suggest starting out with a toolkit like SDL or freeGLUT or [url="http://www.glfw.org/"]GLFW[/url] to hide the platform specific part of context creation and destruction. Then you can just concentrate on GL which is the same on all platforms.

http://www.opengl.org/wiki/Related_toolkits_and_APIs

Share this post


Link to post
Share on other sites
So i have SDL and GLUT downloaded the book i bought is for glut. i downloaded glut and looked at the documentation and it makes no sense.
i have glut 3.7 and it says that i need glut32.lib glu32.lib opengl.lib and glut32.dll. instead it have me a bunch of c source files can somebody help me i downloaded glut from the same place the documentation is.

Share this post


Link to post
Share on other sites
Opengl Superbible 4th edition . great book. comes with cd full with tutor files. its dissadvantige is that it doesnt covers 3d model importing or texture importing or shadow mapping.nor normal calculation or smooth shading methods. they have their own functions specially for that book and they use them, without explaining what heppens inside. i personally am stuck on shadows right now. cant get tutors at all :((( in other words it perfect for start but horrible for thous who already knows something. im kinda new in c++ too... try this:
http://www.swiftless.com/tutorials/opengl/gldrivers.html
install dll s into windows/ system 32. i keep glut32.dll in same folder as executable file. but if im not wrong you could install it in system32 aswell.
copy from zip's include into
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\Include\gl
and lib files from zip into
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\Lib



here is basic c++ opengl thing:


#include <iostream>
#include <stdlib.h>
#include <GL/gl.h> //here is gl.h you'v just installed
#include <GL/glut.h> //here is glut.h you'v just installed

using namespace std;




int k=0,d=0;
float camx=0.0,camy=0.0,camz=-10.0;
float camrotx=0.0,camroty=0.0,camrotz=0.0;
float camrotdeg = 0.0;
void RenderScene(void)
{

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(camx,camy,camz); //this guy translates the object into any place you like.

//here you could just say glTranslatef(10,2,7); or anything you like.
//however if you need to controll the translation by keys, you need to set float variables here. and controll
//numbers inside variable's . switch statement below does that. if a keyboard key a or s or w was clicked, switch statement
//grabs for example camx and adds 0.1 to it. if before clicking it was 2.0 , ufter clickeng 'a' it will be 2.1. translatef
// will get new coordinate and translate object onto it.



glRotatef(camrotdeg,camrotx,camroty,camrotz);
glPushMatrix();
glBegin(GL_QUADS); //your rectangle drawing starts here
glVertex3f( -0.5, 0.5,0.0);
glColor3f(1.0, 0.0, 255.0);
glVertex3f( 0.5, 0.5,0.0);
glColor3f(0.0, 255.0, 0.0);
glVertex3f( 0.5, -0.5,0.0);
glColor3f(120.0, 15.0, 0.0);
glVertex3f( -0.5, -0.5,0.0);


glColor3f(1.0f, 0.0f, 1.0f);
glVertex3f( 0.5f, -0.5f,0.0f);
glVertex3f( 0.5f, 0.5f,0.0f);
glVertex3f( 0.5f, 0.5f,0.5f);
glVertex3f( 0.5f, -0.5f,0.5f);

glEnd();


glPopMatrix();
glFlush();
}



void SetupRC(void)
{
glClearColor(0.0f, 0.0f, 0.5f, 1.0f);
glEnable(GL_COLOR_MATERIAL);
}

void camcontroll(unsigned char key, int x,int y) //camcontroll grabs keys that are pressed, then switch statement
//checks different cases.

{
switch (key) {

case'a': //in case if key 'a' was clicked, add 0.1 to camx.see glTranslatef above.
camx += 0.1;
glutPostRedisplay(); //without this, translation will happen but you wont see it on screen. it refreshes the screen
break; //its simple switch statement's guy. ufter every "case" ends, add "break".

case'd':
camx -= 0.1;
glutPostRedisplay();
break;
case'w':
camy -=0.1;
glutPostRedisplay();
break;
case's':
camy +=0.1;
glutPostRedisplay();
break;
case'q':
camz+=0.1;
glutPostRedisplay();
break;
case'e':
camz-=0.1;
glutPostRedisplay();
break;
case'f':
camroty=1.0;
camrotdeg-=1.1;
glutPostRedisplay();
break;
case'h':

camroty=1.0;
camrotdeg+=1.1;
glutPostRedisplay();
break;


default :
break;
}
}


int main(int argc, char* argv[]) //program starts here
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(800, 600);
glutCreateWindow("GLRect");
glutDisplayFunc(RenderScene);
SetupRC();
glutKeyboardFunc(camcontroll); //keyboard input starts working here, see function camcontroll.
glutMainLoop();

return 0;
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this