Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » If it's true, you don't believ in the afterlife.

This thread is locked; no one can reply to it. rss feed Print
If it's true, you don't believ in the afterlife.
bamccaig
Member #7,536
July 2006
avatar

furinkan said:

//I haven't used C in like 4 months, so please be gentle
al_get_joystick_state(&myJoy, &myState);

No return value and I have to pass in a struct to fill out? A good design that helps ensure better memory management! Also VERY confusing to those who don't have a grasp on memory management. We have a beautiful API directed at good programmers, but in order to poll a joystick you need to understand pointers, memory, and that parameters can be outputs. Seems elementary to us, but to a fresh programmer this is pretty steep to check if a button is down on a joystick. ;D

We don't need to write Unity; we just need to take the edge off this API.

The event handling is a somewhat advanced topic too for a n00b. A simple wrapper that has its own loop, and allows binding event handlers might be useful. Turn n00b Allegro programs into:

#SelectExpand
1void draw(ALLEGRO_GAME_STATE *, void *); 2void init(void *); 3void logic(ALLEGRO_GAME_STATE *, void *); 4 5// My game state is global cause I'm a n00b. 6 7int main(int argc, char * argv[]) 8{ 9 return al_standard_loop(1024, 768, 30, init, logic, draw); 10} 11 12void draw(ALLEGRO_GAME_STATE * state, void * userdata) 13{ 14 draw_all_the_things(); 15} 16 17void init(void * userdata) 18{ 19 load_bitmaps(); 20} 21 22void logic(ALLEGRO_GAME_STATE * state, void * userdata) 23{ 24 process_time(state->game_time); 25 process_inputs(state->user_input); 26} 27 28...

A simple interface could be hacked into a library relatively easily. Input from members that are actually using it to build games would be good so we don't leave out important things. The main things I can think of for a basic A4 compatible game is knowing user inputs, having a concept of time (and knowing the rate of execution is controlled and fixed), and having a procedure to process the logic of the game (perhaps over a delta of time), and a procedure to draw the state of the game to the screen at the given time.

I can understand Trent not wanting to add to their burden for maintaining such a thing, but it will also confuse matters to call it something else. Either we'd need to provide a separate Web site, forum, etc., to host it and provide support for it, or people would be confused by it having a different name. And also, without having its own site and community, giving it a different name might make it seem like a bad route to take. Whereas I can see such a wrapper being sufficient for most Allegro users! The few that need more power can see the source for the wrapper to see how to do it themselves.

This could be an official add-on. allegro_loop or something. Does anybody see a showstopping limitation to this interface that would prevent making basic 2D games? What is it missing that really matters for most users? I suggest keeping it simple and making it just enough for a n00b to get started quickly. Once they get over the initial hurdle of just drawing something to the screen and moving it we can peel back the curtain and show them how Allegro 5 actually works to accomplish more.

pkrcel
Member #14,001
February 2012

If Mark Oates really proposed to look at the project page design we should REALLY try to bug him into sketching something together.

He is AWFULLY awesome at this kind of design tasks, that would be a definitive step up in visibility.

And PLEASE follow Trent suggestion about the high level interface....are we SERIOUSLY suggesting to ease users (n00b or not) on memory management?

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

bamccaig
Member #7,536
July 2006
avatar

If Mark is MIA at the moment I see no harm in furinkan coming up with something, as long as he realizes it is gratis, and he may have to compete if Mark is secretly locked in a basement working on it. In the meantime, I'd assume that Mark got busy with other stuff and didn't get around to it.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I've been working on an intermediate wrapper for Allegro for a while now, in my Eagle library. It's all about making programs easier to write the way we want to write them isn't it? What about code like this for input?

#SelectExpand
1Input quit_key(KB , PRESS , EAGLE_KEY_ESCAPE); 2 3InputGroup secret_key_combo = Input(KB , HELD , EAGLE_KEY_LCTRL) && 4 Input(KB , HELD , EAGLE_KEY_LSHIFT) && 5 Input(KB , PRESS , EAGLE_KEY_BACKSPACE); 6 7do { 8 9 //get event 10 11 HandleInputEvent(ev); 12 13 if (secret_key_combo) {Start();/* okay, let the user play now */} 14 15} while (!quit_key);

Or something like this :

InputAssignment game_inputs;
game_inputs["StartGame"] = secret_key_combo;

/* in loop  */
HandleInputEvent(ev);
if (game_inputs["StartGame"]) {Start();}
/* end loop */

And you can work directly with the key states through shortcut functions as well (these depend on HandleInputEvent too) :

if (kb_press(EAGLE_KEY_ESC)) {game.Quit();}
if (ms_dblclick(LMB)) {game.Start();}

In my looser onion that is way easier than the low level way you would have to do it with allegro. My library does that and so much more, and I would love to have people use and/or contribute to it. I still need atlases, tile maps, and to port my gui, but it can do a lot already. So if anybody wants a higher level library that makes development easier I think Eagle would do it, and I should have some free time this month and a half or so to work on porting more widgets.

The full header InputHandler.hpp is attached. And that's just the input handler! There's a lot more, if you're interested hit up the subversion repo (sorry thats what I'm using atm) url at this website.

