Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » allegro_init(); Vs. al_init(); WTHeck with Allegro syntax! HELP ME!

This thread is locked; no one can reply to it. rss feed Print
allegro_init(); Vs. al_init(); WTHeck with Allegro syntax! HELP ME!
AxDSan
Member #13,765
November 2011

So yeah, just like the title says, What the heck guys, with this syntax! I'm going crazy, because I'm starting with Allegro and I don't know what to do, first I try to follow up some tutorials in youtube, but then I realize that the tutorials in youtube or in any other source are different!, most of the things I've saw is that they are outdated as for the syntax we speak.

For example when I see some tutorials and they want to initialize allegro, they do it like very easy (i.e. allegro_init();) but when I want to initialize it I have to do it this way al_init(); because otherwise I will get few errors! What the heck guys, like I said before I'm starting and I would like some support from maybe other people that are already experienced users in gaming programming or Allegro programming talking.

I will be very grateful if someone jumps me over this problem, and give me a hand on this.

Edgar Reynaldo
Member #8,592
May 2007
avatar

allegro_init is from Allegro 4.
al_init is from Allegro 5.
They have completely different APIs.

Check the manual for details.

Matthew Leverton
Supreme Loser
January 1999
avatar

Allegro 5 is completely different from Allegro 4.

You'll have to read / watch Allegro 5 tutorials.

AxDSan
Member #13,765
November 2011

Yeah I saw that already and I mean the manual thing, but it's just a lot of functions, which I don't know if I'm supposed to know how to use them, or if simply I need to read them and apply them randomly and "experiment" with them so I can finally master the library, or something, I would just like to know, if you can "feed" me since I don't have actually any source which enables me to give me full examples/tutorials appart from that manual page, to start making something on Allegro.

Edgar Reynaldo
Member #8,592
May 2007
avatar

AxDSan
Member #13,765
November 2011

Ok thank you both for supporting me here, and I would like to ask 1 more question and I think I will end this topic here, If someone else wants to give further support I will be thankful too, but, can you help me on any tutorial on GUI Programming Introduction with Allegro? or how to write/make/draw few simple buttons on the window?

Edgar Reynaldo
Member #8,592
May 2007
avatar

So far there is only one published GUI addon for Allegro, made by jmasterx - I can't think of the url though - google for 'agui' on 'allegro.cc' and you should find it.

Edit
I gave a simple example of a Button object using C here :
http://www.allegro.cc/forums/thread/608890/938302#target

AxDSan
Member #13,765
November 2011

Ok thanks for information, but everything for me looks so advanced, that I feel depresed XD ;D, I will just stick up reading and getting ready with allegro wiki examples i will look the source codes of examples there and hope to make something on this xD

Dizzy Egg
Member #10,824
March 2009
avatar

Why don't you learn how to program first.

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

Audric
Member #907
January 2001

Start with trying to move a sprite on screen according to cursor keys.
When this works, make it stop at window edge.
When this works, add a second sprite that rebounds on screen edges.
When this works, make the second sprite also rebound when it hits the first.
etc...

AxDSan
Member #13,765
November 2011

Ohh thats a good one Audric! Thank you very much if you could keep sending more excercises, it would be great! I will try to accomplish them in the meanwhile i make them I go learning with them! NICE! thank you! XD

Go to: