allegro_init(); Vs. al_init(); WTHeck with Allegro syntax! HELP ME!
AxDSan

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

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

Check the manual for details.

Matthew Leverton

Allegro 5 is completely different from Allegro 4.

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

AxDSan

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

You can look at the Allegro 5 tutorials on the wiki for more information.

AxDSan

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

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

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

Why don't you learn how to program first.

Audric

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

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

Thread #608894. Printed from Allegro.cc