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
Fladimir da Gorf
Member #1,565
October 2001
avatar

Quote:

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.

Indeed, and I think all the setup should be done for the students beforehand. And I don't think they should worry about how the various libraries are made. It'd just confuse them. (Reading Allegro's sources would be really, really difficult)

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)

Ariesnl
Member #2,902
November 2002
avatar

Quote:

but priority is something which helps to explain OOP concepts to her students.

I always used mother nature for that. and it's great for explaining how inheritance works. You make it more "visible" and less abstract that way.

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

Neil Walker
Member #210
April 2000
avatar

What I mean by openlayer not suitable is if you're learning to code simple 2d games then (and I know OL simplifies some stuff) you shouldn't have to worry about openGL, rather you should concentrate on drawing sprites and pushing pixels. Plus there is a distinct lack of documentation on OL, other than the reference guide.

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

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

Fladimir da Gorf
Member #1,565
October 2001
avatar

Quote:

Plus there is a distinct lack of documentation on OL, other than the reference guide.

If you mean a lack of examples, that's right. Only the most simple stuff is covered.

Quote:

What I mean by openlayer not suitable is if you're learning to code simple 2d games then (and I know OL simplifies some stuff) you shouldn't have to worry about openGL, rather you should concentrate on drawing sprites and pushing pixels.

Yes, that's exactly what you do with OpenLayer. One of my friends who uses the library didn't even know that the it used OpenGL before I told him...

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)

Neil Walker
Member #210
April 2000
avatar

I'm not knocking anything flad, I think OL is great, but there are loads of issues cropping up with OL I see in the forum requiring people needing to make explicit openGL calls or errors with things not showing properly due to the way openGL works. When you want to learn Allegro, the best place to start is Allegro, and if you want it OOPs based, add a wrapper around it.

As for the documentation, that is a problem, because any newbie who reads the documentation won't know where to start, I mean it took me ages the first time to even find out how to get the stuff from the buffer to the screen as it's not obvious how things work, nor is it obvious that certain classes are linked and have inter-dependencies with others.

I'm not saying you need a full tutorial, but maybe structure the documentation in such a way that there is linkage between the objects and an order to how you do things - a bit like how the Allegro manual works.

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

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

Ariesnl
Member #2,902
November 2002
avatar

The documentation of Opel Layer could be improved. but even than , it's verry easy to use. just grab the rxample game and start coding.

But .. there are also people who think FMod is hard to use..

By the way Jennifer:
- Instead of Dev-C++ you could also try Code::Blocks

it has some nice features

And for sound/music ( what's a game without that ? ) you could use FMod
I recommend using FMod 3 ! over the newer FMod versions, the interface of FMod 3 is Much simpeler. (It took me 15 minutes to incorporate it in my game when I started using it )

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

Michael Faerber
Member #4,800
July 2004
avatar

Ok, now I want to post something too since I am the author of a software called "Allegro Simplificator". ;)

The Simplificator was some kind of personal project of mine and I think I only once posted a version of it here on allegro.cc, when suddenly a community member contacted me, saying that I should publish my wrapper.

That time I just had a programming job (which I still have), and my arms were a bit damaged from my bicycle crash, furthermore I didn't really do much Allegro programming anymore (the last thing I programmed was my game for SpeedHack).

However, I decided to release my wrapper anyway, but I was a bit too lazy to maintain it really - school was here too, I was playing Final Fantasy :) and I didn't program with Allegro much anyway anymore.

Therefore I was quite stunned when I saw this long thread with the title of my wrapper - I thought of this project more as an inspiring example for somebody's own wrapper, because I always look at other people's wrappers, then write my own one. ;)

Quote:

I understand what you mean now. I got confused when I looked at the Allegro Simplification Documentation. It shows things like:

als::bitmap Class Reference
[Bitmap components]
Simple replacement for directly using BITMAPs. More...
List of all members.

Public Member Functions
bitmap (const bitmap &)
Construct from existing bitmap.

bitmap (BITMAP *)
Construct from BITMAP*. etc........

shows constructors, destructors, public member function, private member functions, private member variables, namespaces etc... for each class

After reading all of this documentation, I thought that you could use this Allegro Simplificator to change the way you would interface with Allegro. So instead of straight function calls... you would use the classes and their member functions.

That is the wrapper's purpose, right.

Quote:

So I'm mistaken about that, right? I don't understand what the wrappers do then. So instead of being able to add member function, member variables to the classes that would already exist (if I had been right about Allegro Simplificator as I was thinking), I need to instead just build new classes using the predefined C functions.

