Author Topic: Unity in general  (Read 7298 times)

Offline Wanderer

  • Master Member Mark II
  • *****
  • Posts: 1,579
  • If you're not drunk you're doing it wrong.
Unity in general
« on: November 16, 2012, 12:18:48 am »
Arcen: You guys are nuts.  A good kind of nuts, but nuts.

I know part of it is that I'm more VB.NET than C#/Java, so I'm having syntactical arguments, but still.  I'm working through a copy of Unity 3x Game Development by Example - Beginner's Guide.  The GUI components alone are head-smacking in the thousands of small pieces to using it, and they're about as obvious as a cricket hiding under the desk.  You know it's THERE... but WHERE?

Errr, oh, why the hell am I going head-diving into Unity?  Three reasons. 
1) Someone recently pointed out an article of game engines and Unity's price (FREE! ... until you actually can make some money) made me curious enough to dive into this engine.

2) I have a reasonable idea of what can be done with the engine by a handful of talented folks and I have a game idea that's been stuck in my head for YEARS.  Everyone does, the only game ideas that count are the implemented ones.  Well, alright then!  Unity also has the ability to port to phone app reasonably well from what I've read up on and said idea could be reasonably tweaked to an app... actually, it'd probably be BETTER as a portable app.

3) Well, crap, if I'm going to dive into a public engine, it might as well be an engine that built a game I love.  Maybe then I can read the code bursts that Keith drops off more often... and I have a reasonably friendly relationship with a professional developer in the engine if I get well and truly stuck.

Some personal views 7 chapters into the 'unity for utter morons' book I'm using.  Great book.  Holy depth.  Ignore the 'tutorial' with Zelph or whatever his name is, it's broken enough and Unity has too many changes since its last iteration.  And the bouncy camera will make you puke within 30 minutes... which I don't think it was supposed to do but I couldn't figure out how to fix it so I went to a more 'Unity for Morons' approach with my learning.  Need to learn to crawl.

I did some 3D modeling for an XCom remake awhile back so I have a little familiarity with it.  I suck at it for larger models, particularly animated ones, but stills I can do reasonably, so I have some 'friends' I'm working with when I want to goof around.  That's not the point.  Unity has so many unique elements to it that you have to learn for just this engine.  Just the empty game-object alone can take some understanding.  Its interfacing is both easy to use and a huge PITA sometimes.  There are a ton of internal components to the engine's library and just learning the object model might take me upwards of 3 months (or longer since I'm not really 4 hours a day gung ho about it, this is fun dammit... *whipcrack!*) before I can even really dive into anything more substantial than 'oh, I wonder if I can do this...'. 

However, with all of that said and done, this looks like it's a pretty damned powerful toolbox.  I have no idea if I'll ever actually build said game or not (doubtful), but it'll be an interesting trip nonetheless.

Just in case anyone was curious and hadn't had a chance to really dig into the engine.
... and then we'll have cake.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unity in general
« Reply #1 on: November 16, 2012, 07:42:19 am »
Cheers! Good luck to you, it sounds like you're at the early stages of a fun journey. :) My main comment is: unity 3d actually greatly simplifies a lot of things about game development. Most of your opening comments apply to game development as a whole, heh. Not to say unity isn't complex, but you're not having to deal with raw vertices and triangle faces and so on unless you really choose to; you're not having to worry about initialization sequences for the various directx sub-components, each of which is more than a little complex; you don't have to worry about completely resetting everything by hand whenever the fullscreen mode changes (having to do this is why so many older early-2000s games would crash on the switch); and so on and so forth.

Granted, that's shaving off like 10% of a mountain of complexity, but every bit helps. AI War started out in a completely custom engine that I wrote on top of Managed DirectX and then SlimDX over a period of about six years on and off. So I definitely have done it both ways, and prefer the unity way. :)

Again, good luck! :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Unity in general
« Reply #2 on: November 16, 2012, 11:38:47 am »
I know part of it is that I'm more VB.NET than C#/Java, so I'm having syntactical arguments, but still.
C# is superior ;)  Sorry, had to get that out of my system.  Though I'm sure it will recharge in the next 5 minutes.

Quote
I'm working through a copy of Unity 3x Game Development by Example - Beginner's Guide.
We didn't use any books (at least, I didn't) but from what you said it's helping, so that's good.

