Frayed Knights 2 - Working With Unity 3D

Myrthos

Cave Canem
Administrator
Joined
August 30, 2006
Messages
11,223
The Rampant Coyote is sharing with us his insights on using the Unity 3D engine for Frayed Knights 2, which are fairly positive.
The Unity scripting system is very easy to use once you get a “feel” for it – which might take a while. There are a few libraries to get familiar with, and some critical components to be aware of (things like Time, Transform, Mathf, and Camera are pretty critical off the bat). But at it’s core, Unity deals with GameObjects – a base class for all objects – which are object-oriented containers for components – behaviors and characteristics.
In practice, it’s pretty straightforward. You have an object. Want to make it player controlled? Link in a player control component. Want to make it visible? Link in a mesh renderer using whatever player mesh you want. Want it to leave a trail behind it? Link in a trail component. For more complex objects, your game object can have a number of “children” objects, all with their own components. It’s powerful and elegant. And of course, much of your job as a programmer is creating these components.
Once I got into the swing of things, I quickly found that a lot of the way things were designed pretty consistently – which means to me that I could predict with decent accuracy how I expect Unity to handle things I needed to do. I felt like it was designed the way I would have designed it. This makes navigating the system much easier – when I’m trying to figure out how to do something, I simply think of how I, as a programmer, would have set it up, and go hunting for a function that sounds right. Four out of five times, I nail it. This is perhaps a subjective aspect of Unity, but it makes things a lot easier and more fun for me. It just makes sense and feels right.
In addition there is some in-game footage of Frayed Knights 2 showing a software bug.
Free bonus (and worth every penny…)! Since I’m doing a lot of work with dungeon geometry generated in run-time, I can get some weird effects that hit the entire dungeon. This was 100% a “me” bug, not a Unity problem, but I just thought I’d share. The problem is when I flagged certain areas as being water. It worked well – except for sections of the dungeon (which I deem “blocks” – a 20 meter x 20 meter square area) with no water. There, the water didn’t get initialized, and decided to turn all the floors of the “default” material into running water instead.
So it looks like I left the water running in my dungeon.

More information.
 
Joined
Aug 30, 2006
Messages
11,223
I'd like to stress that this video barely even counts as a "work in progress." It's kind of a scratch-pad area with stand-in content that I use for testing pieces of the technology as I bring it all together.
 
Joined
Oct 9, 2007
Messages
624
Gratz on your progress!

That said, more water please, literally and figuratively. A water spell, called the Squirts causing all orifices to start squirting water. Just cause it sounds rather annoying. :biggrin:
 
Joined
Oct 18, 2006
Messages
2,772
You are a sick, sick person, Acleacius.

Perhaps you are now qualified to be a game designer. ;)
 
Last edited:
Joined
Oct 9, 2007
Messages
624
That said, more water please, literally and figuratively. A water spell, called the Squirts causing all orifices to start squirting water. Just cause it sounds rather annoying. :biggrin:

I really love that, actually ... reminds me of 'Blood Boil' from VtM: Bloodlines. You could have it level up from starting with the enemy peeing itself, then water out every orifice which immobilizes but does no damage, and so on ...
 
Joined
Oct 18, 2006
Messages
14,953
Sadly, that would require identifying the holes on all of the monster models for the graphical effect, and to be perfectly honest I'm not sure if I'd want to know where all of them are...
 
Joined
Oct 9, 2007
Messages
624
Sadly, that would require identifying the holes on all of the monster models for the graphical effect, and to be perfectly honest I'm not sure if I'd want to know where all of them are…

You have thought about this way too deeply ... :)
 
Joined
Oct 18, 2006
Messages
14,953
Lmao, can't believe orifice locations aren't important enough to detail!
 
Joined
Oct 18, 2006
Messages
2,772
Lmao, can't believe orifice locations aren't important enough to detail!

Why can I see this being described by someone with a low gravelly voice for the next dark&gritty XBOne game ...

You can feel the ground shake, you can hear the pain in their screams, and you can see the water pouring from every orifice ... coming 2014
 
Joined
Oct 18, 2006
Messages
14,953
Rofl, earth shattering Squirts overtake Troll who deluges the party in "something really vial and nasty, unlike whipcream!
 
Joined
Oct 18, 2006
Messages
2,772
I tried it a lot sooner than this guy did and discarded it pretty quickly.

It doesn't have great performance but it's a lot less of a clunky junker than Torque and it's easy to use. Unfortunately it's a very limiting engine, especially for making an RPG. That's why the forums are a million techno illiterate goobers, that's the target audience.

Great for casual games but you are not going to make an RPG without compromising. If you wonder why there's no grid based inventory in WL 2, it's because it's not practical to make one in Unity. You simply can't directly draw anything in 2D. It's still theoretically possible but not without a ton of work.
 
Joined
Apr 10, 2011
Messages
777
I tried it a lot sooner than this guy did and discarded it pretty quickly.

It doesn't have great performance but it's a lot less of a clunky junker than Torque and it's easy to use. Unfortunately it's a very limiting engine, especially for making an RPG. That's why the forums are a million techno illiterate goobers, that's the target audience.

Great for casual games but you are not going to make an RPG without compromising. If you wonder why there's no grid based inventory in WL 2, it's because it's not practical to make one in Unity. You simply can't directly draw anything in 2D. It's still theoretically possible but not without a ton of work.

Or you can spend a little money…
http://www.youtube.com/watch?v=KyOEwoXf-6k

What are you working on, ManWhoJaped?
 
Joined
Oct 18, 2006
Messages
3,508
I think it's an RPG where an evil organisation called The Codex is out to take over the world and only the virtuous heroes who collectively call themselves The Watch are able to stand against them. You take the roll of the newest recruit and must then rise to the occasion!! :)
 
Joined
Aug 31, 2006
Messages
12,826
Location
Australia
Why can I see this being described by someone with a low gravelly voice for the next dark&gritty XBOne game …
Water wouldn't work for that, you would need a mixture of mud and sand so it can be dark and gritty.
 
Joined
Aug 3, 2008
Messages
8,256
Location
Kansas City
The Geatest Game Ever. Not much point to say more until you can play a demo which will hopefully be in this lifetime.

I think it's an RPG where an evil organisation called The Codex is out to take over the world and only the virtuous heroes who collectively call themselves The Watch are able to stand against them. You take the roll of the newest recruit and must then rise to the occasion!! :)

Nah that's the sick game that they play, or anyway a couple misguided fools who have a history of messing with whoever they can.
 
Joined
Apr 10, 2011
Messages
777
Back
Top Bottom