Game Start Page                       Forum Fragoria.com

Game Dev Blog: News on Events, Updates, Bug Fixes, Future Plans

Client updates

Hi everyone! Hope you are having a great weekend.
Few days ago we’ve made some changes to optimize game loading.

To make it clear from now on lets agree on some terminology. «Client» is not what you install on your PC. Client is client-side part of game, basically — swf file, libs, configs and so on. They can be both in web (when you enter the game from the website) and standalone (the ones you install).

So when I write «client» I mean the whole thing. When I want to tell something about installable application — I’ll call it «standalone». That will help us understand each other better.

So back to the story. What we’ve made we call «versions». You see whenever you enter the game your browser is checking the files you want to download and compares them with files it has in local storage (called cache). If it does have the same file — it doesn’t download a new one from host to save traffic. On one hand it’s good, on another — every update means that we change some files on host and if browser doesn’t recognize them as new — it will not re-download them and you will have outdated version which can cause many-many problems.
To solve this issue mem-types can be used. Those are special parameters that define type of file for browser and tells if this file can be cached. We’ve been adding «force-download» type to all vital files to make sure you will have them up-to-date all the time. This solution was not perfect at all as we couldn’t set this for all files — otherwise you would be downloading thousands of files every time you load the game, and even those amount of files selected for force download were about 8 megabytes and you had to load them every single time.
Version is a whole different story. Now each file has specific «version number» which changes whenever we update it. Actually files now look like, for example, «Fragoria.swf?v=3525235». When we make an update — we will change that v=… number and your browser will recognize this file as completely new, which means it will download it but only once.
You can check results already. When you load the game for the first time — it will take rather long, but close the window and login again and you will see how fast it will happen. Those of you who have different developer tools for browser can also check how less traffic game consumes now on second, third and so on loads. I can tell you that it’s a great relief even for me as I have to enter the game hundreds of times a day and now I can make it really fast. 🙂
This feature is currently live for browser version only, standalone client will receive it a bit later.

Have a great day!
Lazarus
on behalf of

Fragoria Dev Team.