Quote
The GUI components alone are head-smacking in the thousands of small pieces to using it, and they're about as obvious as a cricket hiding under the desk.  You know it's THERE... but WHERE?
Of the parts of Unity I've used extensively, the GUI part is the one I hate most.  It's tenable enough that we used it, but the unfixable bugs just kept on coming up (largely related to textboxes, but also with display order and so on) and we almost completely removed all references to the GUI class in AVWW (and thus Valley2 and Shattered Haven; AIW hasn't been fully converted to use our new gui approach because it caused problems when we tried and we lacked time for that kind of brawl).

But that said, it is actually usable, if you're not too perfectionistic and are well practiced in the general form of "bang head against brick wall until it comes down", and if you've been programming that long I'm sure you're pretty good at that.

Quote
Unity also has the ability to port to phone app reasonably well from what I've read up on and said idea could be reasonably tweaked to an app... actually, it'd probably be BETTER as a portable app.
We've only used the PC support, Mac support, and web-browser support (for Tidalis Lite), but I have to say it's incredibly good.  Not without some pain (Tidalis's release was our first official mac support, and there were some unity bugs that did awful things... but those bugs have been fixed since then, it was the late 2.x days for unity), and since Chris handled most/all of the porting itself I'm sure he's probably less unanimous in his praise for it... but all told, the porting works, and it works well.

One thing to bear in mind when making inferences from our stuff is that we deviate substantially from the path that Unity tries to guide you down usage-wise.  I think the only GameObject's we use are:
- the camera MonoBehavior's themselves (and only one camera matters for what you see, iirc, at one point we toyed with an alternate camera for something but I'm not seeing it in the AIW code)
- the audio clip GameObject's

The graphics we handle entirely by lower-level calls (Graphics.DrawMeshNow and Graphics.DrawMesh, there was a substantial shift in what we did towards less batching, iirc, during the "Pony Incident" in AVWW's beta), since we aren't making 3D games, we're making 2D games.   Structurally it's still polys and meshes and technically 3D, etc, but the overlying assumptions are very different.


But yes, we're nuts, it's the only way we stay sanenuts :)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Unity in general
« Reply #3 on: November 16, 2012, 11:49:15 am »
Pretty interesting that technically, any N-D engine can simulate a M-D graphics model (for M <= N) by just setting the N - M dimension of your various stuff to 0 (or as low as you can go before rendering artifacts start kicking in, or the engine stops rendering your stuff), and fixing the camera to be orthogonal to the M dimensional space/plane/whatever that your actual stuff will live on.

Yea, I know in practice it tends to be more complicated than that, but mathematically it is equivalent.


Ever thought about some sort of 2.5D graphics or graphic effects? Or "layered planes" for some fancy stuff that way?

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unity in general
« Reply #4 on: November 16, 2012, 11:52:48 am »
We do layered planes all the time in our games; all the parallax effects are that. But with an orthographic perspective there's no in-engine sense of depth. That all has to come from the art.

In terms of 2.5d, that opens up a whole other can of potential bugs, new artwork challenges, etc. But it can be useful for certain effects and certain kinds of animation. We might explore that someday, but I don't have any large incentive to start messing with it honestly.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Unity in general
« Reply #5 on: November 16, 2012, 12:01:16 pm »
We do layered planes all the time in our games; all the parallax effects are that. But with an orthographic perspective there's no in-engine sense of depth. That all has to come from the art.

Oh cool. I should of figured that you already used one of the most classic uses of layered planes. :)

Quote
In terms of 2.5d, that opens up a whole other can of potential bugs, new artwork challenges, etc. But it can be useful for certain effects and certain kinds of animation. We might explore that someday, but I don't have any large incentive to start messing with it honestly.

Yea, 2.5D (ugh, horrible abuse of notation that is) you kind of have to design a game's art around, and it is tricky to make it look decent.
Plus, you don't gain all that much from it other than things like more realistic, dynamic lighting and some fun occlusion effects that would be hard to emulate with layered planes alone. Aka, cool, but ultimately doesn't help much with the gameplay (as opposed to graphics) unless you really focus the game around it. (Super Paper Mario on the Wii is one example that played around with this sort of stuff in a meaningful, gameplay related way, but sadly that sort of innovation tends to be the exception these days)




Speaking of game engines, any recommendations on Java (or at least JavaVM based aka .class file based) game engines? I know the graphics pipeline of Java used to be really terrible, but recent UI libraries have made Java actually usable for more sophisticated graphics.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Unity in general
« Reply #6 on: November 16, 2012, 12:06:12 pm »
In terms of 2.5d, that opens up a whole other can of potential bugs, new artwork challenges, etc. But it can be useful for certain effects and certain kinds of animation. We might explore that someday, but I don't have any large incentive to start messing with it honestly.
The isometric world map in Valley2 is a light form of 2.5D.  Though I guess it's all up to the definitions there.


One other thing I meant to say earlier:

3) Well, crap, if I'm going to dive into a public engine, it might as well be an engine that built a game I love.  Maybe then I can read the code bursts that Keith drops off more often...
At least 90% of the code snippets I show are completely orthogonal from the engine itself, they're just C# game logic.  When we ported Tidalis (during development) to Unity and then later AIW to Unity the vast majority of the code didn't even change at all since it was already in C#.

