Is unity the right environment for my hobby game?

I have a hobby project going on and am looking for 3D engines for the next step. But the requirements are a little unusual, specifically:

  • Most of the game content will be procedural - meshes, textures, etc. A lot will be created by the player during play.
  • The game world is in space, and is infinitely scalable, so I likely need to be able to downsample meshes as the player zooms out and more items are on screen. (or just replace them with icons when they’re too small).
  • I’d really like to do as much of the work as possible - scripting, UI, etc. - in a “fun” language. For me that means Ruby or Lua, though I’m open to learning new ones. That means the engine doing all the graphics work, and me dropping back to C++ or Java only when necessary for speed.
  • I do nearly all my coding work on a mac, and would rather avoid having to work in virtualization if possible.
  • A lot of engines’ dev kits look like a 3D design stage. Because it’s procedural, my tasks will be 99% coding rather than 3d design and placement.
  • I’d prefer an OSS engine, but it’s not a dealbreaker
  • Id like to be able to deploy to as many environments as possible. Tablets/mobile would be awesome … but again not a deal-breaker.

So how does Unity stack up against this list of wants? I’m asking around on the fora just because most engines’ tutorials are entirely focussed towards traditional 3D level-driven games. Load a level file or external static meshes, render the level, etc. The suitability of an engine for procedural content is really hard to tell from the website.

I started the project in Lua, using the 2D engine Löve. It was fun, but as I started to render 3D elements by hand in Lua it became painfully slow. Clearly I need a decent engine.

Thanks for any advice!

Simple answer: the engine used a variant of JavaScript and C# as its languages. As a result, it fits your criteria in every way except programming language choice.

You could use Boo. The other options are Unityscript and C#. There is no option to use C++ or Java at all, unless you buy Unity Pro and use plugins, but even if you have Pro you don’t usually use plugins except for specific cases. Speed is generally not a concern though.

Not OSS, though you can buy a source code license under certain circumstances (read: $$$).

Everything else is “yes” though.

–Eric

To answer all your questions with one answer:

If you know how to do all those things you’ve mentioned the engine is of less importance. I find XNA superior for low level access, but you do have to do a bit of extra work. But it doesn’t lock you down the same way Unity does, you are in much more control. XNA also has a c# implementation/binding so its a lot easier than C++. If you use a library like DigitalRune, you will save yourself a lot of the laborious work to make GUIs, libraries, scripting, etc. I’m sure you already researched this but that’s what I would use.

Except the “deploy to as many targets as possible” requirement makes XNA fairly useless in this case, not to mention “I do nearly all my coding work on a mac, and would rather avoid having to work in virtualization.”

–Eric

Haven’t heard of XNA, I’ll have to look it up. The other options i’ve been investigating primarily are Irrlicht, Ogre, and Panda3D. Thanks for the tip.

Update: Just looked up XNA … right, it’s microsoft-only, which would be why it hadn’t come up in my previous research. Probably not suitable for me.

Actually, playing with it last night I found it runs smack into my 5th bullet: I open Unity, I get a world editor / 3D stage, not a development SDK. The tutorials are all about how to add 3D objects … I have no objects to add, I want to write code that generates them. Even the script tutorial explains only how to attach behavior scripts to an existing object.

This all gives me no starting place - any tips on how to get started with Unity where what I want to do is pure coding, starting with world generation?

p.s. The Javascript is actually tempting. Personally I’m not a fan of the language, but in my other life I’m a web developer so I need to be getting better at it anyway. Doing something fun with it might be the way…

You can use XNA for a mac.

I’ve used those engines and they are also quite powerful but not as easy as XNA.

@CrazySi - XNA isn’t well supported on OSX. There’s several opensource projects to run XNA in mono, such as monoxna, but all have several issues.

@OP - Unity3d is NOT what you’re looking for. You didn’t even have to come into the forum to figure that out… just looking at screen-shots should have rang bells. Why’d you even come in here to ask this question?

Actually, it’s not obvious. Just because the project presents its editor as the front end, doesn’t mean it isn’t a perfectly good environment for a code-driven game … it may just not be obvious how to use it that way. I came in to ask to be sure, because it sounds like a very good option with respect to multiplatform deployment. Better than other ones on that front, so I wanted to understand it as well as possible before making a decision.

Actually it is because just by looking at the screenshots and basic description you would have known the answers to most the questions you asked.

Especially that about what platforms are supported
if it’s open-source
what “fun” languages it uses
etc

Don’t be lazy, and actually do a little reading of the supplied information before wasting other people’s time.

Kinda harsh…

OP Look up Torque3D not sure if that will suit your needs but they just released the engine open source so you can modify the engine to fit your needs…

Seriously? Don’t be a dick. Last time I checked this was a forum where people asked questions and other people answered them.

OP - the Unity Editor isn’t an IDE in and of itself. It comes bundled with MonoDevelop which works on Mac. I’ve heard there are other options but, as I run Windows, I just use Visual Studio. While a lot of the tutorials are geared towards using the Editor to build levels and objects there is absolutely nothing stopping you from doing it via code. The API documentation for such things is generally very good and, despite lordofduct’s best efforts to display otherwise, the community here is more than willing to help out when you run into problems.

Simply add an empty game object to the scene that start your code. Then you can do everything you want from code.

Actually, someone wrote a little library recently that was all about doing things from code instead of the editor. I forgot the name of it now, though.

I suck at graphics, but I’m great at programming, so I have ONLY used Unity to create procedurally generated content.
Like wccrawford mentioned, I have an empty ‘level’ game object where I have scripts that generate the level mesh at runtime.

For my latest game, I design my levels in the Tiled Level Editor, read the level XML file at game start, then procedurally generate the level mesh (using a chunk technique, each 5x5 tile section is one chunk mesh), along with the texture UVs. This keeps my game files small, plus easy for a programmer to wrap his/her head around. My game scene in Unity looks very bare. I only have a camera, plus a golf ball, lights, etc, no other models. (I’m adding 2D sprites now using ‘2D ToolKit’, so that will add one game object per sprite).

You should also define materials, plus physics materials ahead of time (you could define these procedurally too if you really wanted to!). You could code your scripts to allow you to drag in a material from your project files, or hard code the material file. My first attempts at Unity, I hard coded everything, but now I’m trying to warm up to the ‘Unity way’ of doing things and trying my hand at dragging my assets into my scripts. I like it better for organization, plus I can quickly try something without changing any code.

I so far only have about 20 to 30 hours development time into my game, and you can check out my very early results at the web demo:
(My water is procedurally generated too, along with my crappy wave animation, which I’m working on rewriting now.)
https://dl.dropbox.com/u/1979274/CubeGolf/WebPlayer/WebPlayer.html

It is perfectly doable to create a game entirely from scripts. You should have a look at Procedural example project here. That shows a little bit of what you can do to create procedural stuff from code.

Thanks particularly to wccrawford, slydog, and EdgeT … this was the info I needed. From that I’ll probably do a small procedural test project in Unity, along with the other engines on my shortlist (ogre, irrlicht, and panda3d) to see if i can get a sense of where I’d like to end up.

Appreciate it!

Not really. Plus there are lots of other platforms that Unity runs on that XNA does not.

Yes it is. The stuff I do tends to be procedural and I spend a lot more time reading/writing code than I do in the Unity editor.

–Eric