From: Dan P. <ba...@al...> - 2005-11-21 02:09:55
|
On Nov 20, 2005, at 10:30 AM, atani wrote: > Also very cool, a Slideshow would be a good addition. Also you can > take advantage of the Sleep animation and a Trigger callback which > increments the "slide". Yeah.. though at the time I wrote it, I don't think I'd even written the Delay and all that. So it just handles it internally. > Yup, just saw it. The format is decent enough for me. Perhaps > once the cmd line tool is checked in I can take a look at it and > integrate support for asciidoc type tags Cool. I'll have to warn you though, it's very minimal. :) Those tags just represent basic state changes, and it's got its own parser built in (no boost or anything). > I can imaging. This would probably be a good use for the Object > event handling I have planned. Until then though we can use a flag > in the inputEvent method to detect if we are in the "popup" or in > the "game". Speaking of Object event handling, I never really discussed why that was in there. :D It might be interesting... Basically in Marbol I got to the point where I was manually managing all this really nasty time based code. The standard animations and triggers weren't cutting it anymore because they were too fixed. What I wanted instead was something more like Flash (actually it was inspired entirely by Flash) where you can have a global timeline and movable events that can fire any random method to do stuff. It's meant for more high level things like gameplay mechanics than just regular animations, though it could be used for whatever. An example: in Marbol whenever you drop a piece down on the board, it needs to check to see if there are matching marbles around it to form a group. When you drop the piece, it uses the standard drawable/ animation stuff to make the visual piece fall. It then checks for pieces around it, and if it finds them, it schedules a removal event in N millis (whatever it was). So the player has a moment to see what's being removed. There's another event for dropping a new game piece into the board, and that event is simply moved forward any time a new animation needs to happen, so that new pieces aren't still falling while stuff at the bottom is being removed. Events can be rescheduled or forked indefinitely, or let go as they happen. I had in mind a system (eventually) where you can just instantiate a bunch of objects, maybe even through XML and not C++ at all, and connect up their slots and signals (think Qt and Obj-C/IB here). So that's why some weird classes are derived from Object instead of RefCnt. You guys can make of that (or not) as you will :) |