Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Allegro Vivace

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Allegro Vivace
Arvidsson
Member #4,603
May 2004

Back in 2008 I was editing quite a bit on the allegro wiki, mostly trying to convert the Pixelate articles. Sadly, all my work was erased due to an out-of-date backup but this is not the reason why I'm posting here.

While I was editing, I thought it to be a good idea to try to wikify the Allegro Vivace tutorial written by George Foot and update it to use the latest version of Allegro (I think Allegro 5 was on the horizon but not quite usable/stable?). So, I contacted George and he thought it to be an excellent idea. His tutorial is not yet completed though, and probably never will be.

Somehow I got thinking about it today, so now I have created an article on the wiki. It's just an introduction right now, but I have started writing the next part.

The aim is to start with general game programming concepts, such as the game loop, and then delve deeper into how you actually do this using Allegro 5. Down the road, other important things should be discussed such as an explanation of double buffering, how to animate stuff, and other concepts beginner's often have trouble with when starting out trying to make games.

The tutorial assumes basic knowledge of C/C++ and that the reader has a working installation of Allegro. I think the articles already up on the wiki explain the latter well enough.

I'm not aiming to have a complete game by the end of the tutorials, but rather the focus should be on really trying to explain in an understandable way the above mentioned game programming concepts.

I imagine the list below are things the tutorial in the end should cover:

  • the basic game structure

  • the game loop

  • double buffering

  • the allegro event system and user input

  • drawing bitmaps and primitives

  • making the game run at a constant speed on all computers

  • playing sounds & music

I imagine general programming advice could be squeezed in where appropriate, such as:

  • multifile projects

  • the importance of checking return values

  • a discussion on globals (we need a nuanced picture here bambam :))

So... the aim is high. Basically, the end-all, be-all tutorial for Allegro 5 beginners. But with the cooperation of this community we shall succeed! Who's with me? :)

Specter Phoenix
Member #1,425
July 2001
avatar

Write your own tutorials and forget Vivace as it is outdated and he never finished it.

"You may think I care about what you think of me..and you'd be wrong. I'm not on this planet to please you. I'm here to take care of my family. Outside of that, you might as well be pissing in the wind. You'll get a better return from that than you will from me."
"Through vengence I was born. Through war I was trained. Through love I was found. Through death I was released. Through release I was given a purpose." -- Specter Phoenix

Dizzy Egg
Member #10,824
March 2009
avatar

...read's 'Allegro Vivace'...

sniff meeeeemmmooorriiieeess, like the corners, of my miiiind.....

:'(

----------------------------------------------------

www.facebook.com/dontrobthemachina

Specter Phoenix
Member #1,425
July 2001
avatar

I should elaborate on what I said. Vivace is incomplete, outdated, and updating it to A5 makes parts obsolete. For example, double buffering is obsolete as A5 does that for you now.

"You may think I care about what you think of me..and you'd be wrong. I'm not on this planet to please you. I'm here to take care of my family. Outside of that, you might as well be pissing in the wind. You'll get a better return from that than you will from me."
"Through vengence I was born. Through war I was trained. Through love I was found. Through death I was released. Through release I was given a purpose." -- Specter Phoenix

Matthew Leverton
Supreme Loser
January 1999
avatar

The tutorial assumes basic knowledge of C/C++ and that the reader has a working installation of Allegro. I think the articles already up on the wiki explain the latter well enough.

They do, but nothing is good enough for the n00b.

Quote:

Basically, the end-all, be-all tutorial for Allegro 5 beginners.

Good luck. :-/

In all seriousness, as long as you are only trying to help the people who have the potential to actually create a game, then a comprehensive tutorial should be able to do just that. I'm pretty sure one is already started on the wiki.

Thomas Fjellstrom
Member #476
June 2000
avatar

I'm pretty sure one is already started on the wiki.

There is. But there's nothing wrong with having another, especially if it goes about teaching in a different way.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro SVN Snapshots] - [Allegro TODO] - [Web Hosting]
"God Bless Joe Pesci" -- George Carlin
"Goto is the buldozer of coding. Sometimes, the buldozer is just the right tool for the job. Not often, but sometimes." -- LordBob

Arvidsson
Member #4,603
May 2004

I should elaborate on what I said. Vivace is incomplete, outdated, and updating it to A5 makes parts obsolete. For example, double buffering is obsolete as A5 does that for you now.

Yes I know that. But it's still an excellent starting point as a lot of stuff is still valid. The concept of double buffering is still useful to explain to people who are for example flipping the display multiple times per frame, something that was brought up in a thread not so long ago.

