Game Development Community

Penny for your thoughts: Web deployment post install content download

by James Brad Barnette · in Torque 3D Professional · 06/12/2009 (8:30 am) · 8 replies

Ok so I have gotten my head around the fact that the web deployment is downloaded and installed. and that is fine for the initial setup. The thing that I need to figure out now is what to after the initial setup. I will have content that will be updated and content that will constantly be added on an almost daily basis.

So I wanted to see what people smarter than myself "most of you guys" thought about what would be the best method to achieve this. Originally I had thought that maybe just have a mirror of the directory structure on the server with a text file that I could up date and then when someone logged on have the system download the latest new and updated files. But I'm not sure if this is the best method and I wanted to know what you guys thought. I will be having a dedicated server and I was wondering if that would be a method for possibly pushing out updates. Basically my limitation is that I cannot be having these people run an installer every time there is an update to the content.

Thanks in advance,

James Brad Barnette

#1
06/12/2009 (9:40 am)
At what state in the game are you going to be updating the content?

If you're putting yourself into an update state and simply downloading content using the game engine, you could just do the static list as you mention.

If you want to allow the game to run but download content on the fly, you're going to have more problems. You can't update a MIS while you're in it (to my knowledge), and if the game tries to load something that doesn't exist I don't know how it's going to behave.

That would require some form of way to prioritize what content a user should be receiving based on their location.

For example, lets say you have a Lobby. You first check if the Lobby is updated, if so you will want to just have like a GUI loading screen that updates the lobby. Then the user loads into the lobby upon completion.

From there other content could begin downloading, so long as the engine doesn't launch it before it's ready.

The only issue I see is that the game engine exe/dll cannot update itself. For this you would need a launcher of some kind, that checks if the game engine has been updated and downloads the latest files. Almost like an engine that launches an engine.

To be honest I haven't looked into the web deploy stuff, but this is how I would see it being done for a standalone app.
#2
06/12/2009 (10:16 am)
As brett mentioned there's definitely a couple ways you could do this... you could look into some of the "patching" utilities/apps out there and have it run like an MMO does, before the app launches it syncs up the files.
#3
06/12/2009 (10:40 am)
Tribal Trouble does something I've never seen, but that I found amazing: it uses SVN for its updates. They integrated a SVN client in the game. The game doesn't use Torque, but I think it should be possible by using the subversion source code.

Now, indeed, updating the executable is a problem. If its possible to modify the plugin so it can unload and reload the game DLL, it should be possible to have your current game download the new DLL, then have the plugin unload the old (shutdown Torque entirely) and load the new one (re-starting the plugin) without re-starting the browser.
#4
06/12/2009 (11:57 am)
First, I would not try to use T3D's browser plugins for hosting your game in a web browser. I did something like that a couple of years ago and decided it was the wrong approach (as did Instant Action since they also use a different solution).

You should have a small browser plugin that will start another process and set that process's window to be the child of your plugin's window. That solves multiple problems, some of which is related to your question.

First, it lets you unload the game, load a binary patcher (complete with progress bar, etc) and patch the game, and then you can restart the game. Very clean, no matter how you download it (i.e. the SVN approach is nifty but more than doubles your disk footprint. Personally I use Visual Patch for patching the game binaries).

Also, when you unload Torque, it doesn't free all of the memory and other resources and your browser process is not clean (probably won't crash, but you might end up using a lot more memory than you want).

This method also allows you to host more than just your game. As stated before, you can have a separate application that patches things, but the sky is the limit.

And finally, this allows you to host more than one game in a browser at a time. Why would you want to do that? I dunno, but someone's going to want to do it and you can't with the stock T3D browser plugins.

Technically how to do it? I'm not sure on Mac or Linux (yet) but for Windows take a look at this:

Google for something like "SetParent another process" or "SetParent child parent process"

Some interesting links that will take you down the right path (it helps a whole lot more if you know the Windows API):

Code Guru
Stack Overflow
Catch22 has some tips on some of the problems encountered when using Stack Overflow's solution.
Geeks with Blogs has a subset of the solution in VB, but I think it might help a bit too.

If you want to update the game while the game is running, that's a completely different can of worms. I have a system that does it (the GOT system I'm using for my RPG genre kit) but it's not ready for prime time.
#5
06/12/2009 (3:19 pm)
The Torque 3D web deployment plugins are tiny and load/unload your game without having to cross process boundaries and without process syncronization issues... allowing you to (securely) script the game with the Javascript/TorqueScript bridge... This DOESN'T prevent you from launching external processes, unload the game to patch it, etc...


#6
06/12/2009 (3:48 pm)
I don't see anything tiny about the web plugin or deployment. I built up the FPS and it is a 174 meg deployment just to get up and running. This isn't tiny by any stretch of the imagination. The deployment kit needs to be like Microsoft where you have a 256k setup.exe and then just download on demand what you need from the server for the game.
#7
06/12/2009 (4:31 pm)
The installers/packaging (web/desktop) do not support content streaming nor do we provide a backend server for this...

The plugin binaries are themselves very small and decoupled from the engine...

You are going to have to download some amount of content and install a plugin on the end users box... this is better handled in ONE operation than installing the plugin and then having that download the content... as it is much more fragile (a simple navigation away from the page will break it). The download size is entirely dependent on content (and the FPS isn't optimized for web deployment).

The standard NSIS installer allows you to include dependencies (VS, DirectX, PhysX, etc), include installer/uninstall functionality, launch the browser post install, create desktop icons, and have some chance of getting users actually back to your site. This is the exact same methodology as used by QuakeLIVE and MANY other plugins that don't require "through the web installation" which is tricky, requires code signing (which is again different across browsers, subject to security restrictions, EXPENSIVE, etc).

The IA plugins are designed for use in a game portal which supports multiple titles using various engines. This includes code signing as they are centrally controlled/updated. The Torque 3D web plugins are designed for use with Torque 3D (with support for Javascript <-> TorqueScript, etc).

There is some more information available in this thread:

http://www.garagegames.com/community/forums/viewthread/91029/1#comment-616867




#8
06/15/2009 (6:41 am)
The plugins themselves are less than 200KB in size. The DLL is around 7MBs uncompressed, around 1.7MBs compressed. Not considering dependencies (DirectX and PhysX), that's a 2MB download. Anything other than that is game content: textures, models, sounds, music, etc. Whether or not you'll want to include that content with the game installer (default), or have the game download it by itself (needs custom solution) is up to you.

Also, the only browser that sill supports in-browser installation is Internet Explorer, and that requires copious amounts of signing otherwise your ActiveX will not even be downloaded without the user going through tons of very scary warnings (if at all). All other browsers go through "download and run the plugin installer". Even ubiquitous plugins like Flash and Unity install like that.