http://sourceforge.net/p/eagle5gui/code/HEAD/tree/

Haven't made a commit in a few weeks or so, but I need to solidify something first.

Trent Gamblin
Member #261
April 2000
avatar

Having higher level libraries is great, a lot of people will prefer to use them so I encourage others to work on and use them if they like. That's not what Allegro is about though. It's just a building block. Use it to build higher level libraries or use it directly in your game or make a custom engine from it. Let's just not force these abstractions on anyone. The existing abstractions are for portability mainly.

OICW
Member #4,069
November 2003
avatar

Having higher level libraries is great, a lot of people will prefer to use them so I encourage others to work on and use them if they like. That's not what Allegro is about though. It's just a building block. Use it to build higher level libraries or use it directly in your game or make a custom engine from it. Let's just not force these abstractions on anyone.

I second this. The problem is that the abstraction might not suit your programming style and taste or even your needs. I can't imagine to write good abstraction over the Allegro user events in case of the loop example bamccaig posted. I can imagine something will eventually come out when you actually try to implement something in your own engine and use it for a while, but coming with something from scratch, I don't think it's a good idea, certainly not to be a part of the library.

bamccaig said:

I can understand Trent not wanting to add to their burden for maintaining such a thing, but it will also confuse matters to call it something else. Either we'd need to provide a separate Web site, forum, etc., to host it and provide support for it, or people would be confused by it having a different name.

Few years back I've used OpenLayer for maybe two projects. One never got finished and the other was a Christmas hack entry. The project seems to be dead for quite some time now. It provided some nice C++ abstractions over the Allegro 4.x core plus enabled hardware acceleration using AllegroGL. At the time it was good because AGL wasn't quite friendly to use for my taste. But now, I don't even remember how to compile my projects.

I developed them with Bloodshed Dev-Cpp (another long dead project) on Windows and now I observe that the code rotted quite a lot since then. My point is, let's not jump to make something big that won't get finished and will drain energy from all developers in the process. Abstraction is fine, but I see Allegro as a Lego construction set - you get lot of bricks and what you do with them is entirely up to you. Just as Trent said.

furinkan said:

No return value and I have to pass in a struct to fill out?

I haven't checked the manual but isn't it like most of the allegro function return success/failure/error code as their return value? The options are either this or error codes returned via function parameter or not at all.

Sirocco said:

Also, don't totally ignore the Windows branch. No one here wants to hear this but that was a major up. For a long time it wouldn't even build from scratch for most people.

Shyfis said:

I agree with these points wholeheartedly. I use Windows, and a couple years back I had a very difficult time getting Allegro to play nice.

furinkan said:

I disagree that support of a given platform is the responsibility of our (volunteer) maintainers! >:( I don't even have a Windows box, and you'll never get my ass to supply a Windows patch. Sorry, but that's the way volunteers are.

Well, I know that somewhere up there I said I never had the balls to compile Allegro on Windows and later ditched the platform altogether (save for playing games), but this actually is a problem. I haven't thought about that earlier but as I'm reading the comments on this thread one of the issues that occur to me is that major active Allegro developers are developing on Linux.

Don't get me wrong, I appreciate your work really much - hell, I've never seen more flawless build on Linux than Allegro (and one thing I really don't enjoy is building other people's work) - but I think there's a need for an active dev who'd be using Windows to make sure everything works nice there. Maybe I'm wrong in the sense that all the active devs are Linux based, please correct me. Or maybe I haven't really tried Windows port for quite a while. I really should try to build it.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

Trent Gamblin
Member #261
April 2000
avatar

Windows is supported and as far as I'm aware (after supporting and building it thousands of times) it's not more difficult than Linux save for the lack of a package manager.

EDIT: Oh let me guess, you want us to build a package manager too. :P

furinkan
Member #10,271
October 2008
avatar

@Trent: Yes. With nightly automated builds, signed packages, and I want it delivered by next Monday's thread. 8-)

Thomas Fjellstrom
Member #476
June 2000
avatar

I am still expecting to get the build server done at some point. But it's taken a back seat to things like getting married, and the fact that the server is half a world away, the latency is horrible (even over ssh), and the fact that that box has shorewall enabled, and some idiot forgot to ALLOW(SSH). What a dumbnut.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Aikei_c
Member #14,871
January 2013
avatar

OICW said:

I developed them with Bloodshed Dev-Cpp (another long dead project)

Actually, there is a fork which lives up to this day

OICW
Member #4,069
November 2003
avatar

Windows is supported and as far as I'm aware (after supporting and building it thousands of times) it's not more difficult than Linux save for the lack of a package manager.

I guess that the lack of package manager and standard lib and include paths is the main problem that bugs me everytime I'm forced to develop on Windows. Sooner or later I get the feeling that everything is messy and needs cleaning up - library here, library there, compilers everywhere. Like I said, I'd better go and try to build Allegro 5 on Windows to see what it's like, it's probably just me and my aversion to anything development related on Windows :-/

Trent Gamblin said:

EDIT: Oh let me guess, you want us to build a package manager too. :P

Well, if you'd be so kind :D Reminds me how I needed to pack and ship all the libraries with my project because the supervisor wasn't really into the idea that it's the responsibility of the person who wants to build the project to obtain the prerequisities.

Aikei_c said:

Actually, there is a fork which lives up to this day

Sweet, although i bit late. In the meantime I found Code::Blocks which worked well on Linux as well. Though, lately I have found that QtCreator might suit me better. I'm still undecided which way to go.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

Thomas Fjellstrom
Member #476
June 2000
avatar

If you grab msys2 you get a nice dev package manager :D though it doesn't handle msvc.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Paul whoknows
Member #5,081
September 2004
avatar

I only use Windows OSes ;) I use the A5 devpack for Dev-C++, it takes only a few minutes to install, not using A5 seriously so I don't know if these devpacks are up to date.

Here are the devpacks I'm talking about:

http://devpaks.org/category.php?category=Allegro

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

l j
Member #10,584
January 2009
avatar

I had no idea those devpaks were still being made. Those are certainly far more user-friendly than downloading the library files and manually linking them. Might also scare newbies less.

furinkan
Member #10,271
October 2008
avatar

That's another thing. If there was no Dev-Pak, then it was a huge mess to work on windows. The clutter confused my then-n00b self. Managing my libraries by hand could end up quite messy after awhile, and I often deleted my whole toolchain and re-installed as a way to cope. There's so many binaries for Windows. Which one do I need, and which toolchain is the best? "Whatever you want" is the answer for experienced devs, but that will not suffice for n00bs. It causes confusion. They can barely grasp what a toolchain is, so don't tell them to use their own judgement!

Our library is designed to allow you to program using whatever models you prefer. We offer multiple interfaces for the same thing, often with override-able functionality. Pointers are used profusely to allow custom management of structs in memory. Hell, even memory management functions are customizable!

This is not a library for n00bs anymore. This is a library aimed at serious performance, for engines or ballz-fast games!

We need more users to remain viable. n00bs or 1337s? Which is it, because our branding says one thing and our library/community is another? ???

Arthur Kalliokoski
Second in Command
February 2005
avatar

The n00bs can always get DarkBasic.

They all watch too much MSNBC... they get ideas.

furinkan
Member #10,271
October 2008
avatar

They can cut their junk off with a plastic spoon, too, but we don't suggest that they do it! >:(

Matthew Leverton
Supreme Loser
January 1999
avatar

To me, it's always been more about the community than the bits of software. Allegro is "dead" only because the people who built it grew up. :'(

But with respect to the software, a problem has always been that by the time the library is ready, a new generation of computing has arrived. Allegro: Atari Low-Level Game Routines. Whoops, got to rewrite it for DOS. Oh, here comes Windows. Got to get it working on Windows. DirectX is no more, needs to be Direct3D. The old API doesn't work well with this. Got to make Allegro 5. Oh, the Internet is here. Flash games. Got to make it work in a browser. Phones... iOS, Android!

The reality is that there is very little use for a library like Allegro, especially if it doesn't work perfectly on Windows, OS X, iPhone, and Android. (I'm sorry, but people still don't care about Linux, even as I type this on my Mint Ubuntu VM running inside XUbuntu.) Putting a little lipstick on the marketing side of things, writing great docs, revamping Allegro.cc into a modern cute website, switching to GitHub... e.g., cater to the people who were born after Allegro.cc was created... then there will be a little uptick in usage.

And good for those new converts, but it still isn't going to bring back RHIDE. :'(

bamccaig
Member #7,536
July 2006
avatar

Chris Katko
Member #1,881
January 2002
avatar

Got to make Allegro 5. Oh, the Internet is here. Flash games. Got to make it work in a browser. Phones... iOS, Android!

Let them keep their damned rehash games. And if the quality wasn't bad enough, the market is trash. 99% of the mobile market is either advertising supported, or part of a companies advertising (download the new Sony/Pizza Hut/Durex app!) so the going price for mobile video games is... effectively $0. I for one and not going to work on a game that generates a mere $2,000 a year. That's pathetic and unacceptable for a serious professional.

Just because Joe Sixpack doesn't mind playing games ripping off the mechanics of popular games from the 80's/90's but with prettier vector graphics, on a tiny screen, with a crappy speaker, and filled with advertising popups... doesn't mean I don't mind. And if I exist, there are thousands like me who will play my games.

Steam is living proof that the PC still rules, and there are plenty of successful, original indie games on Steam. Be it 4x4 off-road simulators with realistic deformable mud physics, space simulation, turn-based/real-time space rogue likes, and more.

Hell, Space Station 13 is a free game, on a extremely crappy underlying engine (designed originally for online JRPGs) It makes zero money except for server donations, and yet gets expanded by multiple groups. It still pulls an audience of 200-400 (often 400 every night.) a good ten years since the game was originally created. Multiple groups are now moving to capitalize on a spiritual successor to the core mechanics that keep bringing people back.

Humble Bundle may now offer mobile versions, but it wouldn't exist today if it hadn't become so popular selling good PC games.

I think the money is there if you're willing to grab it. I don't see Allegro as a problem with that. Allegro may have its annoying moments, but it's a tiny fraction compared to the libraries I have to interface to on a daily basis for work. The popularity of PC games in media outlets is at a low, but the gamers are still there as eager as ever.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Paul whoknows
Member #5,081
September 2004
avatar

furinkan said:

This is not a library for n00bs anymore. This is a library aimed at serious performance, for engines or ballz-fast games!

I've always thought that blaming the users is a cheap way out, it makes you look so unprofessional, I would never hire a person with such an attitude.

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

Arthur Kalliokoski
Second in Command
February 2005
avatar

furinkan said:

This is not a library for n00bs anymore.

I believe the problem is terse, incomplete docs. I've <ahem>"acquired" most of the OpenGL Superbible books, which are much more conversational than the A5 docs and examples, and even they don't hold up when you actually go to compile the programs and try to understand what's going on. VBO examples only using points, necessary support functions hidden away in header files in another directory, etc. They're nice to just read and ooh and ahh over though.

I especially hated the source of one of those Superbible books (4th edition?), there was a horrible script masquerading as a makefile at the top of the source tree which forked off a whole bunch of crap that didn't work, it took up 4Gb of memory before I managed to kill it.

They all watch too much MSNBC... they get ideas.

Thomas Fjellstrom
Member #476
June 2000
avatar

I've said it before, and I'll say it again. We need help. The few of us left don't have the time, or will to keep allegro fresh.

Help is needed in all parts, docs, linux, windows, osx, android, ios, etc. ALL THE THINGS.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

furinkan
Member #10,271
October 2008
avatar

I've always thought that blaming the users is a cheap way out, it makes you look so unprofessional, I would never hire a person with such an attitude.

Easy, killer! I'm not blaming anyone; I'm saying our projected status as a library/community is disjoint from where we need to be. We need to cater to newbies and rope them in, or start to be up front about just how bleeding edge our library actually is. I think there's a lot here for serious developers, and we don't show that with our anthropomorphic cartoon alligator. ;D

To me, it's always been more about the community than the bits of software.

Quote:

ALL THE THINGS.

Agreed. I'll start by reinvesting myself in the community. Try to read more of the threads, and stir stuff up. When free time comes, I'll be more invested in this than other things.

Thomas Fjellstrom
Member #476
June 2000
avatar

I just learnt about a thing called NuGet. A dev package manager for msvc? That might be something we want to support if it works for c/c++ packages.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730



Go to: