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

Show Posts

| * |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / General Discussion / Using State Machines - who is reponsible for state transitions? on: January 12, 2009, 08:28:40
Hey all. I know this is not _specifically_ about Pmvc, but i will be using the new StateMachine util soon, and this question relates to that...

I'm using Finite State Machines (fsm) in one of my games right now. I'm running into a problem where i don't know where/who should be responsible for triggering a state change. Should the state class itself monitor everything and determine if a state change is required, or should the "state owner" take care of that stuff?

I've got some "actors" moving around on stage, and their movement is controlled via states - walk, rest, moveTo, etc etc.

Since i'm going to be using the StateMachine Util that comes with PMVC soon, i'm going to want to know the answer in relation to that tool too...

Any suggestions would be most appreciated.

2  Announcements and General Discussion / Architecture / Cache frequently used assets... on: May 09, 2008, 10:55:31
I'm in the beginning stages of creating a game using AS3/PMVC. So far, things have been going well. One aspect of the game that i've been pondering is how to externalize the assets, but reduce the total amount of network traffic required to load the assets for each level. Since most of the assets will be re-used from level to level, i'm thinking of using the following idea. You can load the assets (in my case, swf's and bitmaps) using the URLLoader, with the dataFormat set to BINARY. This binary data would be held in a Proxy. When the level mediator needs an asset, it asks the Proxy for the Binary data. It then uses a flash.display.Loader object's loadBytes() method to "create" the instance of that asset.

I read about this on Colin Moock's blog, although he doesn't detail it (its an excerpt from his book, which i've yet to get). He also uses the Socket object, rather then the URLLoader one. I went with the URLLoader because its just so darn easy to use. 

I don't know if this is how others do it, but it seems like a good idea to me! :)

3  Announcements and General Discussion / Architecture / StartupManager Woes on: May 09, 2008, 06:10:26
Hello all.

I've being trying to get the StartupManager stuff to work correctly with little luck.

I've got the latest version of PMVC and the SM utility. I'm running Flash CS3 on WinXP. I'm using the StartupAsOrdered Demo project as a basis for my tests. Although i've had to modifiy it slightly to work in CS3.

I've got the proxy object to load, but I always get a "LOADING_FINISHED_INCOMPLETE" notification, even though i know the data is loaded. I've only added the one proxy to the monitor, so i don't know why it thinks there is more to load...

Again, i'm using the Demo as the template for what i've done so far... You can get the code here:

Any suggestions would be appreciated - i'm going to just do it "old school" with my own chain of async notifications if i can't get this working (cuz i know that that will work).

4  Announcements and General Discussion / Architecture / Game Architecture Question on: May 06, 2008, 06:51:53
I'm a new user of the PureMVC framework, although a long time user of Flash and have used the MVP/C pattern in other projects.

So. I'm in the process of designing and architecting a real-time, single player game. I'm at a bit of a loss as to where the "main loop" of the game should reside? I've got it figured where the data is - in a model/proxy, but where is the code which updates the screen every frame (looking at the data, updating moving objects, etc), assuming no user interaction. Would this live in a Mediator?

I get that each user interaction will generate an event, which will trigger commands which will then update the model/proxy... But where does the _ongoing_ process of updating the screen in real time take place... Or rather, where should that code be located?

Pages: [1]