Well, you could make new classes that INHERIT the old classes' functions - that way you could add new variables and classes.
However, you can look at my wrapper and the shipped examples if you have time - the examples could be the most helpful thing there.

Quote:

I'm going to have to look at this from a different perspective then. I appreciate you pointing me in the right direction. I'm just trying to learn here, for my students. I don't want to be the type of professor that keeps teaching the same crap for 20 years. I'm trying to keep up with what the kids want and keep them interested in Computer Science.

I really appreciate your help.

I am really glad that you do this, because I just had some kind of computer lessons today in school and the teachers don't really want to use new software and complain - for example they installed Flash 5 on the computers, although version 9 is the recent version! :P

To say it short: I find it really good that you try to learn the new stuff - keep it up!

--
"The basic of informatics is Microsoft Office." - An informatics teacher in our school
"Do you know Linux?" "Linux? Isn't that something for visually impaired people?"

Evert
Member #794
November 2000
avatar

If you're teaching a beginner course, you want a minimum number of library dependences - if for no other reason than that the students will have no clue which part of what they're tought is basic C (or C++), which part is Allegro and which part is some other library.

I'm sure many people find Open Layer easy to use and convenient, but teaching it along with Allegro and C++ to beginners is just going to add to the confusion. That's what I would expect anyway.

Fladimir da Gorf
Member #1,565
October 2001
avatar

I just want to correct any misinformation about my library.

Quote:

any newbie who reads the documentation won't know where to start, I mean it took me ages the first time to even find out how to get the stuff from the buffer to the screen as it's not obvious how things work

However, there's a tutorial exactly for that. It's in the demos-directory.

Quote:

I see in the forum requiring people needing to make explicit openGL calls or errors with things not showing properly due to the way openGL works.

Hmm I can't remember such a case, though...

Quote:

nor is it obvious that certain classes are linked and have inter-dependencies with others.

How does that affect anything for the developer? Do you mean the "state machine" classes like Canvas?

Quote:

I'm not saying you need a full tutorial, but maybe structure the documentation in such a way that there is linkage between the objects and an order to how you do things - a bit like how the Allegro manual works.

If it's a direct link between classes, there will be links as all the class and method names are linked to the corresponding page.

Quote:

If you're teaching a beginner course, you want a minimum number of library dependences - if for no other reason than that the students will have no clue which part of what they're tought is basic C (or C++), which part is Allegro and which part is some other library.

With OL, that's not an issue either, since it's only OL that uses the other libraries, not the developer. Everything's abstracted away. It's not any different from just dumping all the other libraries inside OL. I'm just using the Java convention - never code anything that has already been made.

Quote:

I'm sure many people find Open Layer easy to use and convenient, but teaching it along with Allegro and C++ to beginners is just going to add to the confusion. That's what I would expect anyway.

Would you really have to teach any Allegro, except how the key-array, mouse_x, mouse_y and mouse_b?

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)

Neil Walker
Member #210
April 2000
avatar

Well, I agree with evert for a change, as in when I said 'When you want to learn Allegro, the best place to start is Allegro, and if you want it OOPs based, add a wrapper around it.' I meant exactly what he said, the minimum the better.

At the minute, despite the new build process, OL requires a large amount of external libraries, some of which are hard to build, and the OL build changes every day to fix bugs whereas Allegro requires no external libraries and is stable.

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

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

tobing
Member #5,213
November 2004
avatar

Quote:

the OL build changes every day to fix bugs

That's not really true. I'm looking into SVN almost daily, and changes are not very often.

Quote:

since it's only OL that uses the other libraries, not the developer. Everything's abstracted away.

Unfortunately that's not completely true. If you include the OpenLayer header file(s), you have to add a series of additional include paths to your compiler settings, because OpenLayer includes all these other header files in his public interface. While this does not immediately effect the application programmer, it definitely adds a lot of symbols which are not used by the application programmer. Things might be a little different if OpenLayer would be a DLL (with Windows at least), but that could only resolve any linking issues (you have to link to a series of libraries), not the compile dependencies to all the other libraries required by OpenLayer.

Fladimir da Gorf
Member #1,565
October 2001
avatar

Still, I can't see how a more difficult set-up would affect the students. Just supply pre-made project files which contain the linker commands.

Quote:

When you want to learn Allegro, the best place to start is Allegro, and if you want it OOPs based, add a wrapper around it.

