Unity 4.3, the salvation?

Hey folks.

Unity 3d, the more I play with this software, the more I love it. And today, I have really more reasons to.

I was visiting the Unity forums, reading stuff here and there, when I found a topic about Unite 2013, describing the arrival of a new 2D workflow integrated into the upcoming Unity 4.3 version, and… Oh my… I yelled all over the house in an extreme pulse of joy.

See for yourself :

In summary :
– full integrated support for sprites,
– support for multiple sprites from the same image
– support for layering the sprites with filter selection
– direct use of sprite’s textures with a single material by the new SpriteRenderer
– new animation system with really recall me the animation workflow from Adobe After Effect

This new 2D workflow will avoid me to think for a solid custom rendering system or to spend money in an existing 2D workflow from the Asset Store.

In two words : F*** Yeah!

Thank you Unity3d.

‘Time’ is on our side!

Hey folks.

We want Excellence to be a shoot’em up with a great ambiance, full of events and animations. For this, we need to have a way to synchronize all those events together. I remembered how I loved to play with some movie editing and FX tool, like Adobe Premiere and Adobe After Effect.

From this, I took time to write a script to have a timeline, on wich one I could easily control the evolution of my events and other parameters. This is the base of how the stages will be built, and will surely evolve to be even better. :]

timeline

How does it works? The spawns are simple gameObject that “awake” all their children at the right time. Pretty simple but damn useful. The “curves” are some parameters, generated from a simple Timeline Element script, attached to the object we want to animate with. The values of the curves are then retrieved within the object scripts. Each curve are editable individually, can be foldout and their key frames are movable by a simple click.

The magic come from the way the camera is updated in real-time when changing the cursors position on the timeline. It will be a great tool to work with!

Keep looking for other cool things in the future. :]

You like sprites? You will love them animated.

Hey folks.

A lot of time passed since the last news, many things happened on my side but today I can share some stuff with you.

During that time, we swapped back to our custom C++ engine, then again to Unity. The hardest for a programmer with Unity is to switch from a programming language where we can do anything we want anytime we need, to a scripting language where we do it faster but with constraints.

Well, at last, we’ll stay on Unity. After many tutorials, questions on Unity website and a bit of motivation, this tool gives me many more satisfaction I didn’t have before. And for some proof, here is one of the basic tool I could develop as an extension to the editor : the animated sprites.

In all the sprite editor I saw on the web and the Unity’s Asset Store, each have their own way to sort the base frames to create the final animated sprite. The great majority just put the frame one after another, using some strange Drag and Drop mechanism, or even less. It do the work, but it appears hard to work efficiently on complex animated sprites. That’s why I though it would be better to do our own animated sprite system.

In summary, I needed :
– A complete animated sprite system, covering all the need we have about animation.
– An time based system (instead of frame per frame), allowing to play the animation any speed we want, backward of forward.
– Including tools to rapidly implement basic tilesheets.
– Pre-generating the meshes used as sprite to avoid them generated on run-time, performance-wise.
– Accepting multiple animations for one animated sprite, allowing us to swap animation when needed.
– Allowing easy interaction with C# scripts.

And after a couple of days of research and intense scripting, here we go :
animationEditor

Pretty complicated stuff huh? Well, not that hard.
The Sprite Animation script inherit from ScriptableObject, allowing us to save them in the project window (4). I added a MenuItem to create them as a standard asset. The animation doesn’t have an inspector like other assets. Instead, I wanted it to be in an editor window to have the needed space. We can open the editor with the Open button (5) in the inspector of the current animation or open it with the Excellence menu in the menu bar.

