Game Dev

First try

Well, it’s time to do some real testing now !!

I tried few things in one little level… I’d better warn you it’s not awesome, but I did it without adding a single line of code ! I just used state machines to check inputs, trigger actions, enable gravity and so on. And I think this is the cool part cause anybody could do that (even without programming skills I mean).

I did the whole thing quickly so I didn’t pay attention to gameplay (running speed is too fast, dash move is a bit weird, gravity is too high etc.), but I could tune it easily.

I found some nice sprites of Zero (you know, the character from Megaman / Rockman !). This version is from “SNK Vs Capcom”. I used it as a placeholder for the player.

In this video, you will see (there are some things I mentioned in previous posts but never showed by the way) :
– “Ghosts” for movements
– Layers : several layers with different speed.. It’s maybe too fast, but you’ll get the idea.
– Animations
– Collisions (red polygons show the collison maps. By  the way I noticed I used rectangles only, but it could be other convex or even concave polygons)
– Events (once the player reached the zone, it triggers dialog box and shader distortion)
– Shader (the distortion I added last week) -> I coded this shader before even starting my engine actually (I’ve been waiting a whole year !!)

I still have some things to do to improve collisions and I think I should add a tool to create collision maps directly in the level editor… Right now when you create a new static object you can draw a colmap for it (then it’s used for every instances of the same object). I should be able to draw something for the whole ground too. It’ll be useful and will spare some collision calculation.

I didn’t use sound nor Fx (I could… while running, jumping, and so on). It’s lame. Next time, for sure.

Here comes the Level Event Manager I did for this level :

1. I’m playing FX in loop on the event zone (the one at the end of the level ! Check the pic. on the left) while the player is not detected;
2. Once the player is there, I launch the distortion shader (I added it to a shaders bank I created and its rank is 0);
3. I change the state of the player (I created a state in which there’s no action nor move allowed);
4. I start the dialog !

I hope it looks easy, cause since I’m used to it, I love it !

Now, let’s check one of the player’s state machine ! I took the “State_Run” cause it’s not the easiest nor the most difficult to understand ! The “State_Jump” is the worst actually.

The yellow branch is the “Entering condition” for the states who allowed the “State_Run” as a next possible state (actually, only the “State_Idle” does), don’t forget !

1. In green you see the next possible states (double click to enable/disable !). It means, while running you’ve got gravity (“Gravity” is not a real state, I just use the entering condition branch to trigger an impulse every frame), you can kneel, jump, or dash.
2. Playing the Run action from the player’s Action Bank.

Looks like everything is working well. I encountered some bugs here and there but nothing hard to fix so far. I’ll try to use the same level and add things one by one till I’m able to try every single part of my editor. I still have : lights, fx, sound… And things I didn’t even mentioned like rain effect, projectiles and material system (to trigger a specific fx/sound on different objects collision). There’s still some work before starting a real game, but it’s getting closer and closer. Yeah !

Game Dev

Level Event Manager !

Oh Yeah !

I finally did it. It’s working ! It’s easy to use ! It’s so cool ! Maybe you don’t even know yet what I’m talking about, but this feature is the one I’ve been thinking about for a looong time.

It enables me to manage the different events in a level : Let’s say “Level Event Manager” or “LEM”.

For example : You need to trigger an event when the character reach a place (like door opening, objects falling, birds flying, or whatever…) :

The blue rectangle is the event zone (the size is editable of course). First you need to make the player move, then trigger an event once the player’s position is in the zone.

Here I did a simple state machine (on the left) for my player : Pressing the right button makes the player move to the right.

The LEM (on the right) and the State Machine just look alike. Actually, the LEM is based on a great part of my State Machine code. Then, it wasn’t so hard to create it. The event automate for this simple level is easy to understand I guess. Once the level is started, the Event zone will check if the player is detected. If the condition is true, then the player will get a vertical speed.

I added some colors to be able to follow the events in real time (well, using C# delegate/events) :

(Before and after detection)

I’ve been working for almost a year on this soft, I’m glad to see my motivations didn’t even changed a bit. Now, my editor is almost complete (well, according to what I want to do before starting). Only the text display functions remain. I’ll do that tomorrow. And this week end I should be able to start a simple game.

Game Dev



I’ve been working on several things these days. But the most boring one is REFACTORING… Since I keep on adding stuffs here and there, I can’t help noticing some codes don’t do the job anymore.
Right now I’m refactoring my Action serialization due to the bones  I added. Before, the actions were saved in the object itself. Now, I can save it separatly based on bones IDs. It’ll make my animations usable for different objects (if their bone IDs match). This is something I can’t really put on my planning. Will I be able to finish this engine one day ? Of course. Don’t ask when, though. 🙂

I started to integrate an other engine for FX : Mercury. Yeah, after working with Krypton I realized it’s better to rely on some external tools if I wish to complete my project in this life.

Here comes a little video about how Krypton lights can be added/edited in my engine. I tried to show other simple stuffs since it’s my first video. But I’ll try to do some more videos to show collisions, animations, state machines and so on when I’m done with animation refactoring and FX integration.

Sorry for the low quality… I added some rotating objects at the end of the video but I just noticed when I “Run” the scene it looks like a glitch due to the low FPS of the video and the default rotating speed I put (quite fast). I picked the worst compression ever to be able to host it on Youtube quickly, I’ll be careful next time. By the way, 4:05 is the best part of the video.

Game Dev

Level Editor Grid

I made the grid editable in the editor. Pressing the “Ctrl” button while moving an object snaps it on the grid. It may be useful to make the level design more precise.

I gave it a try and I used the snap function, put the grid step to 16, and added 16×16 sprites.