This is a good article about Mafia Wars recently, specially with all flash stuff in Mafia Wars. Read this article carefully.
“I am going to make a bold but potentially dangerous statement here regarding Mafia Wars. They ought to redo the entire thing to be in Flash. I say that for the reasons of consistency and quality purposes. It would certainly make for a significantly richer UI. However, knowing the nature of public sites first hand and the headaches inherit with them, and how Zynga goes about things, this potentially problematic based on the implementation.
Take for instance the panel on your home page to help people with jobs. I question anymore if it functions as it seemed to function previously, but not consistently. There is a news feed that tells you if someone needs help. If someone needs help with a job as of a few minutes ago, it doesn’t show in the tool panel done in Flash.
We have two issues going on with this implementation. For one, we have two different sets of logic. We have one logic for the news feed, and we have some other thing going on in the Flash control. If you had the entire thing in Flash, you could have one piece of logic and take care of both areas with the same Flash object. You’d have something very consistent, and it would be a case of this works or doesn’t. The catch is you have to implement it properly.
Here is another case of where this would be of benefit. There are cases in which it has become obvious that the presentation tier ends up being the cache for certain things. It shouldn’t be that way. The logic here is such that the objective is to reduce database calls. You shouldn’t be reducing functionality as a result.
When you update certain things on the presentation side of things (what you visually see), you need to be sure that’s in sync with your database. There are a few ways of going about that. Which way is best is quite arguable to say the least. The point is, it needs to be done sooner or later in some way, shape, or form.
The problem with Zynga now is that you have at least the potential for a page to have one aspect that uses some convoluted java logic to interact with the database, and then you have some other set of convoluted logic living in a Flash object that lives somewhere else. That Flash object may have to initiate a cascade type set of events to have a properly functioning game. So what happens is this. You now have a case of a Flash object trying to dictate how something elsewhere on the page should behave. You could have the inverse case, and it may not necessarily work or be implentable.
Assume you could go into Mafia Wars, and see something entirely done in Flash-and working. Right now working would be a milestone in itself. They could have a lot richer interface, and a lot more consistency if they did it right. That consistency would resolve a great deal of issues that we experience by the minute with this game.
Here is the danger with doing this. They still have no understanding of a solid architecture. Currently, all they do is they have a web tier, and they implement various forms of spaghetti in some script. Then they have additional spaghetti on their database. They simply tie the spaghetti together, and voila! You have one huge mess in which nothing works right. It takes forever to find anything as you can’t necessarily trace things so readily. You get a lot of people who aren’t too thrilled with it either.
Here is typically what happens with these public sites. They have someone who is great at marketing, and they have an idea that they want to take to market by lunch. So that person then tells some developer to implement it. What happens with this 2-tiered architecture is that you have such a tight integration of logic to the presentation that you can’t always readily change things.
So what happens? Someone comes up with a new front end. Then everything has to be almost rewritten to support this new concept that someone came up with. Then you have to start adding new things that were never there to begin with, change existing ones, scrap everything you did last week, and rewrite something else someone did 6 months ago that you never knew existed.
Zynga is in the habit of doing things like that. If they were to implement everything in all Flash, they would simply migrate the spaghetti code to be wrapped within a Flash object. You can’t scale anything like that as it doesn’t scale. You can’t necessarily reuse that logic. Cut and paste may work in the short term, but it poses a maintenance issue later.
Here is what they ought to start thinking along the lines of. Say you have all rackets or properties now in all cities. That’s great in that they’re becoming more consistent on that note. I applaud them for that. However, they need to take it a step further.
When you look at the game itself, there is no difference in logic as to how these things work. You may collect at different times for different properties. You might have different amounts of cash collected and various currency types. However, the core logic of that aspect of the game is the same.
What they ought to do is put all that logic into a business tier, and expose it as an XML endpoint with either REST/SOAP or something of the like. If they took their Flash to interpret the XML it sees, you could have one main piece of logic, and route things applicably. If you have an argument that says this is Bangkok, or NYC, etc., you could read and write data applicably. If the payouts are different for each business and such, why can’t these people write a nice little configuration file and cache it in a server? That way they have a small amount of memory that has a copy of the configuration for each city?
If they thought more in these terms and more formally from the word go, guess what? There wouldn’t have ever been that robbing glitch for one. Secondly, they already would have had the logic for robbing implemented for Bangkok, Moscow, and Cuba! For that matter, they could have had Las Vegas running by now as if they thought more in these terms.
Zynga may say they rib each other internally with quality. If they thought in more formal and consistent terms, they could accomplish more in less time with fewer issues. It would also allow them to make changes more readily without a as many headaches, and they could put out a new city as fast as they could get the graphics done and make the numbers work.”
Source : Joe Szweda Technical Editor, Article on Zynga Implementations
Tags: Flash, Mafia Wars, Zynga

Load 37 queries in 0.162 second(s).