Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Allegro Simplificator

This thread is locked; no one can reply to it. rss feed Print
 1   2   3   4 
Allegro Simplificator
Richard Phipps
Member #1,632
November 2001
avatar

Allegro is very easy to create 2D games, (I even made a series of game creation articles). I think it would get your students interested in programming if they had the choice of making a game, and with Allegro that can be using as much or as little C++ as you direct.

Jennifer Perkins
Member #8,203
January 2007

Hey Tobing and Richard,

Maybe I should also have explained where these students are in their programming experience. Many of them have just completed programming 1 (which I teach) and they have NEVER programmed before (most of them) so arrays and sorts were giving them issues. In programming 1 they learn basically calling programmer created functions from main - call by value, call by reference, they are major beginner programmers. In programming 2, I introduce them to OOP, creating classes, overloading operators, dynamic arrays and the issues with passing objects containing pointers to functions, therefore the need to create copy constructors... etc. They haven't even had data structures yet, they take that after my class. I'm just trying to give them some OOP projects that aren't console apps -- MAJOR boring. I'm developing this approach because they have come to me begging to do some gaming, so I'm trying to step up and find a way to do that.

I am studying as hard and fast as I can so I can incorporate more interesting projects while learning these concepts. I wish I could teach more advanced students some game programming, but maybe at a later date the department will let me do that.

My problem is finding a way for them to create these types of projects and use Allegro at the same time. Maybe I'm getting them over their heads, but I've got to find a way. It's too important to them and I want them to enjoy programming. I hated doing banking projects when I was a student and I don't want to put off these bright kids, because I'm the first one to teach them any programming.

So maybe now that I've explained myself a little better, which I should have been better at in the beginning, you have a better idea at what I'm up against.

Richard -- do you have those articles online, or are they your private papers? I don't want to step on your toes, just thought if you published them online, I might really need to look at them.

Jennifer

tobing
Member #5,213
November 2004
avatar

I can only recommend guichan + allegro once again. It's simple, yet powerful, you get all possibilities of allegro, and you have a lot of OOP inside guichan to learn from.

Jennifer Perkins
Member #8,203
January 2007

I'm google ing that right now.

Thanks so much for your help. You guys have been very patient and understanding and I really appreciate it.

:)

Richard Phipps
Member #1,632
November 2001
avatar

My articles are here:
http://www.reflectedgames.com/create.html

8 parts and with very simple parts of C aimed at beginners.

So, no pointers, dynamic variables or dynamic data structures. Just simple structs, allegro function calls, use of defines and variables in structs.

It might not be the most efficient way, but it's easy to learn and it gets results. :)

Jennifer Perkins
Member #8,203
January 2007

You guys soooo rock!!!

tobing
Member #5,213
November 2004
avatar

Jennifer Perkins
Member #8,203
January 2007

NIRVANA!!!!! Guichan seems to be EXACTLY what I need and Richard, I'm downloading your articles as well.

I can't tell you how much this means to me, and will mean to my students. You may have made a huge difference in a lot of beginning programmers lives.

Thanks - the word doesn't do justice to your help and patience.

Jennifer

LennyLen
Member #5,313
December 2004
avatar

Quote:

No need to be ugly.

He isn't being ugly, he's being realistic. Do you honestly think you should be teaching something that it appears you don't know the workings of?

Audric
Member #907
January 2001

Personally I bow down to the initiative and dedication.

A small arcade game (pong-ish) is definitely a reachable goal, trying to do something more complicated is maybe dangerous as there are many ways to proceed, and it will be difficult to TEACH why such or such technique was chosen, if you haven't tried the alternatives yourself yet.

Jennifer Perkins
Member #8,203
January 2007

Thank you Audric for your encouragement.

Believe me we're gonna keep it simple, but anything is better than a boring console app.

I seriously doubt LennyLen shot out of the womb knowing how to program and there were probably many who answered his questions along the way and didn't berate him for asking. I just expect the same courtesy that his mentors gave him.

But, some people don't remember where they came from and luckily I'm not one of those. I constantly remember those that helped me when I was first programming, so I try to put myself in my student's shoes and understand where they are in their learning process and am sympathetic to their confusion and insecurity of their own abilities. I just want to help make it more exciting so they keep that enthusiasm going and see the fruits of their labors.

I really appreciate your kind words.

Jennifer

LennyLen
Member #5,313
December 2004
avatar

Quote:

I seriously doubt LennyLen shot out of the womb knowing how to program and there were probably many who answered his questions along the way and didn't berate him for asking. I just expect the same courtesy that his mentors gave him.

What does that have to do with what I said?

