Tom,
[quoted text, click to view] > I've seen 2 of the three links there on scrolling and game
> design/tiles. I wondered how correlative they are to Flash 8
> since they are basically Flash 5 techniques. I assume they
> would still work.
They do still work, for sure. :) They're based on methods and
properties of the MovieClip class, so fire up the documentation on that
(arguably the most important class in ActionScript, since the SWF itself is
one big MovieClip instance).
Flash MX (aka Flash 6) introduced dot notation for event handlers ...
myClipInstance.onEnterFrame = namedFunction;
... or ...
myClipInstance.onEnterFrame = function() {
// anonymous function code here
}
.... rather than ...
// attached to instance itself
onClipEvent(enterFrame) {
// instructions here
}
.... which brought with it the ability to create and kill these handlers at
runtime, obviating the need for hack workarounds like setting _x and _y
values to zero during frame loops to cease movement.
You won't see OO organization on those Flash 5 tutorials, but the
*concepts* still apply. Even the syntax still applies, but the coding is
more efficient nowadays. Flash 8 introduces a number of Bitmap classes --
which I explored -- that boost runtime speed significantly.
[quoted text, click to view] > When you log onto the game, you pick up where you left
> off, a week ago, a month ago - a year ago. Your persona
> will interact with literally every other player and every
> location, object, etc you come upon. For this I need a
> full OO language with a database.
Sure, I can't argue that. Flash doesn't yet interact directly with a
database, but the socket servers I mentioned earlier do fill that gap.
Mainly I wanted to nudge you toward balancing a bit more logic on the SWF
side -- only because I love Flash. ;) Game GUI is about as sophisticated
as it gets, and your collision detections, pathfinding algorithms, and so on
could (should?) be in ActionScript.
[quoted text, click to view] > I need the OO language to model all the objects of the
> game, which can become fairly complex and will evolve
> over time. I need the db to store the data associated
> with these objects.
True.
[quoted text, click to view] > I don't see how Flash can handle really any of that, other
> than doing it all in Actionscript, and that would be hellish,
> really. I could write that stuff in JS, so I could probably
> handle it in AS, but it just doesn't make sense to do so -
> it's the wrong tool.
Hellish for ActionScript, agreed! But how much of this are you saying
you might have written in JavaScript? As it is, you're going to have to
write ActionScript to handle the GUI, JavaScript to handle your AJAX --
thanks, again, to Grumpy7 for helping my clarify my earlier comments --
*and* your Ruby game classes.
[quoted text, click to view] > Maybe one of my main questions is how would Flash
> communicate with what I write on the backend?
Use one of the multiuser servers I mentioned, or write your AJAX into
the HTML page and trigger those functions via getURL(), fscommand, or the
ExternalInterface class -- or check out the JavaScript Flash Integration Kit
at
http://www.osflash.org (not sure what method[s]) they're using; not even
sure it's asynchronous).
[quoted text, click to view] > if other people were in your same zone, you would see
> them and possibly interact with them, or with other objects
> in your zone/sector.
I don't see a way to perform those collision detections without using
ActionScript, which will then pass through JavaScript and XML to your Ruby
app, or via Java sockets to your Ruby app.
[quoted text, click to view] > I want this done asynchronously because I don't want to
> reload the playfield - it should happen seamlessly. The only
> time I want the playfield to "reload" is when the player
> moves from sector to sector.
The multiuser servers support chat applications and, from what I've
heard or read, true real-time gaming. I can't vouch for that personally,
but they're your ticket.
David
stiller (at) quip (dot) net
"Luck is the residue of good design."