| The Shiva3D game engine - simplifying Linux game development |
|
| Wednesday, 05 May 2010 08:25 |
|
The original prototype of Keepers was developed in C++ using the impressive Irrlicht engine, in a frenzied 24 hours of coding spread across three sessions. The purpose of the prototype was to demonstrate what I intended to do if I won the competition, but the code itself was a bit bodgey, as it was setup to be a framework into which I could insert the final code, once proper development began. The weekend before the winners were announced I began the process of moving to a desktop platform, away from the Ares handheld. This meant that it was time to begin work on some final code, and to make life easier, I decided to use Box2D to give the world gravity to make the platforming bits easier to code. It seemed like a good idea at the time, but many hours later, while trying to figure out yet another bizarre physics problem, I realised that finishing Keepers was going to take a very, very long time. I'd spent more than a week, on-and-off, just trying to get Box2D to behave, and it was clear that once I'd tamed that beast, I would have to move on to do the same for an audio library, a networking library, an AI library, and who knows what else. Each of these libraries would would need to be compiled, added to the project, then the quirks would have to be discovered and dealt with through trial and error. And, if I was able to overcome all that, I'd then have to figure out how to move all this to different platforms, since I wanted to produce at least a Windows version. Then again, I'm also interested in Android, and development on that platform is in Java, which would mean figuring everything out from scratch, all over again. So much work, and for such a simple project!! What about a game engine?I was recently introduced to the idea of using a game engine to speed up development. There's loads of them out there, amongst which Torque 3D (rumored to be buggy) and Unity 3D are amongst the most popular. Some engines support Linux, but few commercial ones do. Torque did have a Linux version some years ago, but they palmed it off on a phantom "community" so it withered and died. I looked at all the current alternatives, and In the end, my choice was quite easy, since there's actually only one engine that supports both Linux and Android. Shiva3DShiva3D is the creation of a strangely named French company called Stonetrip. It supports a bewildering array of platforms, including, but not limited to Linux 32bit and 64bit, Android, Apple Mac, iPhone/iPad, Windows, Wii, XBox 360 and there's even a browser plugin for Firefox, IE, Safari, Chrome and Opera, though the plugin doesn't as yet work with 64bit Linux. I've been reliably informed that a 64bit Linux plugin is on it's way, for version 1.9, which is due in the next few months. The reason that Shiva can support so many platforms is that games are developed inside a custom IDE after which all the logic and media in the project is bundled up into a single package for distribution. The package is then executed on the target platform using a native code runtime.
Shiva 3D comes in three flavous, PLE, Unlimited and Advanced. The PLE (which is free to try) and Unlimited editions offer all the tools necessary to develop a game, with the only difference being that the PLE version can't compile the game into a final package for distribution. The Advanced edition offers additional tools such as a performance analyser. There's also a dedicated network server package for writing games such as MMO's, which supports a large number of simultaneous connections, though the Unlimited and Advanced edition do include tools for creating basic networked games. Additionally, both the Unlimited and Advanced editions permit royalty free distribution of games, so you won't be gouged if you try to go commercial. Despite Shiva supporting Linux as a run-time target, at this stage, the IDE is Windows or Mac only. Version 2 of Shiva3D, due out late this year, is going to support all three platforms for development. In the meantime there are workarounds for this little problem, including Virtual Box and dual booting. Virtual BoxI've been a long-time VMWare user, and have pretty much ignored Virtual Box, so I was quite surprised to see how far it's come when I installed it recently. I'd even go as far as saying that I think it's better than VMWare since there's no need to compile every time there's a new kernel and it certainly seems less glitchy. It was an even bigger revelation to discover that Virtual Box supports hardware acceleration for 2D and 3D applications. Although games are a bit hit and miss when vitualised, it turns out that the Shiva 3D engine works very well, resulting in a drastic performance improvement when using with the IDE. it's even possible to run Shiva games virtualised, though they will be nowhere near as fast as running them native. I tried out a few of the demo games, including The Hunt, which is a graphically impressive 3D shooter. While vritualised it only managed a few frames per second, which is quite impressive since running on my normal Ubuntu desktop maxed it out at around 30 fps. Although The Hunt was quite slow, simpler games ran very quickly inside Virtual Box and were largely indistinguishable from running them natively. I'd have to say that virtualising Shiva is suitable stop-gap measure until the fabled version 2.0 is released. Virtual Box tipsHere's a few of tips you might find useful if you plan to virtualise Shiva3D.
Try it out for yourselfI'll admit it. I was quite impressed by Shiva3D, hence this long spiel. I was even more impressed by the responsiveness of the developers in the forum and the fact that they are taking Linux seriously as a target platform. This led me to try out the PLE edition, and finally to purchase my own copy of the unlimited edition to hopefully produce a few games with, including Keepers and other ideas I have swimming around in my noggin. Of course, it's one thing for me to say Shiva is the "bees knees", and another for you to see it in action for yourself. For Windows, Mac, and Linux 32bit users, you can simply navigate to the Stonetrip site and try out some demos right now, in this very browser. Linux 64bit users (I'm one) will either have to wait a bit longer for the 64bit browser plugin, or you have can download the demo package and run it from your desktop after installing the native code runtime from here. Unfortunately, the demo files aren't listed on the Stonetrip site for individual download, but I can at least direct you towards the most impressive of the bunch, The Hunt. Be warned, you'll need a beefy PC to play The Hunt at a reasonable frame rate. If you are at all interested in developing cross-platform 3D applications, then you should check out the PLE edition of the IDE, it's free to try. blog comments powered by Disqus |