For that matter, a vast majority our changes to the games are so contained within the C# that we can just recompile the .dll in visual-studio/C#-express, copy that into our local test install, and test it without even having the unity environment running.  I personally keep using the unity environment for most testing because I'm chemically dependent on having line numbers in error messages, but I'm also infinitely amused that I can compile something in C# express and copy it into a mac install and it works.  The compiler doesn't know where the code's going, and the machine running the code doesn't know where it came from, but everything's happy ;)



Speaking of game engines, any recommendations on Java (or at least JavaVM based aka .class file based) game engines?
I don't recall any offhand.  Is there a particular reason you want to use Java over C#?  The syntax is quite similar.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Unity in general
« Reply #7 on: November 16, 2012, 12:14:36 pm »
Speaking of game engines, any recommendations on Java (or at least JavaVM based aka .class file based) game engines?
I don't recall any offhand.  Is there a particular reason you want to use Java over C#?  The syntax is quite similar.

Mostly because it is what I started with. (Or rather, it is the first object oriented language I started with)

Something I do admire about Java is its syntactic simplicity (well, by programming language standards). There is very little "syntactic sugar". I will admit though, this is both a blessing and a curse. It does mean that usually there is no fancy "smart" language logic making it unclear about what will do what, but at the same time, it means that you have write a bunch of stuff out "the long way" where other languages would have a syntactic sugar to psuedo-automate it for you.
However, I am not against C# either. It doesn't delve too much into the "syntactic sugar" such that it starts making code hard to follow for my tastes. (Note, FOLLOW, not read)
Sadly, the implementations of the C# (and the CLI in general) on platforms other than windows are rather lacking. Mono is OK, but sadly, it doesn't seem to be as polished yet, and the non-Windows tooling (especially IDEs) for it doesn't seem as mature yet.

Offline Mánagarmr

  • Core Member Mark V
  • *****
  • Posts: 4,272
  • if (isInRange(target)) { kill(target); }
Re: Unity in general
« Reply #8 on: November 16, 2012, 01:12:23 pm »
My definition of "2.5D" is a 3D game with a fixed camera point and no depth movement. Excellent examples would be Trine and Giana Sisters: Twisted Dreams.
Click here to get started with Mantis for Suggestions and Bug Reports.

Thank you for contributing to making the game better!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unity in general
« Reply #9 on: November 16, 2012, 01:15:12 pm »
My definition of "2.5D" is a 3D game with a fixed camera point and no depth movement. Excellent examples would be Trine and Giana Sisters: Twisted Dreams.

Agreed.  Although I would extend that to some games that use 3D characters in 2D environments, such as New Super Mario Bros.

But what we're doing in Valley 2 isn't 2.5D, it's just a 2D isometric view.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Unity in general
« Reply #10 on: November 16, 2012, 01:34:00 pm »
Sadly, the implementations of the C# (and the CLI in general) on platforms other than windows are rather lacking. Mono is OK, but sadly, it doesn't seem to be as polished yet, and the non-Windows tooling (especially IDEs) for it doesn't seem as mature yet.
Unity uses mono and it works great :)  There's a few things that aren't as good as .NET but the biggest weakness in our setup is the lack of ability to do generalized line-level profiling, and that's more a weakness of the Unity setup than the mono one (I think current versions of mono have at least the necessary basic support for this).

(edit: there's also the garbage collection hoo-ha, but that's also a more-Unity's-fault-than-Mono's thing, as Mono has moved on to a better implementation and even in the older versions we'd have had more control over the heap size and other ameliorating factors using mono directly rather than through unity)

But for developing on it, yea, you're going to want C#-express or visual studio, which means windows.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Mánagarmr

  • Core Member Mark V
  • *****
  • Posts: 4,272
  • if (isInRange(target)) { kill(target); }
Re: Unity in general
« Reply #11 on: November 16, 2012, 01:42:24 pm »
I think there's a C# plugin for Eclipse, but as far as I've understood it, Eclipse isn't very popular among anyone but hobby-programmers. Most people I know seem to prefer Visual Studio.
Click here to get started with Mantis for Suggestions and Bug Reports.

Thank you for contributing to making the game better!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unity in general
« Reply #12 on: November 16, 2012, 01:43:23 pm »
I think there's a C# plugin for Eclipse, but as far as I've understood it, Eclipse isn't very popular among anyone but hobby-programmers. Most people I know seem to prefer Visual Studio.

Also: professors.  Oh, wait, your group already covered that. ;)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Unity in general
« Reply #13 on: November 16, 2012, 01:55:25 pm »
I think there's a C# plugin for Eclipse, but as far as I've understood it, Eclipse isn't very popular among anyone but hobby-programmers. Most people I know seem to prefer Visual Studio.

Hey, I use Eclipse at my job.  :)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unity in general
« Reply #14 on: November 16, 2012, 01:57:48 pm »
Personally, I was joshing -- I know some folks that use it at Cisco, etc, too.  It's popular among Java devs in general as I understand it.  I'm just not personally a fan. :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

 

SMF spam blocked by CleanTalk