Once the sprite is created, we assign it our sprite sheet, saved as a material in the material field in frame (1). Then we create and move the frames in the Timeline (7) and edit each with the Frame Edit (2). A preview of the sprite sheet and the current edited frame appear in the Frame View (6). Once the frames are created, we sort them with the Timeline’s curve (7). I need the system to be close to the timeline of 3D Studio MAX, working frame per frame on the Editor but being able to play the animation any speed we need later. For a classic sprite sheet like the one on the screen, it is not that useful as the curve will be a simple line going from top-left to bottom-right, but if I want to use this system later for, per example, a fighting game, it will allow me to place some pauses in the animation or repeat the same frame multiple time (like Chun-Li repeated kick. :D ), etc.
Once the animation is ready, we click the Compile button (1) to generate the meshes.

Then, we need to use the newly created animation, and for that we need the Animated Sprite.

animatedSpriteEditor

In an empty GameObject, we add the Animated Sprite script. It automatically add the Mesh Renderer and Mesh Filter. Of course, we need those two components to render our sprite in the game, but also in the editor scene. Then you have to add at least one Animator. The animator tells how the animation will be “read”. We can add as much animator as we need, but only one is read at the time. Standard animator (1) simply read the animation from the first to last frame within a given duration, with a loop option. Linked animator (2) allow to link the animation to a variable. In the game, it is useful to rotate our enemies, like Pods and Buggies, giving the angles they are facing to. Targeted animator (3) gives a frame we want to display, and a cursor parse the animation back or forth until the desired frame is reached. It is the system used to display the player ship, as it will roll at its own speed with going left and right.

At last, to allow a good interaction with the scripts, the Animated Sprite object got some function to get and set the parameters at will. Those parameters are the same displayed in the inspector, marked as “not saved”.

public class MyObject : MonoBehaviour
{
public AnimatedSprite sprite;

void Start()
{
// We retrieve the animated sprite attached to the game object
sprite = GetComponent (typeof(AnimatedSprite)) as AnimatedSprite;
}

void Update()
{
// For a Standard animator, we can know if the animation is finished (in condition the animator don't loop)
bool isDone = sprite.GetBool("Done");

// For a Linked animator, we can give it the desired frame as an alpha value or an angle.
// The next 3 lines will set the frame to the middle of the animation.
sprite.SetFloat("Alpha", 0.5f);
sprite.SetFloat("Degree", 180f);
sprite.SetFloat ("Radian", Mathf.PI);

// For the Targeted Animator, we can set the target frame and get the initial frame.
sprite.SetFloat ("Target", 0f); // Target the first frame of the animation
sprite.SetFloat ("Target", 1f); // Target the last frame of the animation
sprite.SetFloat ("Target", sprite.GetFloat ("InitialTarget")); // Target the initial frame.

// A call to setFloat with an unknown parameter name will simply be ignored. It avoid to have multiple if statement to known wich type of animator we are dealing with when passing a parameter.

// We can reset the sprite to retrieve the initial state. Each animator have its own way to be reset.
sprite.ResetAnimators();

// And at last, we can select the desired animator by setting its index.
sprite.currentAnimatorIndex = 1;
}
}

Annnnd that’s it! We now have a powerful tool to create cool animated sprites rendered in the editor scene view! If you are curious about the system, feel free to post a comment. :]

Until next time!

We’re not dead!

Hello there!

It feels good to come back to the country after a year oversea. I just passed this year working at Montreal for Gameloft and I want to say this : there is no better cure to motivate you to work on your personal project that work for the first time in a video game company. :]

Great experience, great luck, great people, great country. Now back to our dream, back to Excellence!

After a year, I learned a thing : working yourself on a whole game editor will not help you create a game. You will create… an editor, instead. So damn you C++, damn you SFML and Qt! (they are still great libraries!) I bought a license for Unity 3D Pro, and all our work will continue with it.

Yeah, I already tried Unity, it didn’t convince me at first, but now, it’s for real, it’s serious.

This slideshow requires JavaScript.

Now what?

I’m integrating all the cool things I made in my engine to Unity and am working to recover the previous visuals and gameplay. The shaders are slowly returning back, the sounds are still missing and the collisions are so-so. Niiico did an awesome work during this year on the graphics and models. (Check his work below!) Sadly, we didn’t get in touch with Alex yet, I hope he’s doing fine right now.