This is a key point actually. Many tutorials show you to do X, but doesn't really explain X. Teach a man to fish and all that.

There is. But there's nothing wrong with having another, especially if it goes about teaching in a different way.

Exactly. The only other tutorials I found on the wiki is very Allegro 5 centric, showing in great detail how to do certain stuff, but without explaining the big picture which is what I was thinking of.

Not really necessary to bring up, but everyone is welcome to edit the tutorial of course. But I guess I'll have to do the grunt work. Please correct any mistakes I make at least :)

Mark Oates
Member #1,146
March 2001
avatar

I thought Allegro Vivace was a wrapper library.

Specter Phoenix
Member #1,425
July 2001
avatar

Yes I know that. But it's still an excellent starting point as a lot of stuff is still valid. The concept of double buffering is still useful to explain to people who are for example flipping the display multiple times per frame, something that was brought up in a thread not so long ago.

This is a key point actually. Many tutorials show you to do X, but doesn't really explain X. Teach a man to fish and all that.

No it is more like showing someone how to program without having them actually program. Covering double buffering for a library that does it for them is a waste of time and energy because they won't be doing it themselves with A5 to actually understand and see what is going on.

I thought Allegro Vivace was a wrapper library.

Nope, it was a tutorial wrote by George Foot that never got finished because he became too busy with life.

"You may think I care about what you think of me..and you'd be wrong. I'm not on this planet to please you. I'm here to take care of my family. Outside of that, you might as well be pissing in the wind. You'll get a better return from that than you will from me."
"Through vengence I was born. Through war I was trained. Through love I was found. Through death I was released. Through release I was given a purpose." -- Specter Phoenix

Thomas Fjellstrom
Member #476
June 2000
avatar

The concept of double buffering is still useful to explain to people who are for example flipping the display multiple times per frame, something that was brought up in a thread not so long ago.

Indeed. Explaining why double-buffering/page-flipping is useful, and why not to flip more than once per frame is a good idea.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro SVN Snapshots] - [Allegro TODO] - [Web Hosting]
"God Bless Joe Pesci" -- George Carlin
"Goto is the buldozer of coding. Sometimes, the buldozer is just the right tool for the job. Not often, but sometimes." -- LordBob

Specter Phoenix
Member #1,425
July 2001
avatar

Indeed. Explaining why double-buffering/page-flipping is useful, and why not to flip more than once per frame is a good idea.

Yes, but it doesn't need its own tutorial. That is something that could be covered in a paragraph or two and put at the beginning or end of the intro graphics or animation tutorial.

"You may think I care about what you think of me..and you'd be wrong. I'm not on this planet to please you. I'm here to take care of my family. Outside of that, you might as well be pissing in the wind. You'll get a better return from that than you will from me."
"Through vengence I was born. Through war I was trained. Through love I was found. Through death I was released. Through release I was given a purpose." -- Specter Phoenix

Thomas Fjellstrom
Member #476
June 2000
avatar

Yes, but it doesn't need its own tutorial.

I wasn't aware he said it'd have its own tutorial.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro SVN Snapshots] - [Allegro TODO] - [Web Hosting]
"God Bless Joe Pesci" -- George Carlin
"Goto is the buldozer of coding. Sometimes, the buldozer is just the right tool for the job. Not often, but sometimes." -- LordBob

Specter Phoenix
Member #1,425
July 2001
avatar

I wasn't aware he said it'd have its own tutorial.

I suppose he could do like Vivace and just cram it all into one huge tutorial, but he will still have to address them separately in the huge tutorial.

"You may think I care about what you think of me..and you'd be wrong. I'm not on this planet to please you. I'm here to take care of my family. Outside of that, you might as well be pissing in the wind. You'll get a better return from that than you will from me."
"Through vengence I was born. Through war I was trained. Through love I was found. Through death I was released. Through release I was given a purpose." -- Specter Phoenix

verthex
Member #11,340
September 2009
avatar

You should make a tutorial using python and another using inline assembler with C/C++ for certain parts of the code to make the graphics render more efficiency.

Specter Phoenix
Member #1,425
July 2001
avatar

verthex said:

You should make a tutorial using python and another using inline assembler with C/C++ for certain parts of the code to make the graphics render more efficiency.

Is this before or after he does the tutorial of how to shoot yourself in the foot?