edit: Oh and don't get me wrong, I also admire your dedication and think it's great that you want to help keep things exciting for your students. I just feel that if you don't know enough about what you are teaching (and I'm not saying you don't, it just appears that way from your questions), you can undermine the faith your students have in your teaching abilities. This is NOT a good thing.

Neil Walker
Member #210
April 2000
avatar

Well, my AXL library is an Allegro wrapper/add-on in C++ complete with online documentation including samples taking you from Allegro initialisation, to animation, game timer control and ending up in a mostly complete tile mapping game as a separate tutorial. It also allows XML files to be for setting up the system and animations.

http://retrospec.sgn.net/users/nwalker/axl

It may not be the most elegant C++ or worthy of use in a class, but it does the job.

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

Johan Halmén
Member #1,550
September 2001

I've been teaching programming and I've often been in situations where I don't know how things are to be done. Either I say to my students that I return next week with this problem or I solve the problem before their eyes. I might google for something or use some online C++ references. Usually I want to show them that I'm not a const teacher, who knows everything and they have to try to be like me. By saying "I don't know the answer to your question, but this is how I would try to solve the problem" I hope to give them confidence so they might solve their next problem by themselves.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Jennifer Perkins
Member #8,203
January 2007

Sorry LennyLen, didn't mean to misinterpret your comments. I've just had a long day trying to track this stuff down, about 12 hours straight now with no breaks. I'm not going to be teaching this stuff tomorrow, so I have plenty of time to prepare, just trying to get a handle on it so I can teach it in summer or fall.

Neil, thanks for the websites, I'm going there to download AXL and check it out as well, especially since you have such good documentation. I really appreciate all the effort you've put into it.

Johan, thanks again for understanding where I'm coming from. I once googled a question in the classroom when we came across something we all had questions about. I think it's good to show students that no one knows everything, but also how to find resources, because when I worked in industry, we definately used forums and the Internet for information. And I tell my students that. I want them to know that they don't have to know all of the answers, but they should know how to find the answers for themselves.

We can always learn something new and we just need to be supportive of each other because one developer will know one subject and another developer a different subject and we need to be willing to share information. It only makes us all better programmers, and in my view better people.

Thanks all, I will continue to persevere and will eventually get "in the know", promise.

And I'm sure I'll be back here aggrivating you further, so brace up. :)

Jennifer

LennyLen
Member #5,313
December 2004
avatar

Quote:

Sorry LennyLen, didn't mean to misinterpret your comments.

Don't worry, it happens a lot. ;)

Quote:

I'm not going to be teaching this stuff tomorrow, so I have plenty of time to prepare, just trying to get a handle on it so I can teach it in summer or fall.

Then I should apologise. I must have misread one of your sentences, as I had thought you'd said this was for the class you were currently teaching.

Oh, and I agree that teachers don't need to be infallible, so long as they know enough to be able to find out what they don't know. I'm possibly a bit sour on the subject of poorly informed lecturers as I had a first year Gofer lecturer who had no idea what he was teaching. He caused so much confusion that most of the class either dropped the course (even though it was mandatory for all second year papers) or just failed. None of us were surprised when he was fired.

Quote:

I think it's good to show students that no one knows everything, but also how to find resources, because when I worked in industry, we definately used forums and the Internet for information. And I tell my students that. I want them to know that they don't have to know all of the answers, but they should know how to find the answers for themselves.

A sterling attitude.

OT: Is anyone else amused by people who manage to find forums (by googling I assume) only to ask a question that a simple google search would have answered?

HardTranceFan
Member #7,317
June 2006
avatar

Quote:

I think it's good to show students that no one knows everything, but also how to find resources ... I want them to know that they don't have to know all of the answers, but they should know how to find the answers for themselves.

And that's how it is in real life too. You don't need to know all the detailed information or the answers, only how and where to find it.

[A little Off Topic]

So why are so many tests and exams closed book? This goes directly against that philosophy.

[/A little Off Topic]

--
"Shame your mind don't shine like your possessions do" - Faithless (I want more part 1)

Jennifer Perkins
Member #8,203
January 2007

LMA0... I totally understand the open book issue. That's why on my exams, I give code and ask them what the issues are with the code. More theory and understanding concepts. To have them write code on an exam is redundant, when they've already coded the projects. I usually just want them to explain that they understand why we have the issues, such as needing a copy constructor, etc.

When I was a student however and a Professor told us it was going to be an open book, open notes exam, that's when I started to panic... L0L

Oh yeah... google does answer most questions, but it's also important for them to find the forums so they can meet great folks like you guys, in order to see how things can be done from a different perspective. I love that part of forums.

Johan Halmén
Member #1,550
September 2001

LennyLen said:

