Path Choice Questions
I'm Beginning/Intermediate in C++ and will continue down that line, but what choices should I take towards graphics and game programming?
For now it is just a hobby but I would like to expand into some programming field eventually. What would be best to learn indepth to go out and program a game (or engine).
Simple reply: DirectX or OpenGL (for professional games)
If anyone knows the answers to any of these questions would you mind letting me know your opinion?
1) I'm not sure about DirectX based games: can they run on Linux and Mac's? the same as OpenGL?
1.b) If so what is the real difference? just different efficiency/powerful fields? Like comparing Java to C++.
2) Which would be used for a retail game? (higher percent would therefor be better to learn)
3) About some library called Glut for OpenGL: would it be best to learn this with OpenGL or program my own window creation functions? would learning that library leave me limited to know those library functions instead of the real ones when making a real game?
4) You can't run win32 API programs on Macs right? (but you can on Linux) so why use win32 API for game programming and not use DirectX or OpenGL's GUI?
4.b) Or should I not worry about that? everyone uses windows programming for their games and simply get someone to convert a version to Mac?
5) Bother learning to use Allegro library? I know its sort of like an introduction to 2D graphics, but is it actually used in real games (and not just beginners, demo games)? I'd assume 2D graphics would be in DirectX programming.
6) Sort of already asked this, but windows game programming is really the only real game programming isnt it? I know thats a stupid question because how would Mac's ever run a game, but I mean on windows without using win32 or winthreads or whatever, how else would you ever create a window. Hence most professional games (if not all) use win32 or winthreads, etc. or do they use DirectX/OpenGL GUI? Most tutorials I see use windows.h
Thanks in advance for any help :), and please ignore any of my ignorance on the subject. Just trying to clarify so I dont end up taking a path and changing my mind, even though I'll probably have to end up learning DirectX and OpenGL since projects vary, which is only if I ever participate in a project not using a pre-made engine.
Hard call both openGL and DirectX are used for professional games
Q1. DirectX is Windows specific it cannot run on any other operating system OpenGL can.
Q1b. Performance depends on the user's graphics card.
Q2. Both are used for retail games.
Q3. It may weaken your knowledge of the win32 API and it has it's limitations however, it's quick to understand (for me anyway) and it runs on just about any system. It will also help you better understand the openGL API.
Q4. Use GLUT.
Q4b. Wrong everyone does not use Windows for games there are quite a number of game for Linux and quite an number of games for Mac. In fact most graphics programming you see on T.V. and movies where done using Macs and SGI Machines not windows.
Q5. Actually you can do some pretty decent 2D graphics with Allegro plus it is platform-independant.
Q6. Contrary to what you just said Macs are actually know for faster graphic output than windows namely because of the machine it runs on. Most of Hollywood films eg. Final Phantasy: The Spirit Within; Jurrasic --excuse my spelling-- Park, ...ect. There are more ... alot more. Shrek was created using an SGI machine. Doom was written using OpenGL.
ect.... Next time you rent a DVD check out the "making of __" section zoom in to the computers they are using.
of course using windows API functions would make your opengl program non portable so using something like GLUT or SDL will make any opengl program portable.
Aw I was SO ready to say A* pathfinding...
Thanks for the replies!
I thought on it and some of what I said in my post didnt make sense, but didnt have a chance to edit it.
For Q3 I meant which do you think is more used in the industry. Edit: Apparently DirectX is, but thats changing.
About GLUT, is it the only library to use for OpenGL? or is there a better one/other choices (pref. one used in real games). Also if GLUT (or other) is what you use for OpenGL for most platforms, then most industries would use this library right? since not using it would require building a library from scratch, which I'm assuming checks for which OS you are using to see which API to use (win32, mac style, etc.) to create windows/send messages/etc.
Edit: Removed blabber.
Here is a list off the top of my head
FLTK (this one has been the best in my experience)
PUI (or is it PLUI)
Allegro has its own GUI
There is a game engine that is cross-platform called Irrlitch
Sorry this is where I stop (Out of memory error--refering to me)
but you can always google it.
look up platform-independant GUIs (or something to that nature)
but for gaming I would have to recommend GLUT it's very easy to use.
and is actually built specifically for games.
By the way openGL does also support 2D graphics (probably better than DirectX).
Hey, thanks again
Edit: Removed blabber, figured it out now..
Read some more.. appears most of these were based on GLUT so they mostly all contain what GLUT does, nice list: www.hal9k.com/cug/links/subject35.htm
Says FLTK is Windows only.. scratch FLTK. Says GLFW doesnt support Mac's, scratch GLFW. Says Qt is X windows and win32, scratch Qt. Even though these are just basicly for application window interfaces.
Maybe I'll stay with GLUT, its cross platform and it may not have as much power since you'd have to define all the extra features yourself if you wanted them (instead of using another library). Also like you said more geared towards gaming, but its more like GLUT set the plate for basic graphics using openGL, and these other libraries are just wrappers to add window features. Too bad it doesnt support scrollers and buttons. You think I could use GLUT and make functions for these? but if you could do that why wouldnt it be included in GLUT? guess its some platform compatibility issue :mad:
GLUI looks very good so far, cross compatible, buttons, scrollers, etc... wheres the disadvantage? Apparently its less customizable, but still.. great for cross platform window applications.
GLOW seems to be what I want, its a C++ wrapper for GLUT using OpenGL. Basicly its just adding features to create buttons, windows, etc. (some of which GLUT doesnt do). Seems GLOW/GLUT/OpenGL would be best in a gaming path.
These addons (GLUT, PUI, etc.) for OpenGL can be so annoying, leaves a lot of converted tutorials and specific tutorials out there.
GLUT hasnt been updated in 5 years, yet they called the most recent version "beta". GLUT pretty much requires you to use VC++ (yay!, NOT :mad:, and this is because GLUT hasnt been updated in 5 years and GLUT's install download is for VC++ or Borland.. no newer compilers, and using it with Dev-Cpp gives me linker errors. Also the GLUT readme refers urls that dont even exist. I wonder if that Visual Express Studio Beta 2 thing would be fine to use..
So considering I have to make a window somehow, its either win32 (im on Windows) or GLUT.. well.. what I'll do is find a way to get VC++ and use GLUT for now and follow NeHe's tutorials, then switch over to Qt (has over 500 classes) instead of GLUT, when I'm familiar with OpenGL. Qt looks quite professional, and is used in commercial games, along with some books written for OpenGL using it.
OpenGL/SDL/Qt is the path, definetly (SDL = input/sound/keyboard, Qt = interface/functions/etc)
Its coming along, finally.. and I had so many links floating around, so I put them into a link list: http://kylm.com/forum/?p=view_topic&id=68
Not sure about GLUT but there is a devpak for OpenGLUT for Dev-C++