The general concept is this:
Use a cross-platform, open source browser such as Chromium as a vessel for delivering warzone.
Warzone would effectively become a sort of 'web server' (for main computational stuff) and a 'browser plugin' (for the 3D in-game stuff) bundled with a tweaked Chromium browser (which from this point on I'll refer to as WZBrowser) that users download to their computer.
WZBrowser would have it's tabs, menus and other UI stuff that's not relevant to WZ hidden (that stuff could be displayed if WZBrowser is launched in developer mode).
When user loads WZBrowser, a default web page is shown - basically a HTML/JS version of the Main Menu. All of the standard screens in Warzone would be deployed this way - single player, multi-player, tutorial, options, etc. This would allow extreme customisation of all the 2D "screens" in WZ.
WZBrowser would make some useful objects/functions/etc, available to scripts running on the pages.
For example, an "options" object:
Code: Select all
// pseudo code
warzone.options = {
game: {
difficulty: <getter/setter>,
scrollSpeed: <getter/setter>,
.... etc ....
},
graphics: {...},
video: {...},
audio: {...},
mouse: {...},
keyboard: {...}
}
When it comes to launching a game (from a web page that lets the user set up the game), it's just a simple call to:
Code: Select all
warzone.newGame(
map, // URL to map
players[...], // an array of players and their starting positions
NO_SCAVENGERS,
LOW_OIL,
CAMP_BASE,
ALLIANCES_TEAMS
);
Scripts running during a game would be launched in their own browser tabs. This might seem insane at first, but consider that this allows, in developer mode (where tabs are visible to user), AIs and other scripts to render out status information as HTML. It lets the developer use Chromium's profiling and debugging tools and JS console on their scripts = much faster script development, debugging and tuning.
Furthermore, outside of a game, scripts could come with their own "set-up screens" (a web page showing options relevant to the script) allowing users to customise various script settings via a nice UI. Want to change the research path on that AI you've been playing against?
Now, a browser brings lots of other stuff to the table as well...
For example, a screen could display a custom view of the add-ons database at addons.wz2100.net and allow single click install/upgrade/uninstall. It could make it nice and easy for users to rate and comment on add-ons, directly from within WZBrowser.
Forums could be displayed directly within WZBrowser, the guide could be showin in WZBrowser. WZBrowser would be your one-stop-shop for all things warzone, blending seamlessly the stuff you've got on your local machine (the game itself) and online stuff (forums, addons, etc).
Browsers obviously have a herd of networking stuff built in - a ready made platform for replacing the current netcode?
WZBrowser would also need a "file server" bundling with it. I put that in quotes because actually it would be a very simple web server that is only capable of serving files up to WZBrowser, and enabling WZBrowser to save files to it. This would facilitate the way mods are handled, and storing of savegames, etc. It would do that sort of "mods overlay" thing - where a mod in my user directory sort of overrides files of the same name in the same folder locations in base.wz.
It sounds insane concept on first read. But have a think about it... it starts to make more and more sense IMHO.