allegro vs. directx vs. opengl
lucaz

Hello, I was using allegro durning a year, and Ive found allegro really good, but some things (like text output) are horrible.
Sure, I can use lib, but that is why Im asking this:
Why use allegro instead of opengl/directx?
Why use directx instead of allegro/opengl?
Why use opengl instead of allegro/directx?

DanielH

whoever said there aren't dumb question? ;)

Allegro uses DirectX under Windows
OpenGL only handles graphics
Allegro and OpenGL are good together. You can use Allegro for input and OpenGL for output.

Have you tried programming directx? what a nightmare.

Billybob

Well, allegro isn't a 3D library, and OpenGL is ONLY a 3D library, so you can't compare any of those above options.
Now, OpenGL vs Direct3D, there's something you can compare, and it all comes down to taste.

CGamesPlay

Text output horrible? NEVER! Use the Allegro gui for a quick console, else use my en_render function... Either way, it's not so bad :) What's the equivalent in OpenGL/DirectX?

Quote:

Now, OpenGL vs Direct3D, there's something you can compare, and it all comes down to taste.

Taste? What to portability?

23yrold3yrold
Quote:

What's the equivalent in OpenGL/DirectX?

Compare the NeHe tuts on OpenGL text output to Allegro, which can't even load a font from file. ;)

Billybob
Quote:

Taste? What to portability?

That too, but 3D is still funky on Linux, and nobody makes games for Mac ;)

Ok, ok.
Taste and platform.

ReyBrujo

Maybe I am wrong, but Allegro is an amateur library which provides support for making full games, giving video, sound, keyboard, joystick and file primitives.

OpenGL gives only 3D graphics support, and it is a standard set of instructions. Video card companies implement the OpenGL set in their chipsets. You are given basically a lot of math functions.

Direct3D is a Microsoft product.

I would say first a function is created for the OpenGL standard, then implemented in the chipset, and finally supported in Direct3D.

Gnatinator

I personally reccomend staying away from anything non-portable. I for one am not going to fall into that trap again. :P

Quote:

...and nobody makes games for Mac...

Hey! ;)

OP:
When it comes right down to it, its your own skill that really defines how good your end product will look and play at the end of the day. If you need something that isnt supported well in the base lib, find an add-on library or just code it yourself.

Of course if you just want to try something new, I reccomend you go check out SDL or ClanLib.

nonnus29

Well, reading this for the 5,000th time in what, two years? Okay, maybe its time to move on. I'm getting tired of hanging out in gamedev forums.....

lucaz

so opengl isnt useful for 2d games, ok.

programming in directx may be harder, but at least it have a good GUI, and text output.

23yrold3yrold

OpenGL has its uses for 2D. Try blitting a lit rotated scaled sprite in Allegro. ;)

lucaz

23: yes, Ive used rotate and scaled, whats the problem with them in allegro?.
AGAIN: Why allegro text output su!@#!!???

Billybob

If you don't like like Allegro's text functions, make your own and submit them to the developers.

Anyway, I'll take this time to talk about Irrlicht:
If you want portability, then use Irrlicht. It supports Direct3D(X) 8, Direct3D(X) 9c, OpenGL, and software.
You don't even have to do any extra work beyond a way for the user to select which mode they want.

That's one reason why I like Irrlicht. I can just crank out a few lines of code to load objects and a camera and it just instantly works everywhere. Plus everything is so nicely wrapped up. Clear conceptions of materials, scene nodes, etc.

Ok, I'm done.

23yrold3yrold
Quote:

23: yes, Ive used rotate and scaled, whats the problem with them in allegro?

No no; blit the sprite rotated, lit, and scaled at the same time. With translucency and alpha channel too. ;) Piece of cake in OpenGL; real clumsy and slow in Allegro. Clunk, clunk, clunk ... plus OpenGL is hardware accelerated. Allegro, in many but not all cases.

So yes, OpenGL has 2D uses.

Gnatinator
Quote:

so opengl isnt useful for 2d games, ok.

Wrong.
My current project is a 2D opengl game.

If you want better text capability with allegro, use alfont or one of those other easy-to-use alternatives.

lucaz

whats about java?, I know it isnt an api, but it has huge lib.
It isnt a good option?

Gnatinator

If you wish to use Java, I suggest you check out Puppy Games. They developed Alien Flux in Java and have also released a pretty nice OpenGL based Java game api.

CGamesPlay

You know, you haven't given any actual reasons why "Allegro text output su!@#!!".

Gnatinator

I think it sucks. It does the job, but its still ugly as hell. :(

The lack of proper loading support for ttf (semi-nice looking) fonts in allegrogl has lead me and James Lohr to write other font loading/managment systems. Mine is for TGA fonts (but only supports square characters, meh it does what I need it to do), James' package is for supporting colored allegro fonts.

Edit2:
If your interested, I just uploaded the newest version of my font mini-lib.

spellcaster

Well, nobody is forcing you to use it beyond anything but debug output, if you don't like it :)

Gnatinator

I know, and im not. :)

lucaz

Im interesed in libs to load png, ttf and mp3, but I want easy libs, like allegro, who comes with good documentation, examples, and is easy to use and install.

Gnatinator
Quote:

Im interesed in libs to load png, ttf and mp3, but I want easy libs, like allegro, who comes with good documentation, examples, and is easy to use and install.

Same here buddy :P

Your best bet is to take advantage of allegro's many add-on libs. Check out the library section of this site.

A good alternative to PNG is TGA, its pretty much the same except PNG has slightly better compression. TGA is supported in the allegro base. I am currently using TGA as an alternative to PNG in my current game; it looks just as good.

Mp3 has some licencing issues. I reccomend Ogg. Convert your Mp3s with Audacity or something similar. For ogg libs check out my other thread here.

For ttf use AllegroFont.

Edit:
If your really set on PNG, check out LoadPNG by Peter Wang

lucaz

thanks for your links.
LoadPNG sounds funny, I need to install zlib and libpng too!, :S
(is there any lib to convert png into tga/bmp?).
.ogg is ok.
Allegrofont works ok?, Ive tried some libs and they doesnt work fine.

Billybob
Quote:

Im interesed in libs to load png, ttf and mp3, but I want easy libs, like allegro, who comes with good documentation, examples, and is easy to use and install.

Programming is never easy. Easy and good libraries are few and far inbetween, and you as a programmer just have to learn to live with it. Don't be lazy and whine about libraries being too hard to use; instead just "Hulk out" and tear them apart. I mean, look at 23's avatar, he's just ready to rip apart library documention and code.
If you feel all the other libraries are junk, how about you write your own? :)
Or you can add-on to existing libraries, build beter interfaces, improve the download packages, etc.

spellcaster
Quote:

LoadPNG sounds funny, I need to install zlib and libpng too!, :S

Um.. of course.
loadPNG allows you to load PNGs, the actual decoding is done by libpng which uses zlib. What's so funny about that?

Thread #426473. Printed from Allegro.cc