Posts Tagged ‘Unity3d’
Oken: The story of a canceled indie game project.
Posted by Daniel Rodríguez in Projects on February 28th, 2010
Last year I had the pleasure of working on Oken, a game that was supposed to released this January. It is a classic sidescroller with a couple of interesting game mechanics that got canceled. A canceled indie game project, here is the story:
Lune and I decided that we needed to create games ASAP, indie games. We knew that we weren’t going to create the next GTA, but we wanted to create, to be able to show something we have done, something to be proud of. We started Oken out of an old idea back in my days at 3dmx. We had a project there called PreyInsight (please look here, all the art is Lune’s), we always liked the idea of creating a game of a tiger, so we redesigned the idea from scratch, created our main character and decided to create a game. We invited 3 of our students to join the team, Carlos for the art department (guided by Lune); Alan and Adrian for programming (guided by me) and the Dorian, our sound designer/composer.
The Oken team:
- Lune (http://lunecheetah.deviantart.com/)
- Alan Gaspar
- Adrian Gil
- Carlos Junior Ramirez
- Dorian Mastin (http://www.dorianmastin.com/)
- Daniel Rodríguez ( that’s me! )
We also had the help of Netic (Ernesto Ruiz Velasco, http://netic-ck.deviantart.com/) who created some 3d assets for the game. Great job!
All the assets I am sharing here were already shared on the Facebook page for the project. You cannot imagine the amount of artwork created by Lune and Carlos for this game (enemy concepts, 3d models, millions of textures, even powerpoint presentations), but I think it’s their choice if they want to publish them (and where). Of course this space will always be open for them.
Dorian created awesome music for this game too! Please listen to the Oken Menu Theme. He also created ambient sounds for the first level, among other great sound assets.
The game was being developed using the Unity3d game engine, a great software for game development. We decided to use it because it was cheap (now it’s free) and because we knew it very well. We created great code too, including a character state manager system and a camera interpolation system (yes, we will be sharing the code with the world very soon).
So, the interesting question is: Why is Oken canceled?
It is difficult to answer.
I’ve been thinking of this for a very long time now. I can only think of one think that wen’t wrong: Our people skills. Lune and I were trying to get things done, we wanted to create a great game. Nonetheless, I believe we were unable to provide all the support the team needed as we were full time workers and Oken was only a hobby project. The team slowly loosed it’s energy, it’s will, and it’s professional perspective. We let personal stuff get in the way and at the end, it was impossible for us to work on this game. We decided that our friendship was more important, so we paused the project. A couple of months later I wanted to start developing again, but the the team was way to busy on other stuff (great stuff, like the short film Junior is preparing).
This teach me a lot.
I now want to share how the game looked like in it’s final stage. We made 2 builds, the first one is a test level designed to test and tune Oken’s movements, the second it’s our first level (on a early stage, it needed a lot of tunning).
(Move with arrows, attack with “z” (early combat implementation))
Please note that the game was never optimized for the web and that it really is in a very early stage. Still, you can see that the movement of the character works great. Oken was supposed to have combos and the game mechanics included an “aura system”.
All of our work behind the game can be seen on the public Assembla site for Oken. As you can see, we created a lot of documentation for the game (we were going for the real thing!). The wiki contains detailed information about the game mechanics and there are some visual assets there too!
It is very sad that Oken didn’t really worked out as we expected, but, the story won’t end there. Every single member of the Oken team is working on new great stuff. While Lune has a lot of projects (too many to list them here), Carlos is working on that short film, Adrian and Alan are working on the adaptation of their game Amnesia to the Unity engine, I am working on another game for the web with a couple of friends (new team). The game is gonna be announced on this blog very soon.
I hope the story of this project is useful to someone else. We need to always remember that the technical issues of a project can always be solved, but what really destroys projects is the lack of communication and time. The people needs to feel great working on the project, they must be motivated, and it’s everybody’s job to keep it that way. Never forget about the people you are working with.
TransformUtilities
Posted by Daniel Rodríguez in Game development, Programming on February 6th, 2010
Hello. I’ve been working on a set of four tools to aid in the Unity3d development. After using Unity for a while I encountered the classic problem of needing to copy the position of an object over and over. This led me to create the “Copy” tool. I’ve found a similar script on the Unify community, but I wanted to extend the tool. It is now possible to copy position, rotation and scale of any axis you want. Also, the values apply to all objects selected in the scene.
After that, and inspired by the tools I found on the Gamebryo Lightspeed editor, I created the Randomize and Add Noise tools. Those tools work almost the same, the randomize the position, rotation of scale of any object selected (or all objects selected). The difference is that while Randomize sets the absolute values for position, rotation or scale, Add noise adds a delta to the current value of the transform. This is useful for example to randomize the Y rotation of all the trees in your level, or to make a bunch of boxes look more natural by not being perfectly aligned.
Finally, after been learning Autodesk 3ds Max, I created the Align tool inspired by a tool in that software. It basically takes a source transform, just like the Copy tool, then uses it’s collider and the collider of the object (or objects) selected to align it. You can align for example, the minimum point of your selection with the maximum point of your source (what you are aligning to) to place an object over another. It let’s you align using the minimum point, maximum point, the center of the object or the pivot point on both the selection and the source. You can align on all 3 axis.
To use these tool, all you need to do is download the script file, and add it into a folder named Editor in your project’s Asset folder. Once compiled by Unity you find the new functionality in Window -> TransformUtilities, or simply press Ctrl+t (Cmd+t for Mac users)
Developed by Daniel Rodríguez (Seth Illgard) in January 2010
Hope you find them useful, and please let me know how can I improve theses tools.
Coroutines in Unity3d (C# version)
Posted by Daniel Rodríguez in Programming on January 23rd, 2010
Coroutines in C# work the same way that they do in Javascript (UnityScript), the only difference is that they require more typing (they have a slightly more complicated syntax). You should see the blog post on Javascript coroutines first.
Here, I present the differences:
Coroutines must have the IEnumerator return type:
IEnumerator MyCoroutine()
{
//This is a coroutine
}
To invoke a coroutine you must do it using the StartCoroutine method:
public class MyScript : MonoBehaviour
{
void Start()
{
StartCoroutine(MyCoroutine());
}
IEnumerator MyCoroutine()
{
//This is a coroutine
}
}
The yield statement becomes yield return in C# :
IEnumerator MyCoroutine()
{
DoSomething();
yield return 0; //Wait one frame, the 0 here is only because we need to return an IEnumerable
DoSomethingElse();
}
Remember that we need to return an IEnumerable, so the Javascript yield; becomes yield return 0; in C#
Also, since C# requires you to use the new operator to create objects, if you want to use WaitForSeconds you have to use it like this:
IEnumerator MyCoroutine()
{
DoSomething();
yield return new WaitForSeconds(2.0f); //Wait 2 seconds
DoSomethingElse();
}
Happy coroutining
Coroutines in Unity3d (Javascript version)
Posted by Daniel Rodríguez in Programming on January 22nd, 2010
I’ve been working with Unity3d for some time now and I couldn’t really make good use of the coroutines because I was unable to truly understand them. After some time playing with them and making some experiments I realized their true power. I couldn’t believe what I was missing! So, a couple of fellow game devs asked me to explain the concept to them. I decided that a blog post was the perfect way to do it and, at the same time, share this with everyone.
Coroutines: Special type of functions(in the programming sense) that allows to stop it’s own execution until certain condition is met.
A coroutine looks like this (on javascript, the C# version is here):
function MyCoroutine()
{
DoSomething():
yield; //Mystery here
DoSomethingElse();
}
When you invoke this function (start the coroutine) it will behave just like any other normal function you have ever seen, until it reaches the yield instruction. The yield instruction explained: The yield instruction works like a return statement in the sense that it stops the execution of the function and returns control to the code that invoked that function. The main difference is that the yield instruction lets you delay the execution of the code that is after it (in the last example, the DoSomethingElse() statement).
function MyCoroutine()
{
DoSomething(): //Do this immediately
yield; //Return control to the caller
DoSomethingElse(); //This will be executed one frame later
}
void Start()
{
MyCoroutine();
}
What happens if you have more code after the MyCoroutine call? Let’s see an example with some prints:
function MyCoroutine()
{
print("This is printed second");
yield; //Return control to the Start function
print("This is printed one fourth, exactly one frame after the third");
}
void Start()
{
print("This is printed first");
MyCoroutine();
print("This is printed third");
}
You can control when do the code after the yield instruction will be executed. It depends on the parameter of the yield instruction, according to the following table
Nothing: It will wait one frame
Another coroutine invocation: It will wait until the invoked coroutine finishes execution
A WaitForSeconds object: It will wait certain amount of time
Confused? Here are the examples:
function MyCoroutine()
{
DoSomething(): //Do this immediately
yield WaitForSeconds(2); //Return control to the caller
DoSomethingElse(); //This will be executed 2 seconds after
}
void Start()
{
MyCoroutine();
}
function MyCoroutine()
{
DoSomething(): //Do this immediately
yield MyOtherCoroutine(); //Go and execute MyOtherCoroutine!
DoSomethingElse(); //This will be executed after MyOtherCoroutine finished execution
}
function MyOtherCoroutine()
{
DoStuff(): //Do this immediately
yield WaitForSeconds(2); //Return control to the caller (in this case the Start function)
DoMoreStuff(); //This will be executed 2 seconds after
//MyOtherCoroutine finishes execution here
}
void Start()
{
MyCoroutine();
}
As you can see, coroutines are very powerful and easy to use once you understand how they work. I will post some usage examples and the C# version of the scripts on this post soon.
Introduction to Game Development and Unity3d
Posted by Daniel Rodríguez in Game development on November 19th, 2009
Today I was invited to the UVM University to give a workshop on game development using Unity3d. For that purpose I created a small presentation that you can find in pdf format here: Introduction to game development and Unity3d.
It is a very basic introduction, but I hope you like it.
Status update: New blog about Unity3d
Posted by Daniel Rodríguez in Blog on September 13th, 2009
Hi there fellow gamedevs!
So, how things are going? Well. I am building 3 games using Unity3d, and the development of AutumnFall (a Flash game engine developed in ActionScript 3) is gonna be restarted in 3 weeks. Pretty cool!
Which games? Ok. One is an [NDA, NDA, NDA!] with [NDA, NDA!] combined with [NDA]. I’m working on that at work. The second is a game prototype I’m building for the ImmUnity challenge launched by Muse Games. The third is Oken, and independent 2d sidescroller I’m building with some friends.
So, since I’m doing that much Unity3d work, the people behind InfiniteUnity3d invited me to start up a blog that focuses on Unity3d, which you can find here.
Hope you’ll find both blogs interesting.