"You may think I care about what you think of me..and you'd be wrong. I'm not on this planet to please you. I'm here to take care of my family. Outside of that, you might as well be pissing in the wind. You'll get a better return from that than you will from me."
"Through vengence I was born. Through war I was trained. Through love I was found. Through death I was released. Through release I was given a purpose." -- Specter Phoenix

verthex
Member #11,340
September 2009
avatar

Is this before or after he does the tutorial of how to shoot yourself in the foot?

I think the python part could be for the "before" part and after seeing the performance using it then the C code part could come after it. Assembler is optional.

Arvidsson
Member #4,603
May 2004

I suppose he could do like Vivace and just cram it all into one huge tutorial, but he will still have to address them separately in the huge tutorial.

It doesn't have to be huge really. There are a few important concepts that will help a beginner immensely if only it is explained well enough for them. Cue Matthew saying that this is a mission impossible.

verthex said:

You should make a tutorial using python and another using inline assembler with C/C++ for certain parts of the code to make the graphics render more efficiency.

This is a tutorial aimed at beginners. Efficiency and optimization is out of scope and not a fit subject for the target audience.

I have begun dissecting the example framework that will be used throughout the tutorial. I have already covered the importance of checking return values! Progress!

Aside from allegro details, the most important part of this chapter will be explaining the game loop: separation of logic and drawing, keeping a constant speed of logic updates, stuff like that.

Specter Phoenix
Member #1,425
July 2001
avatar

Cue Matthew saying that this is a mission impossible.

Nah, I think everyone here has got to the point where they just let everyone try and fail so they learn on their own it is impossible. It is said that failures and successes are the best teachers, not someone else's experiences. Think back to school, when you learned things, no matter how many times someone explained something to you, it never sunk in til you actually tried it and succeeded or continuously failed til you found the successful way of doing it.

"You may think I care about what you think of me..and you'd be wrong. I'm not on this planet to please you. I'm here to take care of my family. Outside of that, you might as well be pissing in the wind. You'll get a better return from that than you will from me."
"Through vengence I was born. Through war I was trained. Through love I was found. Through death I was released. Through release I was given a purpose." -- Specter Phoenix

Thomas Fjellstrom
Member #476
June 2000
avatar

If you build it, they will come. Like with my tutorials, I wrote a bunch of simple tutorials, then people eventually came and tweaked and improved them. Give it time :)

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro SVN Snapshots] - [Allegro TODO] - [Web Hosting]
"God Bless Joe Pesci" -- George Carlin
"Goto is the buldozer of coding. Sometimes, the buldozer is just the right tool for the job. Not often, but sometimes." -- LordBob

Arvidsson
Member #4,603
May 2004

Will do!

verthex
Member #11,340
September 2009
avatar

This is a tutorial aimed at beginners.

Wouldn't python be easier to learn?

Arvidsson
Member #4,603
May 2004

The tutorial assumes basic knowledge of C/C++ and that the reader has a working installation of Allegro.

It's an Allegro 5 tutorial. Allegro is a C library. I reckon most people are thus using C/C++ which is also a prerequisite for the tutorial. So, no I don't want to teach people python.

Specter Phoenix
Member #1,425
July 2001
avatar

verthex said:

Wouldn't python be easier to learn?

If you don't know anything, probably wouldn't be much difference at that point. If they know C/C++/C#/Java/Perl then it would be easier, though at that point it would remove the beginner part. Problem is, does A5 and Python work together? If not then again it makes the tutorial pointless with A5 and python :P.

"You may think I care about what you think of me..and you'd be wrong. I'm not on this planet to please you. I'm here to take care of my family. Outside of that, you might as well be pissing in the wind. You'll get a better return from that than you will from me."
"Through vengence I was born. Through war I was trained. Through love I was found. Through death I was released. Through release I was given a purpose." -- Specter Phoenix

verthex
Member #11,340
September 2009
avatar

If not then again it makes the tutorial pointless with A5 and python

I've heard of somebody making it work, BillyBob made a thread on it though I'm not sure if it was BS.

Specter Phoenix
Member #1,425
July 2001
avatar

verthex said:

I've heard of somebody making it work, BillyBob made a thread on it though I'm not sure if it was BS.

Well some of the best things come from BS.

"You may think I care about what you think of me..and you'd be wrong. I'm not on this planet to please you. I'm here to take care of my family. Outside of that, you might as well be pissing in the wind. You'll get a better return from that than you will from me."
"Through vengence I was born. Through war I was trained. Through love I was found. Through death I was released. Through release I was given a purpose." -- Specter Phoenix

 1   2   3 


Go to: