View previous topic - View next topic |
Author |
Message |
Barok Stephen Hawking
Joined: 26 Nov 2002 Posts: 248 Location: Bushland of Canada
|
Posted: Tue Jan 13, 2004 4:16 am Post subject: preferred c++ lib |
[quote] |
|
heh, it's been a while. glad to see the place is still hanging in there. ;)
anyways, over the weekend i picked up a c++ book and started reading. I enjoyed reading about how to prog in c++, but was disappointed in the lack of actual commands you have without using a lib.
while the book is very good (still haven't finished it) Each lib it uses has very few functions, and therefore is not very useful. I'd prefer just one lib, that would have all i would need like in qb. so what lib(s) would you guys prefer? (if it depends on what i'm gonna be doing, mostly rpg making in screen 13h, and maybe higher resolutions later on.) thanks in advanced! _________________ Adosorken: I always liked slutty 10th graders...
Rhiannon: *Slap!*
|
|
Back to top |
|
|
Bjorn Demon Hunter
Joined: 29 May 2002 Posts: 1425 Location: Germany
|
Posted: Tue Jan 13, 2004 11:11 am Post subject: |
[quote] |
|
When I was programming in QB I tried several times to make a switch to C/C++. The only time I finally succeeded was when I found out about Allegro. In has functions very similar to QB, and is just as easy to use with the added advantage of speed and functionality. SDL does about the same. Another advantage of both libs is that they are portable. This means that a game using these libs can be compiled for multiple operating systems without much trouble.
Allegro and SDL are C libraries though. This is no problem and they can be used in a C++ program just fine, but if you're looking for a C++ library, ClanLib would be a nice one. They just released 0.7.7 which worked fine for me both with MSVC in Windows and with gcc in Linux. I've been using Allegro up until now but my next engine will probably use ClanLib to be able to use OpenGL and ClanLibs resources, network, sound, gui, input, etc. stuff.
For general data handling you will probably want to look into the Standard Template Library (STL).
References:
|
|
Back to top |
|
|
Barok Stephen Hawking
Joined: 26 Nov 2002 Posts: 248 Location: Bushland of Canada
|
Posted: Tue Jan 13, 2004 2:19 pm Post subject: |
[quote] |
|
Thanks alot Bjorn! _________________ Adosorken: I always liked slutty 10th graders...
Rhiannon: *Slap!*
|
|
Back to top |
|
|
Adam Mage
Joined: 30 Dec 2002 Posts: 416 Location: Australia
|
Posted: Tue Jan 13, 2004 5:29 pm Post subject: |
[quote] |
|
You should have linked ot the wiki, then someone might have visited it :D _________________ https://numbatlogic.com
|
|
Back to top |
|
|
ThousandKnives Wandering Minstrel
Joined: 17 May 2003 Posts: 147 Location: Boston
|
Posted: Tue Jan 13, 2004 6:19 pm Post subject: |
[quote] |
|
Direct X SDK Download
"More difficult" than Allegra and whatnot (I wouldn't know as it's all I've even used and I find it pretty easy), but also more feature-rich
MSDN Help
Type in any function or variable in DirectX, GDI, or any other Microsoft library and get a thorough rundown of all the attributes.
|
|
Back to top |
|
|
DrunkenCoder Demon Hunter
Joined: 29 May 2002 Posts: 559
|
Posted: Tue Jan 13, 2004 10:13 pm Post subject: |
[quote] |
|
I would strongly advice not going near the DX SDK untill you got a firm grasp of the language basic and feel ready to dive in with the big boys. Also SDL is a splendid alternative and will offer mostly everything you want for graphics.
Allegro on the other hand is a bit more feature rich providing good services for mostly everything you need to build a complete game. _________________ If there's life after death there is no death, if there's no death we never live. | ENTP
|
|
Back to top |
|
|
Sirocco Mage
Joined: 01 Jun 2002 Posts: 345
|
Posted: Tue Jan 13, 2004 10:15 pm Post subject: |
[quote] |
|
Quote: |
Thanks alot Bjørn!
|
It's also worthy of note that all of Bjørn's suggestions are portable, where as good 'ol Direct-X is not :( It's of no consequence when you're at the learning stage, but as far as actual game production it's a pressing issue these days.
.
|
|
Back to top |
|
|
ThousandKnives Wandering Minstrel
Joined: 17 May 2003 Posts: 147 Location: Boston
|
Posted: Tue Jan 13, 2004 10:52 pm Post subject: |
[quote] |
|
Quote: | I would strongly advice not going near the DX SDK untill you got a firm grasp of the language basic and feel ready to dive in with the big boys. Also SDL is a splendid alternative and will offer mostly everything you want for graphics. |
Well, I guess, but the question was which libraries do we recommend, and that is the library I recommend. And if I could handle diving into it with a sum total of 6 months of programming experience with C, I have trouble believing that somebody with several year of QB experience can't. I know QB is pretty rudamentary, but I cant believe it is so simple that basic programming principles are lost on those who use it.
Quote: | It's also worthy of note that all of Bjørn's suggestions are portable |
Alegro is portable? I could swear one out of every two allegro games ever made crashes my computer in a heartbeat. Clearly its not portable to MY computer.
It has been my observation that portablity for most game developers entails object-orienting the engine so that different modules can be installed to build different OS versions, and not to make a single, 100% portable engine. Because even though those other libraries may be "portable"- many of the methods in them are not as reliably portable from OS to OS and system to system as the ideal would have you believe.
|
|
Back to top |
|
|
Sirocco Mage
Joined: 01 Jun 2002 Posts: 345
|
Posted: Wed Jan 14, 2004 12:17 am Post subject: |
[quote] |
|
Quote: |
Alegro is portable? I could swear one out of every two allegro games ever made crashes my computer in a heartbeat. Clearly its not portable to MY computer.
|
That's an issue with your system config, and possibly the design of the programs themselves -- it's irrelevant to the issue of portability :)
Quote: |
It has been my observation that portablity for most game developers entails object-orienting the engine so that different modules can be installed to build different OS versions, and not to make a single, 100% portable engine.
|
That was necessary in the past, but no longer... aside from one or two very picky things like file searching (find_first(), etc). Other than that, you can let your lib of choice handle everything else. I wouldn't have believed it had I not given in a whirl with several of my older projects, and of course, having perfectly working DOS and Win32 ports of Frenetic and Frenetic Plus with only a single line change in the code ^.^
Quote: |
Because even though those other libraries may be "portable"- many of the methods in them are not as reliably portable from OS to OS and system to system as the ideal would have you believe.
|
As long as you stay away from things like conio.h functions, you can easily achieve portable games. I don't know what difficulties you've had, but aside from somewhat touchy Linux support, going from DOS -> Win32 -> Mac is effortless using Allegro. Obviously the ASM just has to go, and DOS-specific INT calls need to get nixed, but otherwise standard C/C++ calls convert just fine, and you should be letting the lib handle everything else.
note: Some edits present
.
|
|
Back to top |
|
|
ThousandKnives Wandering Minstrel
Joined: 17 May 2003 Posts: 147 Location: Boston
|
Posted: Wed Jan 14, 2004 2:37 am Post subject: |
[quote] |
|
Quote: | That's an issue with your system config, and possibly the design of the programs themselves -- it's irrelevant to the issue of portability :)
|
The program designs I will grant you - amateur game designers are somewhat notorious to that end.
However, to claim that "it WOULD be portable if everyone just had their systems configured correctly" is utter nonsense.
Cross-operating system portability may be nice for developers- but to an end user (and thus also to the developer who is catering to his end user), THE most important part of portability is to detect the system configuration and make the appropriate changes in procedure so that there ARE no "issues" with anyone's system configuration. That is absolutely the most important test of portability for a graphics/sound/control library. If you are going to discard detecting system settings and making the proper adjustments as a measuring stick, then how exactly DO you plan on judging portability?
"Gee! It runs on Linux AND MacOS AND Windows!!! ...but it won't run on anything unless your system is configured 'properly'... "
To that end, I conclude: I have never had a a DirectX game crash my computer. Allegro games do so with great abundancy. Therefore from my experience I consider DirectX to be far more portable.
|
|
Back to top |
|
|
Happy JonA's American snack pack
Joined: 03 Aug 2002 Posts: 200
|
Posted: Wed Jan 14, 2004 8:22 am Post subject: |
[quote] |
|
ThousandKnives wrote: | Therefore from my experience I consider DirectX to be far more portable. |
Yeah me too, DirectX programs run perfectly on my Linux computer.
|
|
Back to top |
|
|
Adam Mage
Joined: 30 Dec 2002 Posts: 416 Location: Australia
|
Posted: Wed Jan 14, 2004 11:06 am Post subject: |
[quote] |
|
I think he means portable between windows machines. But one could also say that they have to be set up properly as well to run direct x. _________________ https://numbatlogic.com
|
|
Back to top |
|
|
Sirocco Mage
Joined: 01 Jun 2002 Posts: 345
|
Posted: Wed Jan 14, 2004 12:55 pm Post subject: |
[quote] |
|
Quote: |
To that end, I conclude: I have never had a a DirectX game crash my computer. Allegro games do so with great abundancy. Therefore from my experience I consider DirectX to be far more portable.
|
Apparently you're lucky with DirectX; I've had tons of games crash repeatedly; some would never even launch! Mostly these were due to inconsistencies in driver design and feature support. There's no way to make a game that is 100% stable across every PC configuration, unless the technology involved is *extremely* rudimentary.
When a programmer uses the word portable in reference to a lib, it should be taken to mean cross-platform, not cross-machine ;) DirectX may be somewhat more portable as far as PC machines running Windows go (meaning cross-machine), but it cannot touch any of the aforementioned libs in terms of cross-platform support, which was my entire point. Sorry if there was any misunderstanding over this issue.
Quote: |
However, to claim that "it WOULD be portable if everyone just had their systems configured correctly" is utter nonsense.
|
If you have a system resource conflict based on a driver (which it sounds like you do, and which will likely not be noticed by Windows), things potentially stop working when services are requested. No lib can compensate for that -- not Allegro, not DirectX. Again, your problem with Allegro apps is an issue of machine migration, not cross-platform support.
.
|
|
Back to top |
|
|
valderman Mage
Joined: 29 Aug 2002 Posts: 334 Location: Gothenburg, Sweden
|
Posted: Wed Jan 14, 2004 2:59 pm Post subject: |
[quote] |
|
OpenGL, anyone? Carmack uses it, so it has to be good! >_<
Jokes aside, I've been tinkering with OpenGL on and off for about a year or so, and the only real downside to it is that you have to use OS specific functions to set the video mode, unless you're using GLUT or SDL, which can do it for you.
+ OpenGL is cross-platform, which DirectX is not.
+ OpenGL is quite easy.
+ OpenGL is industry standard for everything EXCEPT Windows games.
+ OpenGL is faster than using wrapper libs like SDL and Allegro (textured quads sooo own blitting).
+ OpenGL 2.0 is not far away.
- OpenGL doesn't get updated as often as DirectX.
- Many features depend on the hardware, where DirectX can emulate features (although at a speed which makes it useless) when missing. _________________ http://www.weeaboo.se
|
|
Back to top |
|
|
DrunkenCoder Demon Hunter
Joined: 29 May 2002 Posts: 559
|
Posted: Wed Jan 14, 2004 3:03 pm Post subject: |
[quote] |
|
Valderman wrote: |
- OpenGL doesn't get updated as often as DirectX.
|
Vendor extensions anyone... _________________ If there's life after death there is no death, if there's no death we never live. | ENTP
|
|
Back to top |
|
|