Welcome, Guest. Please login or register.
May 22, 2012, 07:29:33 PM

Login with username, password and session length
Search:     Advanced search
If you see anyone spamming please PM me or email reportspambot@game.geek.nz to let me know - chiQ
109672 Posts in 6137 Topics by 2510 Members
Latest Member: vivahazelbaker
* Home Help Search Calendar Login Register
+  ROME.RO GameTalk
|-+  Gaming
| |-+  Game Development/Asset Production (Moderators: Bad Sector, daemonwolf)
| | |-+  Allegro, a very popular game development library
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 Go Down Print
Author Topic: Allegro, a very popular game development library  (Read 3482 times)
Josh1billion
Romero's Disciple
*****
Offline Offline

Posts: 3201


WWW
« on: November 23, 2005, 01:04:46 PM »

I'm just checking out Allegro now, and it seems pretty cool..

I'm sure most, if not all, here who write games have heard of it at one time or another.  I originally heard about it years ago.

You can pick it up at www.allegro.cc .

It is used in C/C++, so if you don't know the language, stay away of course.

The code is fairly simple.. here's an example, the Hello World example:

Code: [Select]
#include <allegro.h>



int main(void)
{
   /* you should always do this at the start of Allegro programs */
   if (allegro_init() != 0)
      return 1;

   /* set up the keyboard handler */
   install_keyboard();

   /* set a graphics mode sized 320x200 */
   if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) != 0) {
      if (set_gfx_mode(GFX_SAFE, 320, 200, 0, 0) != 0) {
set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
allegro_message("Unable to set any graphic mode\n%s\n", allegro_error);
return 1;
      }
   }

   /* set the color palette */
   set_palette(desktop_palette);

   /* clear the screen to white */
   clear_to_color(screen, makecol(255, 255, 255));

   /* you don't need to do this, but on some platforms (eg. Windows) things
    * will be drawn more quickly if you always acquire the screen before
    * trying to draw onto it.
    */
   acquire_screen();

   /* write some text to the screen with black letters and transparent background */
   textout_centre_ex(screen, font, "Hello, world!", SCREEN_W/2, SCREEN_H/2, makecol(0,0,0), -1);

   /* you must always release bitmaps before calling any input functions */
   release_screen();

   /* wait for a keypress */
   readkey();

   return 0;
}

END_OF_MAIN()
Logged

Game programmer and designer.
Bad Sector
Big Fat Code Bastard
Moderator
Post Monkey
*****
Offline Offline

Posts: 1495


Braaaiins!

WWW
« Reply #1 on: November 23, 2005, 03:33:53 PM »

It's actually more than a game library. At around 2000-2001 i wrote a multitasking 32bit GUI in DJGPP/DOS that used Allegro for graphics (the SF page made a lot later... and then the project died).
Logged

CRC failed
Josh1billion
Romero's Disciple
*****
Offline Offline

Posts: 3201


WWW
« Reply #2 on: November 23, 2005, 08:45:03 PM »

Well, it's self-proclaimed as a game development library (as is CDX), but you're right in the fact that you can create more than just games using its graphics calls.

Right now, I'm trying to write a small platform game/demo in it.
Logged

Game programmer and designer.
azrivera
Bigger Baby
*
Offline Offline

Posts: 14

« Reply #3 on: November 23, 2005, 10:25:51 PM »

Kinda been experimenting with allegro, really enjoy using it.
Logged
Rizimar
Global Moderator
Romero's Best Friend
*****
Offline Offline

Posts: 5847


WWW
« Reply #4 on: November 23, 2005, 10:28:57 PM »

Haven't tried it. I'd either look into DirectX, OpenGL, or just use my own graphical functions for Turbo C++ 3.0 :P
Logged

azrivera
Bigger Baby
*
Offline Offline

Posts: 14

« Reply #5 on: November 24, 2005, 12:48:48 AM »

I have a book called 'Game Programming All In One' by Jonathan Harbour, He uses Allegro with the C language through the whole book, really awesome.  It's real interesting because he also covers game development in general.  No matter what you specialize in, level design, game artist, animator, modeler, it's good to have a general understanding of programming games, thought I'd share that.  If you get a chance take a glimpse, you'll find some really cool stuff in it.
Logged
azrivera
Bigger Baby
*
Offline Offline

Posts: 14

« Reply #6 on: November 24, 2005, 01:15:33 AM »

oh, also intro to AI.
Logged
AssKoala
Hardcore Forum Freak
*****
Offline Offline

Posts: 1720


Anti-Zealot @ EA Games

WWW
« Reply #7 on: November 24, 2005, 09:06:03 PM »

If you intend on getting a job and you tell them you work with Allegro and not Direct3D or OpenGL...

Well, let's just say its good for starting, but it IS NOT a replacement for real libraries like DirectX and OpenGL.

If you like Allegro, you should also check out ClanLib.  They are both Game development SDK's.  Both are good if your intention is just building a game not actually aiming at going into heavy programming.

Keep in mind, companies don't hire designers right away (for both technical reasons and reasons due to experience).  You gotta work somewhere else first (programming, art, etc) so you'll need to be good at something.  Can't just say "I wanna be a game designer when I grow up" and expect it to happen without having real knowledge about some other area(s).
Logged

If you always think like an expert, you'll always be a beginner. | "A handful of knowledgeable people is more effective than an army of fools" -Writing Secure Code, 2nd Ed.
darksun4
Morphing Into Something
*
Offline Offline

Posts: 51


WWW
« Reply #8 on: December 02, 2005, 12:46:27 PM »

