Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: pureMVC AS3 Game with GAE server  (Read 13706 times)
olivier
Newbie
*
Posts: 6


View Profile Email
« on: June 17, 2009, 10:25:15 »

Hi,

Some times ago I came here to ask questions. Since then my project took form and today there is something to show (even if it's just a prototype for now) : http://www.spiderchallenge.com :)
It's a flash Game using PureMVC AS3 for the client part. The server is build with Google App Engine and use django thanks to app engine patch.
The game is kind of small for now but new features will be added regulary (you can subsribe to our RSS feed our follow us on twitter).

I hope you'll enjoy the game, don't hesitate to give feedback, it'll help to improve the game for future versions ;)
Thanks a lot for pureMVC, it's a really gret work and a pleasure to build an app with it,

Olivier
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: June 18, 2009, 10:26:55 »

Cool! It seemed like it could always be done in 3 moves, though. Is there to be logic that keeps you from being able to just go straight out? Like, maybe bugs get stuck in parts of the web and thrash around, breaking it, so that you have to go around... Maybe you get points for rolling them up in webbing and reparing the web...

-=Cliff>
Logged
olivier
Newbie
*
Posts: 6


View Profile Email
« Reply #2 on: June 18, 2009, 12:48:24 »

Thanks Cliff for testing the game :)
In fact the first levels (let's say before the 5th) are very easy and are just here to help you understand the goal (which is escaping the web).
There's a lot of trap after that try to stop you (with a Pacman in the role of a virus ;)) and the last levels are very difficult (you have to anticipate how the global web will react because of chain reactions, Multicore's pipeline seems easy by comparison :p).
If you're logged in, you will get your score and appear on the score wall http://www.spiderchallenge.com/score/

enjoy ;)
Olivier

PS : It was my first app with pureMVC and for what I see, it really work great for keeping as independant part as possible. My game is bigger and bigger, new features are added, other are refactored but the whole things stay flexible and I still can sleap at night without AS3 nightmares ;) The hard part is remembering all the notifications once you have a lot of them.
Logged
Ondina
Sr. Member
****
Posts: 86


View Profile Email
« Reply #3 on: June 19, 2009, 01:33:22 »

I got stuck at level 4. Was I asleep?

you have to anticipate how the global web will react because of chain reactions, Multicore's pipeline seems easy by comparison

What does the puremvc-logic behind those chain reactions look  like? Could you elaborate on that?
Ondina
 
Logged

~ Ondina ~
olivier
Newbie
*
Posts: 6


View Profile Email
« Reply #4 on: June 20, 2009, 01:58:24 »

Ok, I will try to do my best to explain how it works, don't hesitate to ask questions if it's not clear.
The game is compose of really simple element (information flow, wifi, virus, switch, and the spider) that are just describe by a position and sometime a state. they are store in proxies.
Once we have to calculate the next round state (and the animations to display for the transition) we use commands.
We do steps of calculation, a proxy keep the state of this and a macro command ask for each game element to interact. Each game element have a simple command where he know how to interact with others elements. For exemple :
  • the information flow know that if the spider is at the entrance, he have to move it to the end
  • the spider know that if it arrive on a wifi, it switchs it off
This command dispatch notification to the corresponding mediators that stacks internally the appropriate animation to play (and when to play it)
At the end we dispatch a notification "play the first step", we wait for everyone saying it's done and then dispatch "play the next" etc.
I think this system is flexible and allow us to add new game elements. The difficulty is that we have a list of element that can interact with all the other so it makes big switch/case in the command but it's the interesting part of the game : simple component that are coupled and make a complicated reflection game ;)
Logged
Ondina
Sr. Member
****
Posts: 86


View Profile Email
« Reply #5 on: June 22, 2009, 11:00:03 »

Thanks for the description, Olivier. It gives me a (very) general idea of what's going on behind the scenes :)
You are not using the StateMachine Utility, are you?
Ondina
« Last Edit: June 22, 2009, 11:32:14 by Ondina » Logged

~ Ondina ~
olivier
Newbie
*
Posts: 6


View Profile Email
« Reply #6 on: June 23, 2009, 02:02:59 »

No, i'm not using it.
I took a look at the stop watch sample when I first tried pureMVC but I understood it more as a general application state machine than for every single component of the game.
I confess I didn't spend a lot of time on it. Do you think I should use it for my game's elements ?

Olivier
Logged
Ondina
Sr. Member
****
Posts: 86


View Profile Email
« Reply #7 on: June 23, 2009, 02:25:13 »

Do you think I should use it for my game's elements ?

No, no. The StateMachine has indeed to be used when you need to describe  the states of the application not the states of  visual components in the view.
I was just curious if there was some implementation of the StateMachine in your code, since this is what I'm focusing on right now.
And from your description I can't tell if there is a need for a StateMachine or not :)

Ondina
Logged

~ Ondina ~
Pages: [1]
Print