Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » allegro vs. directx vs. opengl

This thread is locked; no one can reply to it. rss feed Print
 1   2 
allegro vs. directx vs. opengl
lucaz
Member #4,194
January 2004

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
Member #934
January 2001
avatar

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
Member #3,136
January 2003

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
Member #2,559
July 2002
avatar

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?

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

23yrold3yrold
Member #1,134
March 2001
avatar

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. ;)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Billybob
Member #3,136
January 2003

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
Moderator
January 2001
avatar

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.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Gnatinator
Member #2,330
May 2002
avatar

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
Member #2,606
August 2002
avatar

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
Member #4,194
January 2004

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
Member #1,134
March 2001
avatar

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

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

lucaz
Member #4,194
January 2004

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

Billybob
Member #3,136
January 2003

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
Member #1,134
March 2001
avatar

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.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Gnatinator
Member #2,330
May 2002
avatar

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
Member #4,194
January 2004

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

Gnatinator
Member #2,330
May 2002
avatar

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
Member #2,559
July 2002
avatar

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

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Gnatinator
Member #2,330
May 2002
avatar

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
Member #1,493
September 2001
avatar

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

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Gnatinator
Member #2,330
May 2002
avatar

I know, and im not. :)

lucaz
Member #4,194
January 2004

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
Member #2,330
May 2002
avatar

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
Member #4,194
January 2004

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
Member #3,136
January 2003

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.

 1   2 


Go to: