|
So, what's new? |
HoHo
Member #4,534
April 2004
|
What about something like global int gamestate=PLAYING; void exitCallback(){ gamestate=EXIT; } main{ init(); while (gamestate==PLAYING){ doStuff(); } cleanup(); } I haven't really used the callback function, though and this might not work. It surely won't work if your gameloop has some problems. __________ |
Matthew Leverton
Supreme Loser
January 1999
|
Quote:
Quote: A.cc hasn't been a game development or allegro site in a long time imho I think you are correct with that. There are still new people starting out and some experienced Allegro people who help or hinder them, but not many actively working on games and finishing them. I guess there is just too many distractions for people..
Memory is a selective thing. People always are talking about the "good old days." If anything is different, it's because the old timers tend to stick around and spend a bunch of time arguing in off topic discussions. So the noise keeps on increasing, while the signal stays the same. It gives the illusion that less is getting done. The number of games added to the Depot has decreased over the years, but that's mostly due to me rejecting all the vaporware games with no downloads. The number of completed games per month hasn't dropped off at all. January was the third highest month ever. Last August was the second highest month. Allegro has always been most popular with DOS junkies and newbies. Obviously the former are finally dieing off, but the latter will keep coming. However, as always, as people get used to creating crappy games with Allegro, they tend to either quit (because they realize they suck) or move on to more advanced programming. |
23yrold3yrold
Member #1,134
March 2001
|
Quote: Begeezeus. I don't understand geeks. Quote: A lot of people posting in OT, some new folks trying to get a game running, and those who know allegro good enough to actually code something prefer to post in the OT channel or bitch about some not really important things Meh; I just left the site entirely during times of WoW (as evidenced by my post graph). With my return to productivity has come my return to (relatively) heavy posting. -- |
Onewing
Member #6,152
August 2005
|
------------ |
spellcaster
Member #1,493
September 2001
|
Quote: If you use a single loop for everything (even the GUI), you just need the set_close_button_callback() to set a flag, and to check the flag once per loop Yes. Exactly. I'll keep the game, the menu and intro, the options, the credits, the highscores (and I'm pretty sure we can come up with even more parts) in one main loop. I'm pretty sure this will make the program easily maintainable and less error prone. Best solution right now would be to create a state machine framework with the check in the base class. Which adds problems on its own (esp. if you don't want to use c++ ). If you just want to throw a game together, I found that having different procedures for all the different parts works out best. But then you have to remember to handle the close button. Well, actually, even forcing the user to remember to write your own close button procedure isn't quite clever. Why not installing a default procedure setting a global variable (like al_window_close_requested). Then we have reduced the overhead from "writing and installing the procedure, then checking the flag" down to "checking the flag". Normally an allegro game runs fine, but the "little things" annoy the user. Like problems when tabbing in and out of an allegro app. Like choppy mouse movement or too fast / too slow mouse movement after setting a different display mode. If you're writing a mouse controlled game, having to worry about the mouse at all (besides checking position of the pointer and state of the buttons) is a bad thing, heh. On the other hand, these "problems" are pretty irrelevant if you just want to code a game "just for fun". -- |
Ceagon Xylas
Member #5,495
February 2005
|
Quote: Instead of making a new book about game development with Allegro, you could write a new one: "How I cured my addiction to WoW" The expansion came out. |
Matt Smith
Member #783
November 2000
|
Quote: the "little things" annoy the user. That's a fact. The main advantage of having a standard framework isn't so much that it saves you implementing stuff. The advantage is that these little things are done consistently and well. |
miran
Member #2,407
June 2002
|
Quote: Best solution right now would be to create a state machine framework with the check in the base class. Which adds problems on its own (esp. if you don't want to use c++ ) I coded this in plain C for the new official demo game and it turned out to be relatively clean and elegant. I'm not sure what happened to that game and if it will ever actually be inlcuded with an Allegro release though. Also I think there's some talk (I don't follow the development of the new Allegro) of some sort of an event system in Allegro or something. So things definately are changing... -- |
GullRaDriel
Member #3,861
September 2003
|
Yeah, and now that spellcaster is back to contribute to allegro development, things are quickly going to change ! "Code is like shit - it only smells if it is not yours" |
spellcaster
Member #1,493
September 2001
|
As said, I'll do my best to help. But I must admit that I'm not that good when it comes to the inner workings of allegro. I'm more the guy who writes some stuff working on top of it. After reading my post again it sounds to negative. I really like Allegro. It's neat to write small games with it. I'm just not sure how well it can compete with the other libs out there. This also implies for me, that people actually wanting to write games (and maybe earn a buck or two with it) might choose a different lib. And this might explain why game coding isn't a hot topic here. -- |
GullRaDriel
Member #3,861
September 2003
|
My respects to M. SpellCaster for taking it so nice. thumb up My post was looking sarcastic after all, and I must admit that I share his point of view for the most parts. I myself am not that good when it comes to the inner workings of allegro. But Hey ! If we all try our best, Allegro 5 will for sure be used everywhere :-)
"Code is like shit - it only smells if it is not yours" |
Sporus
Member #3,815
August 2003
|
Mr spellcaster! Paragon of awe from tides of yore! If only Mr Korval came back too we'd see more intricately wrought flames than what the current wars on emoism have to offer.
|
Richard Phipps
Member #1,632
November 2001
|
I still remember their dice rolling argument that seemed to go on for 10+ pages.. |
spellcaster
Member #1,493
September 2001
|
Funny I don't. -- |
gnolam
Member #2,030
March 2002
|
Watch it - you're heading dangerously close to "suggesting everything isn't perfect with the dev process" territory there. There be Path of Much Flaming. -- |
Thomas Fjellstrom
Member #476
June 2000
|
Yeah no kidding. Once someone starts complaining and does absolutely nothing else besides that, even when suggestions of what need done are made by the devs (like documentation), multiple times, Yeah, the devs get a little annoyed. -- |
spellcaster
Member #1,493
September 2001
|
Well, once I feel more confident with allegro again, I'll try to help a bit. But I guess it'll be small stuff, like writing an example or two. I might also be of help on the OS X front (Currently playing around a bit with OS X app development). We'll see. -- |
Thomas Fjellstrom
Member #476
June 2000
|
Feel free to join [AD] and #allegro and ask all the questions you like Elias and I hang out in #allegro often enough, Evert and Peter only occasionally pop on, but all are on [AD] so that might be the best bet. -- |
Matthew Leverton
Supreme Loser
January 1999
|
Quote: But I guess it'll be small stuff, like writing an example or two. That's more than what most people are willing to contribute. And if you're serious about OS X, I don't think there's an active developer for it now that Peter Hull has taken off. |
Thomas Fjellstrom
Member #476
June 2000
|
Any help is greatly appreciated. -- |
Richard Phipps
Member #1,632
November 2001
|
Oh? Where has Peter gone? |
Hard Rock
Member #1,547
September 2001
|
Wow, he's still alive! I saw a post a little bit down before I saw this thread and I was wondering why there wasn't a thread active with an explanation. Apparently there is. _________________________________________________ |
Steve Terry
Member #1,989
March 2002
|
Wow welcome back Spelly ___________________________________ |
|
|