How game like farmville are made?

Started by
4 comments, last by Acharis 10 years, 2 months ago

About a month ago, I started to learn AS3 and I was able to make some simple games so far. But I do not understand however, why Facebook games like Farmville are constructed of multiple files .swf. I understand the point of classes, objects, files like .swc, .as3, .fla, etc..

Can anyone explain or give me an idea of ??this kind of game? How they integrate and why use so much swf file.

Advertisement

flex ?

SaurabhTorne thank for yours answer. But, flex how? biggrin.png you mean the Flex SDK or Flex project? Because the games that I've created are based on Flex SDK, but are ActionScript projects. I tried to convert my action scripts projects in flex project but I think i'm doing unnecessary and useless things. Plus, in the end i get only a single swf biggrin.png.

PHP+MySQL+HTML.

And then change HTML to Flash and you have Farmville :)

Flash, Flex, Unity3D, HTML5, JavaScript, Java, these are just renderers & interface frontpages for these games. All the logic and fucntionality is hidden on the server side PHP.


why Facebook games like Farmville are constructed of multiple files .swf.
Because these are just like "images" or "animations" (with some logic). There is no ActionScript behind it (except for handling interface, sort of like AJAX). It's more convenient to do these this way, especially since they never will interact with each other (it all goes to/from the server, no communication between flash files).

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

So to understand this. All animations are done in html, java and flash without action-script. And all functions are written in PHP and the data stored in MySQL? Yes, it is logical. Thank for yours reply.

So to understand this. All animations are done in html, java and flash without action-script. And all functions are written in PHP and the data stored in MySQL? Yes, it is logical. Thank for yours reply.

Yes.

Althrough, I lied a bit (for the sake of being clear :D), you can code part of it in AS (BattleOn had a whole battle system written on client side). But... here we are entering the realm of client side vs server side processing. It's more convenient and faster to drop as many calculations as possible on the client side (Flash/AS) but it breeds security concerns (the player can easily cheat, and trust me, they will try to cheat, always), so you want to move as much of important/vurnelable calculations on the server side. But, since it's still very tempting to use client side you might want to evaluate the risk vs reward (like, if you have a casual game where players are unlikely to download a hacked version of flash to connect to your server side code, or if the offect of cheating is non devastating or otherwise time consuming you might consider doing it on the client side).

Anyway, that's more advanced stuff you can deliberate on much later. For a beginner PHP as server side with all calculations and Flash as a renderer is a good rule of thumb.

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

This topic is closed to new replies.

Advertisement