The visuals are fine, but the most important things is the gameplay. Even after 2 years of work from time to time, we don’t have yet decided of a final gameplay. It slow me down a bit on the programing side, as I have implemented some cool missiles, but I don’t know what to do with them. :(

So here’s the deal : We are looking for someone willing to join us as Game Designer / Level designer!

Fate will tell us who will have this chance, but be sure we’ll inform you as soon as we found someone!

Stay tuned, the journey continues.

Moving in and moving on your mobiles.

Hey folks,

While Niiico and Alex kept adding contents to the game, I was pretty busy. A month ago, I moved to Montreal – Canada for work, and now, I’m a proud Game Programmer at Gameloft. Needless to say I’m happy of my new job. :]

But what Gameloft have to do with Excellence? Well, not many things, except I won’t be able to release the game while I’m working there. Yeah, it’s some bad news, I must admit.

BUT, It give me more time to think about Excellence, and the last ideas are not to displease yourself. Laurent Gomilla, the author of SFML, is finalizing the last release of its 2D graphic API, making it more flexible, and he implied that OpenGL ES would be the next addition to SFML, extending the compatible device to all OpenGL ES compatible smartphone, meaning Apple’s Iphone and Google’s Android!

So yeah, in addition of the PC release, a port to Iphone and Android mobiles are now in the process queue.

I’ll have plenty of gameplay and ergonomic ideas for theses. :)

Well, I first have to finish the game engine when Laurent will release the new SFML 2.0 revision. during that time, I’ll finish to install myself in this gorgeous city that is Montréal. :D

To the next news!

(I change the comments settings to make them easier to post. Feel free to write a little word!)

Software architecture

Hi folks.

I found some time to write a post, so here it is!

There is no better way to begin than start by the beginning : how did I organize the project and what library did I used?

SFML

Well, It isn’t a surprise if I tell you I’m using SFML as the base for the software. What is SFML and why did I used it?

I partially answered in the Project Page. SFML is a multimedia library that allow a fine and easy use of 2D features and primitives through OpenGL. It allow to draw 2D stuff with the benefice of hardware acceleration. But it is not all it can do. SFML give also access to nice shaders effect, True Type Fonts, windowing, input management, sound and network features.
The main point of SFML is that it is Simple (first ‘S’ for SFML). It is designed to be used by beginners as by more advanced programmers, and it really suits me.

Excellence Engine

SFML is the base. It allow to have access to low-level features. But I need something more efficient and complicated to create a good quality game. No existing engine proposed enough 2D features for my needs, so I need to create my own engine. I started Excellence Engine (or ExEngine) as a supplemental layer, a level above SFML. I gave it many useful things, as features to manage my game screens, game resources (images, sounds, …), my graphical assets (animations, shaders, rendering), display operation (resolution, aspect ratio) efficiently, in addition with math and physics functions, GUI support and debug tools. Well, the engine is still in “Work in progress” state, as I continue to add stuff I’ll need later in the game development. I’ll write some specific posts about ExEngine later.

Excellence Editor

The benefits of writing ExEngine is to prepare the future of the game following Excellence, having smaller compilation time and smaller bug fixes to download, but also to easily do a kind of bridge between the game and its editor; because it is nearly impossible to create a good game without a proper level editor.

Excellence Editor (or ExEd) will allow me to manage my resources, my objects and my level with some standardized stuff thanks to the ExEngine. I mean, nearly all classes of ExEngine will have their proper editor in ExEd. I use Qt 4.7 for the editor GUI. I could have used another GUI library as wxWidget, but I’m particularly interested by the Graphics View module de Qt to create good-looking editors, and most of all, a fast and intuitive level editor.

At last, here is a little drawing of the global architecture of the Excellence project :

Excellence software architecture

Excellence software architecture