Sunday, January 24, 2010

3D and the Open Web

This post is a call for feedback, about Syntensity's engine (the Intensity Engine) being used on the web. The basic idea is that we - people on the web - should avoid what happened with Flash, a single vendor controlling a closed technology, which became the de facto standard for video and interactive content for many years. Instead, we need an open source solution, not controlled by any one corporation. I think the Intensity Engine is close to being suitable for that, and am looking for feedback on this idea, and help in achieving it.

A big part of the success of the web is its openness: We can run websites on any of several webservers, some of them open source (Apache, lighttpd, nginx, etc.), and visit those websites using likewise open source web browsers (Firefox, Chromium, etc.). That's an amazing achievement. And let's not forget that just a few years ago Internet Explorer was dangerously close to a choke hold on the web browser side.

Video, these days, is often in the tech news: Specifically, using open, standardized technologies to play video on the web, using HTML5. There are some problems along the way, but overall we might be close to getting past video on the web being entirely reliant on Flash - a closed-source product controlled by a single company, and one that doesn't necessarily perform as well or the same on all platforms.

Here I'd like to talk about the "3D Web". The term was overhyped in the past, but really all I mean here is 3D content, mainly games and virtual worlds, that are accessible on the web. This is currently a smaller area than the web in general, or even video on the web, but it is growing in importance. My concern is that the open web should avoid 'Flashification' of 3D content, where a single closed-source product becomes the de-facto standard in the area, like Flash had (and mostly still has) in video, 2D gaming and interactive content. If we want to avoid that, the time is now.

There are some open technologies that show promise, mainly WebGL and Google's O3D. These may well end up succeeding. However, neither is a complete game engine, like for example the Unity 3D web plugin. There is a lot more that is necessary over what is present in WebGL and O3D - physics, content creation tools, a proper API and useful libraries, network protocols (for multiplayer), etc. etc. Some of that might be added to WebGL and O3D using JavaScript. However, many games are too computationally intensive, even with the best JavaScript engines out there.

Perhaps at some point Google Native Client (NaCl) will allow running game engines on the web. But instead of entirely relying on that, I think the open web needs an open source 3D gaming engine. The time to do it is now, before something else non-open comes to dominate the field. I'd like to suggest the Intensity Engine for that purpose: It is a complete, stable, cross-platform game engine. It works right now (outside of browsers) and has been in production for several months, successfully, on syntensity.com. It is 100% open source, and the current license, the AGPL, can be modified immediately to something else, like the BSD license, if that makes sense for this purpose. Also, the Intensity Engine was built with something like the web in mind - we use JavaScript to create games (Google V8 right now, and we also did some tests with SpiderMonkey), for example. In our mind, the ability to download and run games was always in parallel to how web browsers download and run web pages.

One concrete idea among others is to port the Intensity Engine's rendering system to O3D, and build a browser plugin of the result. The benefit being O3D is already set up as a browser plugin, while the Intensity Engine provides all the other game engine stuff. Alternatively, we can just port the Intensity Engine as-is to be a web browser plugin, assuming that would work with SDL (if not, would need to work on replacing that).

So, I'm looking for feedback about this topic, and ideas and help for how to move it forward. I really feel it isn't just us over here (in 3D gaming) that care about this stuff - lots of people want the web to remain open, and that should include 3D content and games.

Thanks for your responses!

Edit: I posted on relevant mailing lists about this,

Local Storage Plugin

A new plugin has just been committed, local storage, which lets you store key-value pairs locally. It's currently being used to persist the high scores in the Racing game.

Usage:
  • Add intensity.components.local_storage to the proper place ([Components] list) in your settings.cfg, so the plugin will be loaded.
  • In your scripts, do CAPI.signalComponent('LocalStorage', 'read|KEY'); to read the value for KEY. You will get in response a string (all output from signalComponent is in string form), so do eval() on that. The result will be a list of responses from components. Normally you will have only one storage component, so just get the value at index [0].
  • To write values, do CAPI.signalComponent('LocalStorage', 'write|KEY|VALUE'); to write that KEY-VALUE pair.
That's basically it. See also the source file for some technical docs and notes.

Monday, January 18, 2010

New Forums on FreeGameDev

We have recently been given a space on the FreeGameDev Forums, which is a much better place for community discussion than our current forum page. You can check out our new forums there at this link.

Aside from a more standard and useful forum approach - subforums, topics, etc. - it also makes a lot of sense for us to do it on FreeGameDev, because we share their approach about combining free and open source software with gaming. Gaming is, sadly, one of the last areas to which open source has not yet made a big impression. Most game engines are entirely closed source, and in fact many games also run entirely on locked-down hardware (consoles).

But that isn't how things need to be, and I predict they will change. The are reasons that led to our having open source operating systems, web browsers, web servers, and so forth, that are either better than or equivalent to competing closed source products, and those reasons are essentially the same in gaming.

So, having forums as part of the FreeGameDev Forums makes a lot of sense, and I hope it will lead to more interaction between Syntensity people and other open source game creators.

Thanks to the FreeGameDev people for agreeing to host our forums there!

Sunday, January 17, 2010

Progress on Mac OS X support

Thanks to abs1nth, the client now compiles on Snow Leopard (and possibly other versions). To do so, get the latest git source and follow the OS X section in the COMPILE.txt file.

The move to CMake, and removing the external dependency on Boost, made this more feasible than before (and they also make building on Windows easier).

Friday, January 15, 2010

HOWTO: Make your own Razanak maps/levels

In Syntensity everything is moddable. That includes Razanak, the game we launched recently. Below is a step-by-step guide to starting your own Razanak-type map.

