View Full Version : the opengl limit?
02-15-2005, 08:26 AM
I am still a bit new with 3d graphics and opengl. I am sorry if this question has been answered before, but i didn't really find any direct sort of answer anywhere. (maybe i just didn't understand or overlooked)
If i were to make a game, would opengl alone be enough? Do i need to write some sort of 3d graphics engine based on underlying opengl or is opengl alone sufficient? And if a 3d graphics engine is neccesary, what does it do exactly? Should i use sdl or glut? How strong a game can i make?
I don't want to download any existing easy-making 3d graphics engines that practically do everything for you. I wanna do all the hard work myself, excluding of course what opengl does.
02-15-2005, 08:42 AM
OpenGL (and to a certain extent directX) is just a library of functions for drawing primitives to the screen.
It manages a graphics state of transformations and attributes using commands that you issure to it. Something like:
glColor3f( 1, 0, 0 ); // Set drawing colour to red
glTranslatef( 0, 0, 5 ); // Translate 5 units along z axis
glBegin( GL_TRIANGLES ); // Start drawing triangles
glVertex3f( -1, -1, 0 ); // Specify vertices
glVertex3f( 1, -1, 0 ); // ''
glVertex3f( 0, 1, 0 ); // ''
glEnd(); // Stop drawing
Obviously it gets a lot more complicated than that, but that's about the level of operations you do.
For writing a game, you'll need to write classes that store and use, for example, data for models, textures, shaders, animation, the scene graph, all the game code itself such as AI, physics, controller input, sound etc. Not to mention that you'll need to do lots of culling so that you don't give OpenGL too much to draw at once. Oh and you'll need all the maths libraries too...
Take a look at some game engines to see the scale of the sort of thing required, like ogre or neo, or torque (google for them)
02-15-2005, 08:32 PM
thanks for reply, p
the thing is, i know opengl kinda well, after taking time to learn it recently. But now i'm unsure of my course to start a game. So it seems i'm gonna have to write a game engine first. Grrrr. A game engine with all those features, grrrr.
02-16-2005, 08:16 AM
If you want to make a game, I'd advise you to take a look at those engines I mentioned and try using them to do something simple.
Once you've seen what the end result needs to do, writing your own will be a lot easier.
A game engine is a mammoth project. There's a lot of boring stuff to do before you can get to the cool, exciting effects which are the icing on the cake :)
02-17-2005, 03:37 PM
If you're serious about making a game go check this *site* (http://www.artificialstudios.com/)
If you think you can top their PRT method you should try, if you don't think you can you are toast in getting some money back from all your efforts.
02-17-2005, 07:34 PM
Yes, i've done a lot of reading. I do now realize a game engine is mammoth. I'm certainly first gonna use another opensource game engine written by people that's been at it for years. This way can i learn what's needed while still implementing a cool game.
There's no sense jumping in the deep end of things a don't know that much about.
I think i'll try the gradual approach to the 3d world. It looks like opengl is but a drop in the barrel of 3d, and that's all i know still (and the maths from university).
02-18-2005, 12:36 AM
Good luck anyway!
There's still lot's of fun stuff you can do though! I hear the engine for quake III had it's source code released, they used an upgraded version of it for Doom3. Loads of fun you could have with that, and I think the 3d stuff is pretty much knowing the math but the rendering differs a lot per different program. But I actually don't know, I'm just guessing. www.idsoftware.com (http://www.idsoftware.com)
02-19-2005, 05:32 PM
If i were to make a game, would opengl alone be enough?
No, you need something to do event handling & windowing as well, like glut does. But typically real games use separate libraries for that. You'd want an API for sound too.
Should i use sdl or glut? How strong a game can i make?
I'd actually highly recommend writing a SMALL game using glut from scratch, and not using someone else's engine. I'm certain that you would find yourself severely limited in certain specific ways, but it would be great to learn for yourself exactly why and what you'd need to do it better. And of course one of the greatest strengths of glut is just that it's so freaking easy- using APIs more appropriate for real games are much more difficult to learn.
02-19-2005, 07:57 PM
thanks for your advice, master shadow
i am actually planning to make a small project using opengl only either with glut or sdl. And as you say, hopefully i'll learn a lot. But i'm gonna be starting a game soon with another guy doing the graphics. For this i'll be using a opensource engine. So i'll be juggling between the two, and of course my university studies. The quicker i learn the better.
If you know OpenGL fairly well the I would suggest starting off making a simple 2D game. The task at had of making a 3D Engine is extremely big and at first boring. If you make a simple 2D game like checkers or tic-tac-toe it still gives you an idea of how you put a game together using a simple 2D engine.
02-23-2006, 07:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.