Allegro just rocks!!!
It's very optimized and I think is easier than SDL.
I've used it when started to create a different (read new) WindowManager on framebuffer (X sucks).
DirectFB is also nice (eventhough many (game)projects use allegro).

The problem is that you cannot call allegro from python, so if you want to experiment or just test things you have to use c or switch to SDL.
Logged

It started as a whisper
now try to dodge this roar,
unified is the more forceful way to go!
AssKoala
Hardcore Forum Freak
*****
Offline Offline

Posts: 1720


Anti-Zealot @ EA Games

WWW
« Reply #9 on: December 02, 2005, 02:05:00 PM »

Allergro is easier than SDL but SDL is like DirectX.

SDL is not a game dev SDK or API.
Logged

If you always think like an expert, you'll always be a beginner. | "A handful of knowledgeable people is more effective than an army of fools" -Writing Secure Code, 2nd Ed.
darksun4
Morphing Into Something
*
Offline Offline

Posts: 51


WWW
« Reply #10 on: December 02, 2005, 02:21:26 PM »

SDL is being used as a game lib alot (in Linux Universe) due to the fact that has Sound Support (and some OpenGL support via X) and many other useful API.
It's the same with allegro being used for other things beside game development.
The best (read fun) thing is Allegro's SpeedHack.
I don't think someone could SpeedHack with SDL (without using pygame). At least being faster in dev than Allegro.
Logged

It started as a whisper
now try to dodge this roar,
unified is the more forceful way to go!
Josh1billion
Romero's Disciple
*****
Offline Offline

Posts: 3201


WWW
« Reply #11 on: December 02, 2005, 02:34:11 PM »

Quote from: AssKoala
If you intend on getting a job and you tell them you work with Allegro and not Direct3D or OpenGL...

Well, let's just say its good for starting, but it IS NOT a replacement for real libraries like DirectX and OpenGL.

Of course not.
Logged

Game programmer and designer.
AssKoala
Hardcore Forum Freak
*****
Offline Offline

Posts: 1720


Anti-Zealot @ EA Games

WWW
« Reply #12 on: December 02, 2005, 03:09:43 PM »

Quote from: darksun4
SDL is being used as a game lib alot (in Linux Universe) due to the fact that has Sound Support (and some OpenGL support via X) and many other useful API.
It's the same with allegro being used for other things beside game development.
The best (read fun) thing is Allegro's SpeedHack.
I don't think someone could SpeedHack with SDL (without using pygame). At least being faster in dev than Allegro.


SDL is used as a game library a lot, as is DirectX.

It is NOT however a game library.  It'd be like saying that Win32 is a game library because people use it to write games.

Allegro is very specific, it is an SDK, it isn't a framework.
Logged

If you always think like an expert, you'll always be a beginner. | "A handful of knowledgeable people is more effective than an army of fools" -Writing Secure Code, 2nd Ed.
darksun4
Morphing Into Something
*
Offline Offline

Posts: 51


WWW
« Reply #13 on: December 04, 2005, 05:58:57 PM »

I wouldn't compare Win32 with SDL.
I just said that a huge amount of games in Linux are based on SDL, so someone can easily use it for game dev (see pygame) and of course compare it with allegro ( a clean fast graphics library).  SDL can help you make a game very fast. Trying to do the same in Win32 is suicidal (even in DirectX could take a lot of time).

Bottom Line : Allegro Rocks :)
Logged

It started as a whisper
now try to dodge this roar,
unified is the more forceful way to go!
AssKoala
Hardcore Forum Freak
*****
Offline Offline

Posts: 1720


Anti-Zealot @ EA Games

WWW
« Reply #14 on: December 04, 2005, 11:50:43 PM »

Quote from: darksun4
I wouldn't compare Win32 with SDL.
I just said that a huge amount of games in Linux are based on SDL, so someone can easily use it for game dev (see pygame) and of course compare it with allegro ( a clean fast graphics library).  SDL can help you make a game very fast. Trying to do the same in Win32 is suicidal (even in DirectX could take a lot of time).

Bottom Line : Allegro Rocks :)


You really don't get what I mean.

SDL is not a "game specific" library, neither is DirectX, neither is Win32.

Allegro is.  Allegro is just a library that runs on top of DirectX/OpenGL/SDL/Win32/whatever.  It is one level higher up (and therefore far more limiting) than the libraries its based on.

You cannot compare SDL to Allegro.  You can compare SDL to DirectX.

The only comparison you can make for Allegro vs. SDL/DX is in rapid prototyping.  That's the only place Allegro might beat SDL/DirectX.  If you're comparing technical merits, there's nothing Allegro can compare to with DirectX/SDL/whatever seeing as its built on top of the underlying libraries.  In other words, there's nothing Allegro can do that OpenGL, DirectX, Win32/X/whatever, and their combination can't do but the reverse isn't true.

Let me say it again, Allegro/ClanLib/whatever is limited by the limitations of DirectX/SDL/OpenGL/whatever library it is based on.  The fact that its specific also limits what it can do alone.

Allegro is not a substitute for learning a real API such as DirectX.

Allegro is a great library.  However, you have to know what tool is best for the job.
Logged

If you always think like an expert, you'll always be a beginner. | "A handful of knowledgeable people is more effective than an army of fools" -Writing Secure Code, 2nd Ed.
Pages: [1] 2 Go Up Print 
« previous next »
 

Powered by MySQL Powered by PHP Powered by SMF 2.0 Beta 4 | SMF © 2006–2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!