Page 1 of 1

Technical Question..

PostPosted: Mon Jun 17, 2013 12:36 pm
by xspeedballx
Dev Peeps,

I am not sure if you are willing to answer this or not(perfectly cool if you are not) but I have been playing around with Unity development lately, mostly just poking and developing a mechanic at a time with wide open goals. I had remembered once you talking about switching over from game maker because Unity is much more robust, but I also remember you talking about the challenges with it being a 3D engine and getting the camera to do you want you.

Is this game utilizing the GUI with layers entirely? Or are there sprites/textures on 3D surfaces? I ask purely out curiosity at various approaches that can be taken with the engine..

Re: Technical Question..

PostPosted: Mon Jun 17, 2013 2:18 pm
by Nurator
Try Orthello2D, it helps a LOT if you use 2D in unity :)

Re: Technical Question..

PostPosted: Mon Jun 17, 2013 2:21 pm
by xspeedballx
Personally I am not sure I want to stick with 2D.. though currently I am just messing around with ideas.. setting small goals and learning as I achieve them. I have a few game ideas that I am sort working widely towards. I will definitely check that out though since I did have a few largely 2D ideas as well so having a place to start is cool.

Re: Technical Question..

PostPosted: Mon Jun 17, 2013 4:59 pm
by dislekcia
We don't use any GUI elements, Unity's GUI stuff is horribly slow and it's mostly built around using weird side-effect-style code to manage it. It might be better in 4, but we haven't switch away from 3.7 yet.

In-game we just use textured quads for all our sprites. Transparency ordering is done via z depth. The stuff that we found hard was generating geometry on the fly and navigating Unity's texture/material system. Once we figured that out it's quite simple to use :)

Re: Technical Question..

PostPosted: Tue Jun 18, 2013 6:21 pm
by Nurator
You dont use GUI for text? How do you display it then?

Re: Technical Question..

PostPosted: Tue Jun 18, 2013 11:27 pm
by dislekcia
There's a Unity construct called a TextMesh. We use that to display text as textured quads in the game world itself, there are a couple of issues with TextMesh, like making sure that when you dynamically create text you don't leak materials into Unity's memory ether and spending the time to align your text on the pixel-level, especially if it moves around.

Re: Technical Question..

PostPosted: Wed Jun 19, 2013 3:11 pm
by xspeedballx
Hmm that Orthello2D referenced being to create "Text" sprites on the fly that could be used as text pop ups. It probably utilizes a similar process though I have not dug into that.

Re: Technical Question..

PostPosted: Wed Jun 19, 2013 4:21 pm
by Nurator
Orthello2D even uses a sprite sheet for your alphabet, so you can use crazy symbols and still just write it in plain text :)

Re: Technical Question..

PostPosted: Wed Jun 19, 2013 9:50 pm
by dislekcia
Pretty much all text systems in games come down to using sprite sheets for fonts. Unity does this automatically for the specific fonts you set up in it ;)

A lot of the time people used to spend on graphics engines was related to rendering text as sprites, figuring out kerning information from fonts, that sort of thing.