"Razanak-type map" means: Everything will be exactly the same as in Razanak - gameplay, entity types, HUD, etc. etc. - except for the map itself and entities in it. That means you can create the level however you want: You can add corridors, caverns, water, spawnpoints for the spider robots, rocket turrets, doors, keycards, pickups, and so forth, however you want. You can make levels similar to the existing one, or entirely different ones - it's up to you.

Here are the steps to follow, to prepare a new map based on Razanak:
  1. Click on Razanak in the list of running servers and activities. This gets you into the Razanak activity.
  2. Click on the map asset. This gets you into the actual asset containing the map. (You could have gone here directly if you had a link, instead of through the activity, so step 1 isn't really needed. But it's how you might usually do things.)
  3. Click 'clone'. You now have a copy of the map that you can edit, as its owner. (Note that to do this step you need to be logged in on the master website.)
  4. Change the 'location' of the asset. The location is where it will be downloaded to in the asset storage areas on the client and server. If you don't change it, it will stay the same as Razanak itself, which means that you will re-download Razanak and this map if you play one and then the other (since each such download will overwrite the one before it). Instead, change the location to something like base/USERNAME/mapname.tar.gz where USERNAME is your username (you don't need to do it that way, but it is nice and orderly).
  5. Click "Create an activity based on this asset" to create an activity. You now have an activity, which you can run on servers (assets by themselves cannot be run).
  6. Rename the activity, to something you like.
  7. Click "Requisition a server instance to run this activity". One of the Syntensity servers will then run your copy of the map. You should see it in the list of your requisitioned servers.
  8. Connect to the running server instance. The simplest way is to run the client, login, enter the lobby, and look in the side room on the right. It will have portals to all the currently running servers. Walk into the one running your new map. You should then see the familiar Razanak map load.
  9. Press 'e' to enter edit mode. You can't do that on Razanak, but you are an owner of this copy, so you can do it now.
  10. Do /clearallents. That will erase all the entities in the map. Razanak has about 1,000 entities, and some of them require CPU to manage, so after doing this you will probably see the frame rate go nicely up.
  11. Do /newmap. That will erase all the world geometry. Note that you might not see any ground at all, but don't worry about that right now. Also, the map textures have been erased, so you shouldn't try to actually do any editing right now. Just go on to the next step.
  12. Edit the map.js for your new map, as follows. You can edit it with an editor of your choice, the file is in ~/.intensityengine_client/packages/base/LOCATION-OF-YOUR-MAP (that you decided on in step 4). (Note that you should edit the map.js in the directory with the name of the location - and without .tar.gz - and not the archive ending in tar.gz.) (In Windows, replace ~ with C:\Users\USER or C:\Documents and Settings\USER, etc.). Or, you can use the in-game editor, press Escape and then editing commands...->cfg (then do 'load'). The actual editing you need to do is to add these two lines at the *top* of the very short map.js already there:

    Global.entitiesFile = './entities.json';
    Global.noCutscenes = true;

    The first line tells the map to use
    your entities data (not Razanak's), and the second tells the map not to use Razanak's cutscenes. Again, be sure to place these two lines *before* the existing line.

  13. Do 'upload map...' (press Escape first for the menu). When the upload finishes, the new version of the map will run on the server and you will be placed in it automatically.

You can now start mapping! More details about mapping and creating in general are on the wiki, and as usual feel free to ask for help on IRC (#syntensity on FreeNode) and the forum.

Tip: To get started, you might want to add a WorldMarker (press F8 in edit mode, and select WorldMarker in the second tab), for which you edit the 'tags' field (rightclick on the entity) to [start_red] (note the [, ] symbols). That will be the position where the players start ('red' is the name of the team, which should really be named something else, but the default team names are 'red' and 'blue').

Friday, January 8, 2010

Razanak a.k.a Swarm


After much work, 'Swarm' has been launched, and is in the lobby. It is now named Razanak (thanks BiosElement!), which is 'Swarm' in Hungarian (give or take a few letters).

To see all the visuals correctly, you need the 1.1.5 or 1.1.6 builds. You can currently log in with older versions, but that will be disabled very soon (possibly by the time you read this). The latest builds can be downloaded from the download page (optionally, you can also compile from source if you want). We hope to have builds with nicer installers, and for more platforms, soon.

Currently there is one (big) level, with a boss at the end (that can be quite hard to kill). We plan to add more levels soon, they should be much faster to create now that the code is all ready.

Have fun, and let us know what you think!

Monday, January 4, 2010

Help us name and test 'Swarm'

We're almost finished with 'Swarm', and we'd really appreciate some help with naming it, and playtesting. So, if you want to help, check it out here:

http://www.syntensity.com:8888/tracker/activity/view/46183c34_3b4f_44dd_9a63_4ca498603bf1/

and here is a video:



'Swarm' isn't in the lobby world yet, since it isn't finished. To test it, you need to requisition a server. If you need help in doing that, there are usually people on IRC (#syntensity on FreeNode) that can assist you.

So, as already mentioned, at this point we are looking for a final name for this map ('Swarm' is just the codename). Feel free to suggest any and all names that you think make sense!

Also, the map is ready for playtesting - everything should basically work, except for the boss at the end, which works but wasn't tested much yet. So if you find a bug or have a suggestion for how to improve something, that would be great (we probably won't change anything major at this point, though - just minor stuff. Big changes will wait for after we release the stable version of the game).

Note that a recent build of the engine is necessary, preferably from source. Otherwise the visuals might not look as good as they should. We should have new builds available soon.