Is anyone else amused by people who manage to find forums (by googling I assume) only to ask a question that a simple google search would have answered?

Did you just throw that question here or did you google first?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Ariesnl
Member #2,902
November 2002
avatar

Quote:

OOOOPPPssss.... My video card may not run it. I've got an older Dell laptop from our department. arrrrrgggghhh again.

If you're teaching C++ the least the could do is give you a decent computer.;D

annyway If you want to use Open Layer I can put up the game engine code of my last project, wich is easy to use as skelleton code.

Right now I don't have it handy ( I'm at my work now) But I can put it up tonight.

Quote:

LMA0... I totally understand the open book issue. That's why on my exams, I give code and ask them what the issues are with the code. More theory and understanding concepts. To have them write code on an exam is redundant, when they've already coded the projects. I usually just want them to explain that they understand why we have the issues, such as needing a copy constructor, etc.

When I was a student however and a Professor told us it was going to be an open book, open notes exam, that's when I started to panic... L0L

Oh yeah... google does answer most questions, but it's also important for them to find the forums so they can meet great folks like you guys, in order to see how things can be done from a different perspective. I love that part of forums.

I still have nightmares having to write code on a piece of paper ;D
NO insert and I have a habit of starting with

if (blCond)
{

}

and inserting lines afterwards

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

Trezker
Member #1,739
December 2001
avatar

OpenLayer only C++ifies the graphics part though.
Input and other things are untouched.

Coding on paper is a true nightmare. One mistake and you have to start over from scratch if you care about how it looks. Coding should be an assignment during the course.
I also always type the {} first and write the code afterwards.

Fladimir da Gorf
Member #1,565
October 2001
avatar

Quote:

If you're new to all this and just want to learn how to program games, then Openlayer/OpenGL is overkill

How's OpenLayer overkill? I'd say that it's easier to use for beginners than Allegro.

You can't forget to change the color depth. Program setup is simple. Functions are easy to grasp and there's no weird legacy function names (like draw_sprite or draw_trans_sprite). No palettes to confuse people. You don't even need pointers anywhere! Destroying the loaded stuff is done automatically. Collision routines, some simple game logic classes and speed regulation routines are included in the package. Buffering is done behind the scenes. Cool looking effects are easy to make and won't slow down the game.

Setting up the library is slightly more difficult because of the dependencies. The reason why you don't have buildme.bat is that it didn't exist when the 2.0 version was released. So you should use TortoiseSVN to download the latest version from the SVN repository, or if that sounds too difficult, I could upload the package somewhere.

PS. Teaching C++ in a class but using a C library doesn't sound good. If you teach how to use C++, then use C++. Not partily C and partily C++.

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

tobing
Member #5,213
November 2004
avatar

It's very interesting to see how everybody tries to advertise his own library. While this is a good thing if someone looks for a good start to do an own game, it's a little different in this case: Jennifer is looking for something that she could TEACH about. Of course, there will (or should) be a game at the end of that course, but priority is something which helps to explain OOP concepts to her students.

To be honest, I wouldn't recommend OpenLayer for that purpose (writing a game using OL is a completely different matter though: I'll be using it myself). And that's also why I suggested guichan, because if you look into that, you can learn (and teach!) a whole lot about different OOP concepts.

Fladimir da Gorf
Member #1,565
October 2001
avatar

Quote:

Of course, there will (or should) be a game at the end of that course, but priority is something which helps to explain OOP concepts to her students.

So how's Allegro better for that? :P

Quote:

To be honest, I wouldn't recommend OpenLayer for that purpose... And that's also why I suggested guichan, because if you look into that, you can learn (and teach!) a whole lot about different OOP concepts.

But why? OpenLayer is OOP. And why not to use both? Guichan can be integrated to OpenLayer.

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

tobing
Member #5,213
November 2004
avatar

Allegro is not better, and I didn't talk about allegro but guichan.

It actually depends on what the students already know. From what Jennifer posted I assume that they are more beginners than advanced, so I would keep things as simple as possible. For my own purpose I have integrated OpenLayer with guichan, and I think that this is a great platform to make games with.

I'm not sure if that is simple enough to be used in such a course: There are quite a few dependencies which all have to be set up, especially if you want to be able to debug and single step into one of the libraries (which is something you want to do from time to time, to look where a problem is, and to understand what really happens inside one of the libs. Once you have everything up and running (I have, but it took me some time!) I'm sure that the actual programming is indeed easier.

Let's say it's Jennifers choice, and it should be good to know what can be done: guichan to use with pure allegro, which is quite simple to setup, or use the OpenLayer backend, which requires more work to setup the project, but might make the actual game programming easier.

 1   2   3   4 


Go to: