25 August 2010
By cjcurrie
Hi everyone,
Here is another Pre-Alpha build, wherein we're demoing a lot of the core gameplay of Containment. Note that you can't right-click in the attached web player (we're working on a fix that doesn't involve Screen.lockCursor), so here are some direct download links:
Windows build (14mb)
Mac Intel build (14.7mb)
Controls
- WASD moves the mech
- Mouse aims the mech
- LMB fires equipped ranged weapons
- RMB swings equipped melee weapon
- Shift+LMB fires special weapon 1
- Shift+RMZB fired special weapon 2
- Spacebar activates jet packs/booster packs
- i opens the inventory
- Middle mouse button OR ctrl+RMB changes the camera view
24 August 2010
By cjcurrie
This tutorial describes how to create a simple and performant RPG-oriented inventory system
Part I: Introduction and Adding Items
An inventory system is a central part of any RPG, and thanks to multiple inheritance and Unity's GUI, it isn't too terribly difficult to design and implement. There are likely several approaches to creating a functional, fast inventory system, but I'm going to outline here an approach that's worked for me several times before.
Note: All code in this article is written in C#, but includes no application-critical functionality that can't be written in Javascript as well. Please leave questions on Javascript adaptations in the comments section.
What this tutorial will include:
- An item class used to store information about pickups
- A "pickup" event that triggers the addition of items
- An inventory GUI for displaying items
- A tooltip for displaying information about items
- A set of tools for managing the inventory
Things this tutorial will omit:
- "Using" items - We won't discuss item use here, since that's outside the scope of an inventory
- "Equipping" items - This is also outside the scope of this tutorial
- "Combining" items or otherwise using them on each other - I get a lot of requests for this, but the system required is too complex to discuss here
22 August 2010
By cjcurrie
In Unity 3D we have Component.GetComponentInChildren(Type type, bool includeInactive), which returns a component of type type in the called component or any of its children. But how do we do the same thing for the component or the component's ancestors? Unity doesn't have anything built-in for that, but with a few lines of code you can get an equal, almost as performant result.
Put this code in script MyScript:
-
public static Component GetComponentInAncestor(Transform obj, System.Type type)
-
{
-
Component toReturn;
-
Transform lookIn = obj;
-
bool look = true;
-
-
while (look)
-
{
-
toReturn = (DamageReceiver)lookIn.GetComponent(type);
-
if (toReturn) // We found it, we're done
-
{
-
look = false;
-
return toReturn;
-
}
-
else // Look higher in the tree
-
{
-
if (lookIn.parent)
-
lookIn = lookIn.parent;
-
else // Well, we're out of parents, so return null
17 August 2010
By cjcurrie
Baracuda771 writes,
>Could you maybe post some how-to's or possibly some Q and A about Unity's free features and how to utilize the most of the Indie version of Unity as opposed to the paid version?
I'm going to answer a question that's a little bit different by discussing what Pro is/does that Indie isn't/doesn't. A full list of Indie's features can be found here, and trying to discuss them all would be like publishing another Mario game - just another rehash. We'll start with a little background.
16 August 2010
By cjcurrie
We are officially nine days into the development of our small sci-fi shoot-em-up, Containment, and already we have a fair amount to show for our efforts.
- A small level building set, with models and textures enough to create a few levels.
- A full movement and third-person camera control system.
- Fast-paced combat system.
- Complex loot system, including random loot tables, random weighted drops, and equippable items.
- A hud and player deaths/respawning.
- Intra- and extra-level teleporters.
As you can see, we've come a long ways in just a little over a week, and we're totally stoked to see how far we can come in another.
A test scene from the latest build:

Our concept-in-progress of the main character:
16 August 2010
By cjcurrie
Feel free to use the contact link to the right or at the top to send in a blog topic request. Alternatively, you can post comments on the blogs themselves.