Dec/31
2009

[This is a featured post, scroll down to access more recent entries]

Welcome back, I haven't written a tutorial in a while so I thought I would make this one worth having waited for.

The purpose of this guide is to help you, the developer, to create a networked virtual environment without having to do any coding whatsoever. It goes without saying that the fastest methods of content creation are usually the best when working as an independent professional (or even as a member of a small team). With that having been said, I'm aware that this information is highly sought after and that I could probably benefit more by selling it as an eBook. As things are however, I will be providing this information free of charge (88|) with the only cost being for the project file ($2), should any of you want it. Moving on, we need to discuss the following...

  • The difference between an authoritative server and a non-authoritative server
  • The different server solutions Unity supports
  • The SmartFox multi-user server

  • An authoritative server, understood in the context of gaming, is a process which simulates the virtual environment and updates all clients/users with objective data. As an example, if we imagine a group of physics objects colliding with one another, an authoritative server would simulate the collisions by itself and update the client(s) as changes occur whereas a non-authoritative server would simply ignore the complexities involved with the simulation and not bother updating the clients (which then leads to inconsistencies regarding what each user sees). An authoritative server is significantly more complex to create/set up than an otherwise non-authoritative version, it is also more demanding of system resources. This is an incredibly brief summary of a subject which is infinitely more complex than I have hinted at here but, for now, that's all you need to be aware of. We're going to look at a non-authoritative solution, just the very basics. Unity does have its own built-in solution for creating multi-user environments. It is, however, a bit more complex to set up than the method I am about to show you. Some alternatives to Unity's integrated solution are SmartFox, NetDog and Photon. Today, we'll be looking at SmartFox. A bit of background, to quote from the SmartFox website:

    SmartFoxServer was originally designed to specifically target Flash Player based applications and games. Thanks to its popularity it has quickly gained interest among other technologies such as Java, Director, .Net/Unity 3D etc...

    So, moving on to the first step on the next page...

    Pages: 1 · 2 · 3 · 4 · 5

    Dec/27
    2009

    Something I've neglected to mention is the fact that I did succeed in getting a multi-user environment set up inside Unity. There are a number of solutions available, insofar as the server is concerned, and I decided to go with SmartFox. The only real reason being that it was quick to set up and I don't have a lot of time to create one from scratch. You can read more about the SmartFox server software here. It might seem overkill, considering it was actually designed to support MMOs and not meant for smaller scale projects, but it does the job.

    The video below shows the app in action, I'll upload a browser based version of the multi-user environment at a later date. I'm not sure how the University feels about people seeing this stuff at such an early stage of development. The character models are from turbosquid and have been modified.

    More soon. ;]

    Dec/06
    2009

    Apologies for the lack of entries, I'm currently busy with teaching and doing my masters. I promise to write up a few more tutorials over the coming holiday season and I have plans to write a small e-book detailing how to use Unity 3D, the different lighting solutions the program supports and a more advanced shader tutorial.

    I'm currently building a haunted house as part of another project I'm doing. I can't reveal too much as I need to protect my ideas. B)

    This could potentially end up being a multi-user environment (now that I've got net code down), but its real purpose is to scare the pants off people. Below is a small preview of a scene designed to lull the user into a false sense of security.

    Since Unity added real-time ambient occlusion, the results you can get with the lighting are phenomenal. The problem is that it kills your machine, the hit to performance is massive. Considering my implementation of Unity has always involved the web browser, I need to make sure I don't put too much strain on the GPU. To that end, I'm still working with lightmaps for the moment.

    You can make intelligent use of the real-time light sources, using layers, but short of that you really do need a good GPU.

    More soon!

    Edit: Included a small video.

    Nov/02
    2009

    A few days ago Unity 3D was made free. You read correctly, as of version 2.6 you don't have to pay a penny if you want to develop with this engine now. Some of you are no doubt scratching your heads so let's get down to what this means...

  • If you bought an indie license for Unity in the last 60 days you can get a refund
  • Only the indie version of Unity 3D is free, the pro version you still need to pay for
  • Most of the new features in 2.6 will only work with the professional version of Unity
  • As of version 2.6, Unity Pro now supports full real-time ambient occlusion
  • Windows Web Player can now be installed by non-administrator users

  • Normally I'd be a little more sensationalistic in my writing, but this is an extremely important step for Unity and demands to be treated with reverance. This is a great service to the community and, of equal importance, an extremely smart business decision. In the past I've written about how developing standards is important on the web, and the difficulties involved with getting everyone to use a particular 3D plugin. With the authoring environment now being free, the rate of adoption is going to sky rocket, again. The first major increase Unity saw in their sales was when they released a Windows version of the authoring environment (it originally being a mac only program), the company benefited from 100% growth in just a few months. Within 48 hours of Unity 2.6 being announced, 6,500 new developers signed up. Unity 3D know that Google are also developing a 3D plugin (Google O3D). By growing their user base, they have guaranteed an influx of new content in the near future. It means that the rate of plugin adoption is going to soar. They are on the verge of establishing a real standard for 3D content on the web. Something to look forward to, for me, is a further increase in traffic to this site. It'll be interesting to see how this change affects the online community. Rest assured that the age of browser based 3D gaming has arrived.

    Nov/01
    2009

    I know I haven't updated my blog in a while, primarily because I'm currently doing my masters in a part-time capacity whilst still holding a full time job. Every week we're asked to create a piece to do with a given theme. This time it was on the subject of portraits. As I'm more of an environment artist I threw together the scene below (youtube).

    Again, I'm using Unity 3D for this and, if you have the webplayer installed, you can view it by clicking here.

    Modelled with Google Sketchup and lightmapped with the light-up plugin (Vray is great but it takes a while to set up).

    More to come soon. I have a few more pieces of work to upload.

    Sep/02
    2009

    I was planning on writing up another tutorial today but decided to take a time out to bring you some interesting statistics regarding the Unity 3D plugin. These are all from the third quarter of 2009.

    If you remember the days when Unity was a mac only authoring environment, there was some opposition to bringing it to windows. While it was always able to publish content to the Microsoft OS, everything had to be made on a mac. Since it came to windows (only a few months ago), sales of Unity have doubled (100% growth).

    While no one outside the company has exact details regarding the number of plugin installs, some Unity staff have hinted that, as of writing, it is in the 8 figure range with around a million installs a month.

    The following stats are based on system information at the time the plugin was downloaded.


    Interestingly, Vista is catching up to XP, not that it affects how you work. Admittedly, I'm still using Windows XP and am intending to skip vista altogether if I can. Of more importance are the stats below. Here we can see which shader model (for Windows users) plugin users have. It's important to make sure that, when publishing your content to the web, that it's likely to run on peoples machines. Thankfully, Unity has a useful little tool which allows you to emulate older graphics hardware ('edit' > 'graphics emulation'). From there you can see if your shaders are likely to be visible on older machines.


    Something else which is good know are the most common desktop resolutions of plugin users. Widescreen resolutions are doing quite well, but a lot of people are still using 1024x768. This isn't an issue for me as, these days, I design my webplayers to expand to the full width and height of the browser window.

    That just about covers it. The moment that the concrete number of plugin installs becomes available, I'll be sure to update the blog.

    Update

    The following comment was made yesterday by Aras Pranckevičius, a Unity developer. Having two staff commenting on these statistics gives the numbers a little more credence.

    Comment from: Aras Pranckevičius [Visitor] · http://aras-p.info
    The number of web player installs is about 14 million since 2008 February. We don't have definite number of installs that were before that.

    Thank you to Aras for for confirming the figures.

    Thanks for your time and happy dev'ing!