But then you'd have to add both Allegro and the wrapper to the linker line! How's that more difficult than adding a few more? (Especially when copy-pasting stuff, I can't remember the whole linker line myself either)

Of course, if you really want to, you can just bundle all the libraries inside libopenlayer.a.

Quote:

the OL build changes every day to fix bugs

Yeah, right. That's what I would really call misinformation. Besides, almost all the issues thus far have been with the features that don't even exist in Allegro.

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)

Indeterminatus
Member #737
November 2000
avatar

Jennifer, kudos to your motivation and dedication. Keep the momentum! In hindsight, I'd have loved to be one of your students, I guess ;)

Not helping, I know, as I don't have anything to say that hasn't been said before. Keep it up!

_______________________________
Indeterminatus. [Atomic Butcher]
si tacuisses, philosophus mansisses

Ariesnl
Member #2,902
November 2002
avatar

Quote:

If you're teaching a beginner course, you want a minimum number of library dependences - if for no other reason than that the students will have no clue which part of what they're tought is basic C (or C++), which part is Allegro and which part is some other library.

I'm sure many people find Open Layer easy to use and convenient, but teaching it along with Allegro and C++ to beginners is just going to add to the confusion. That's what I would expect anyway.

Maybe.. BUT..
I remember having to write dull and completely useless programs. If that was my first programming experience it wouldn't have lit my fire.

The first program I wrote in C++ (after Hello World) was a CD player using MSCDEX.
It wasn't easy, it took me a month. BUT it was fun to do and I learned a lot from it.

Quote:

I'd have loved to be one of your students, I guess ;)

[lame mode]
You haven't seen her yet, have you ;D
[/lame mode]

By the way:
Teach them STL !!!!!
When I was a student they skipped it ( too complicated or something) but I use it almost daily !

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

kentl
Member #2,905
November 2002

If you want a finished OOP framework and let the students create something upon it, then perhaps ClanLib would be a better choice than Allegro. It's certainly worth checking out.

Ariesnl
Member #2,902
November 2002
avatar

hmmpf I didn't like clanlib..
it's a pain in the **** setting up

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

There's only one hard thing about STL, the compiler errors when you miss something.
I can't live without my precius vectors, lists, maps etc...

/me huggles STL

I like boost too, but that's not for this class.

kentl
Member #2,905
November 2002

Quote:

it's a pain in the **** setting up

It is? I've never done it but it doesn't seem that hard judging by their home page. If she wants something which is OO-based out of the box so that her students can use it in their projects, then creating an OO-framework might not be what she wants. On the other hand it could be a good assignment albeit a bit boring.

gnolam
Member #2,030
March 2002
avatar

ClanLib was, at least a couple of years ago, not even worth thinking about setting up. It was beyond the 9th circle of dependency hell.

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

Jennifer Perkins
Member #8,203
January 2007

God you guys are great. I'm learning so much from just reading your posts and accessing some of these websites and reading reading reading. I have my 2 teaching assistants all involved too and they're enjoying learning this as well. We're having a good time with all of this info. Even if we are such newbies to all of this gaming. We spent about 6 hours the other day, laptops in one hand, pizza in the other just going thru so much material and the websites and ideas you have all suggested. You have all been so good to me, and have given me so many things to think about. You all are the greatest!!

Jennifer....

P.S. - I'll post my pic in a bit and you can then decide if you would have liked to have me as a teacher... L0L;D

Richard Phipps
Member #1,632
November 2001
avatar

You are welcome. We hope it helps you. :)

Ariesnl
Member #2,902
November 2002
avatar

Quote:

laptops in one hand, pizza in the other

That almost makes you a game coder already ;D;)

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

Just add tons of caffeine and late nights.

Neil Walker
Member #210
April 2000
avatar

Quote:

God you guys are great.

We're so much better than those SDL losers ;)

Quote:

Teach them STL !!!!!

If you don't you'll be letting them down I think. STL is a big topic and can be complicated but if you stick to strings (effectively giving you the native type c/c++ has always missed) and vectors (proper dynamic arrays, e.g. your sprites) you can't go wrong. Possibly include in there 'map' (for storing stuff by name, e.g. resources) and the sort algorithm to use in conjunction with vectors/maps (sorting drawing order or high-scores)

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

Quote:

laptops in one hand, pizza in the other

{"name":"590988","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/9\/49909bd33f47c4ca679f3efd22cad755.jpg","w":374,"h":537,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/9\/49909bd33f47c4ca679f3efd22cad755"}590988
{"name":"590989","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/3\/d3084124f1f72f1ba5138ee73b6e4bb2.jpg","w":363,"h":499,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/3\/d3084124f1f72f1ba5138ee73b6e4bb2"}590989

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.

 1   2   3   4 


Go to: