16
\$\begingroup\$

I'm curious to know the workflow when creating a game in Unity3D?

Does it generate a lot of code for you?

My understanding is that you describe the game in Unity and do scripting on the back end to do the logic. Kind of like you use Unity to describe the puppets and you use a scripting language as the puppet master.

\$\endgroup\$
2

6 Answers 6

18
\$\begingroup\$

Unity3D consists of a game engine plus a (fairly rudimentary) 3D editor. It provides meshes, textures, shaders, terrain, cameras, animations, particle systems, audio samples, and other kinds of object that are useful in video games. It includes PHYSX (a proprietary physics engine owned by Nvidia), and Mono (the open source implementation of the Common Language Runtime, aka .NET).

How much of this you use is up to you. You can represent all your data structures as Unity objects, build your world in Unity's editor, turn on the physics, and let events take their course, with a minimum of scripting. Alternatively, you could turn off the physics engine, construct your world algorithmically, and explicitly program all the behaviour and physics of the objects.

You can choose to program behaviour entirely in Mono (using one of the languages C#, JavaScript, or Boo), or you can write it in another language and link it with your Unity project. (The actual integration with the game objects must be via Mono, but this can be a fairly thin layer if you like.)

The workflow is much the same as with any game engine. Artists make models and textures and animations, audio specialists make the sounds, programmers write shaders and behaviour.

The community of Unity programmers is very helpful, both at answers.unity3d.com and forum.unity3d.com. (And maybe here at Stack Exchange?)

The best way to find out is to try it out: the basic version is free, and you get a 30-day trial period for the "Pro" version.

\$\endgroup\$
6
\$\begingroup\$

Unity3D is more of a wrapper/library than a 'drag and drop' game engine. It doesn't generate code nor does it come with 'off-the-shelf' scripts.

For example, Unreal has a default first person camera, character controller, collision detection and AI.

You have none of that in Unity3D. What you get from Unity3D is a game loop, component-based entity system, a comprehensive math library, means to load media, handling of meshes, camera, immediate mode GUI, shaders, rendering pipeline and other low level functionality. Plus a nice editor. You just have to worry about high level functionality. For example, you still have to code your own first person camera (if you are not using the default one). However, you do not need to deal with calculating the look-at vectors and such.

Unity3D doesn't generate any code for your game, strictly (It does generate code for running your game, to be more accurate, but none for your gameplay)

You will have to use the API to define your game. You can look at the examples that come with Unity3D and re-uses those code; there are a couple of pre-defined scripts, but usually you have to customize those to meet your needs.

You create the game through scripting; you write scripts for behaviours, design the level in Unity3D, and assign those behaviours to entities (or game-objects). It's very flexible, but it still requires effort to write a game. I would compare it to Flash for 3D.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ This statement is incorrect: "Unreal has a default first person camera, character controller, collision detection and AI. You have none of that in Unity3D" \$\endgroup\$
    – jcurrie33
    Commented Nov 14, 2010 at 12:23
  • 8
    \$\begingroup\$ In fact, Unity includes components for all of these functionalities built in, and many more as downloadable plugins. You do have to customize and code to get specific functionality, but you can come super close to fully-functional with a combination of these components. It's not quite as fleshed out as Unreal though because you don't start off with a functional gun, but I personally think it's easier to get a game in general (non FPS) going in Unity. A lot of this is semantics though - you do need to actually program to get anything going. \$\endgroup\$
    – jcurrie33
    Commented Nov 14, 2010 at 12:29
  • 1
    \$\begingroup\$ Perhaps it is better to say that other game engines has a more tightly coupled sub-systems than Unity3D. When you start a new Unity3D project and does not import any of assets, you get a blank slate. Something which I consider a good thing. Perhaps this skewed my view on a little on why I think there aren't default subsystems. There are, just that they aren't suitable for the projects I have to do. And this is one of the good things about Unity3D. It's easy to leave out the default ones and code your own if you so inclined. \$\endgroup\$
    – Extrakun
    Commented Nov 15, 2010 at 6:32
3
\$\begingroup\$

The surface of Unity3D looks like it's super easy, and nearly everything is pre-build, but none of that is true. If you ignore to use already existing scripts (which exists for every engine, bad point against Unity) and plugins that you describe as somewhat ultra mighty, what they are definitely not, Unity is just an programming interface with editor.

You have most of the code by your own. I experienced that in 2 different projects.

\$\endgroup\$
2
\$\begingroup\$

The analogy with flash is quite right, but I don't really understand your analogy with puppets.

The good things about unity are:

  • cross-platform: That's a very big plus, I would say the bigger reason.
  • High-quality engine and implementation, I mean using Unity gameobjects etc.
  • Very easy to make a simple game from scratch, so that's a plus for making prototypes.

The bad things:

  • Can't link with C++ or C, so your project might only work on Unity. With C# one might argues that it will work on XNA, but C++ would have been nice. With this remark I mean that it is not a tool that veteran professionals or autodidacts would use, since you don't have a total control on your application, but this doesn't mean there are thing you can't do with Unity. On the other hand, a team with a great idea and talented artists can do awesome stuff without needing experienced programmers.
  • It's quite new, so obviously no-one knows where this tool will lead.

The thing I don't like with Unity is that it feels like all the hard work is done, so programmers are much less valuable. On the other hand it's great for quickly teaching people how to build things fast.

So to conclude: Unity (or tool like Unity) is more for artists who can't reach out to great programmers, but can still know to do a little game scripting. OF COURSE you can make a full featured game, add realistic IA, doing a mmo net-code and what not, but big companies would not use Unity.

Programming models allows one to propose a solution that suits 3/4 of development tools so that it fits to those "independents" game makers. It values one particular tool and it also values artists, but not programmers (except the ones from the unity team, of course).

Unity is a good shortcut for non-programmers, but they have to understand that video games come from lines of code, and that you can't do everything just with an awesome tool. At some point it requires to know something about low-level programming.

Having a personal project in mind, I would not use Unity, because I don't like C# or Boo (Panda is good with python, so why bother with a commercial software ?), and because if I show my project and it's done with unity, it will be much less impressive.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Commenting myself: there are also pro plugins that allows to program in C++, so theoretically, it's also a C++ engine... \$\endgroup\$
    – jokoon
    Commented Dec 9, 2010 at 13:41
1
\$\begingroup\$

Unity requires you to script, but without all the boilerplates. In a typical OpenGL game, you will need to initialize the matrices and cameras like crazy. In Unity, you create a script to tell the behavior of something, then attach it to an object to make it behave.

\$\endgroup\$
1
\$\begingroup\$

If by generate a lot of code for you , you would include pre-built functions that you can use to make your life easy regarding collision detection and rotation calculations (Library) then yes, it takes a lot of coding out of the picture and gives you optimized versions at hand and ready to go. Mostly functions that you will need specifically for Game Development in all builds.

It may sound redundant to say this , but in my experience , when Unity3D isn't busy crashing or building it's making my life easy by letting me change whatever I want and leave the Quaternion based math to the people that have a master degree in mathematics and still trust me enough to le me change whatever I want.

It will write nothing for you, rather help you out in the way it thinks is best and let you write whatever you want.

In one word, Flexible

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged .