the best choice...
Ok, here it goes...
I need some tips on which libraries to use in order to implement my new game idea I have in mind. I don't want to reinvent the wheel, so I want to cover as much as can be done, so I can focus on the game.
The game's targeted platforms are Windows and Linux. It will be using 2D graphics, but I need to draw textured triangles. I don't know if any 2D gfx lib has that feature, so I may have to use 3D graphics. OpenGL?
I will use FMod for sound/music and Raknet for networking.
These are the other sections I need covered:
Graphics - ?
Input - ?
Timer handling - ?
Truetype fonts - ?
File compression (zip, etc) - ?
File handling (cfg, txt, binary) - ?
Any ideas?
EDIT: Changed the project specs a bit.
[Edited by - daeron on August 17, 2004 11:01:42 AM]
Well here's a couple of things you could use.
SDL:
You can use this for Input, Networking (with SDL_Net) and also for setting up an OpenGL window without needing any platform specific code. It does include timer stuff so you may be able to use it for timing as well.
FreeType:
This is a library for rendering truetype fonts and it's pretty easy to use (IMO) though you may find the documentation lacking.
For file handling what exactly do you want to do? The standard libraries of many languages include file IO routines, so anything you write using them will be cross-platform. If you want something more high-level you'll need to be more specific about your requirements.
Oh and if your aim is to make a game why not use a prexisting engine rather than creating your own? This means you can concentrate on the game rather than the technology.
SDL:
You can use this for Input, Networking (with SDL_Net) and also for setting up an OpenGL window without needing any platform specific code. It does include timer stuff so you may be able to use it for timing as well.
FreeType:
This is a library for rendering truetype fonts and it's pretty easy to use (IMO) though you may find the documentation lacking.
For file handling what exactly do you want to do? The standard libraries of many languages include file IO routines, so anything you write using them will be cross-platform. If you want something more high-level you'll need to be more specific about your requirements.
Oh and if your aim is to make a game why not use a prexisting engine rather than creating your own? This means you can concentrate on the game rather than the technology.
Allegro is popular with beginner programmers. I haven't used it myself, but I've seen it recommended by several people and is discussed in books.
SDL is a good choice as it can handle a lot of the stuff you're looking at (Network (SDL_Net), Timers, Input).
If you're wanting to make a GUI in OpenGL, you can use HellRizzer's GUI tutorial to make your own, or just download and implement the code in your own way. It's not complete, but it's getting there.
There's also TinyXml, which could be used for handling Xml as your content/config files.
As for Zip handling, look for zlib or the numerous wrappers available (for example, STL-like wrapper on CodeProject.
EDIT:
Being that you've changed the specs, look at OGRE, or Irrlicht for 3d rendering. SDL will let you use OpenGL calls too, so you can still use OGL with SDL. I'm not sure about Allegro, but the library itself has extensive graphics routines, but AFAIK there's mainly 2D.
SDL is a good choice as it can handle a lot of the stuff you're looking at (Network (SDL_Net), Timers, Input).
If you're wanting to make a GUI in OpenGL, you can use HellRizzer's GUI tutorial to make your own, or just download and implement the code in your own way. It's not complete, but it's getting there.
There's also TinyXml, which could be used for handling Xml as your content/config files.
As for Zip handling, look for zlib or the numerous wrappers available (for example, STL-like wrapper on CodeProject.
EDIT:
Being that you've changed the specs, look at OGRE, or Irrlicht for 3d rendering. SDL will let you use OpenGL calls too, so you can still use OGL with SDL. I'm not sure about Allegro, but the library itself has extensive graphics routines, but AFAIK there's mainly 2D.
Quote:
For file handling what exactly do you want to do? The standard libraries of many languages include file IO routines, so anything you write using them will be cross-platform. If you want something more high-level you'll need to be more specific about your requirements.
I need config files (.cfg .ini) so I can save user settings about the game.
I need binary files so I can save/load created maps.
(Something about endianess makes this non-platform in some cases? Which libraries are known to be cross-platform about this?)
Quote:
Oh and if your aim is to make a game why not use a prexisting engine rather than creating your own? This means you can concentrate on the game rather than the technology.
What engines are available then? Sometimes engines are too specific when comparing to the requirements I have. And some parts of the engine I won't simply use at all, I want to strip it bare to the bones. But if you have some that are good and free then I might reconsider.
Is SDL capable of drawing textured triangles or do I have to use a 3D graphics API/lib?
Quote:Original post by daeron
Is SDL capable of drawing textured triangles or do I have to use a 3D graphics API/lib?
You can use OpenGL calls from within SDL, so you're not limited in any way as to what you can render.
Now it's getting interesting =)
What I have decided:
Graphics - OpenGL
Sound/Music - FMod
Input - SDL
Network - Raknet
Timers - SDL
Truetype fonts - FreeType
Undecided:
File compression - ZLib?
What I essentially need is a way to store my .bmp, .wav and .tga files in one big file (similar to allegro's .dat, and other formats like .pak) so the user doesn't have access to them. Is this possible with the .zip format and ZLib??
File handling -
Ok, instead of config files, xml files looks like a good choice. So, TinyXml it is then.
But what about binary files? Simply using fstream makes it non-cross-platform I've heard, because of the endianess (don't know what it is though heh)
What I have decided:
Graphics - OpenGL
Sound/Music - FMod
Input - SDL
Network - Raknet
Timers - SDL
Truetype fonts - FreeType
Undecided:
File compression - ZLib?
What I essentially need is a way to store my .bmp, .wav and .tga files in one big file (similar to allegro's .dat, and other formats like .pak) so the user doesn't have access to them. Is this possible with the .zip format and ZLib??
File handling -
Ok, instead of config files, xml files looks like a good choice. So, TinyXml it is then.
But what about binary files? Simply using fstream makes it non-cross-platform I've heard, because of the endianess (don't know what it is though heh)
If you want to use data files, check you zziplib, it allows you to use files in zip archives as is they were regular files. There's also physfs with creates a Quake-style system where you can place your data is several files and you can access it all as if they were in one directory.
I have also written a library myself that uses a custom file format with built-in (weak) encryption and LZMA compression. I'm still testing it, but it should be capable of general usage.
I have also written a library myself that uses a custom file format with built-in (weak) encryption and LZMA compression. I'm still testing it, but it should be capable of general usage.
Quote:Original post by 23yrold3yrold
Allegro can do 3D textured triangles just fine, btw.
Software or hardware?
Hardware via OpenGL, software on its own. The OP doesn't sound like he needs a lot of power, so Allegro's 3D may be enough. I've seen some pretty impressive stuff done with it (nothing like what can be done with OpenGL though, of course [smile]).
But sounds like he's made up his mind anyway ...
But sounds like he's made up his mind anyway ...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement