Game Dev

Networking (bis)

It’s funny when you go back to your project after a break and you realise most of the things you did before leaving were actually shit, isn’t it? Yeah, that was my feeling 2 weeks back regarding this “Networking” implementation.

Changing the game from a single player to multiplayer seemed quite straightforward at first glance. Especially when Unity provides such a page:

But it all depends on your code base and your understanding of network challenges… My code base was quite big already I guess. But still, size isn’t what matters the most here (and keep your dirty thoughts for yourself). The biggest difficulty is the networking itself. It takes quite a time to get used to Unity’s way of handling networking events (via Commands, Client RPCs), handling synchronised objects (via NetworkIdentity, Network Manager, Network Transform and Animator), handling of players (server, client, with, local player with or without authority and so on…). And once you are done understanding, you try, then you fail, then at some point you half succeed, and finally you start over and fail again. That was my own experience. I believe the more you wait to integrate such a feature in your game the more foolish you are. Of course, if you know upfront networking is relevant for your game, do it upfront. Don’t copy me. And I won’t copy my own self in the future either. ūüôā

That being said. Here I am, fixing networking issues. The good news is, since my enemies have most of their states in common, upgrading to networking was quite easy once the state machine itself got refactored.



Game Dev

Now working on gameplay

I’m done with my camera re-factoring. It’s now working smoothly !
So it’s time to go back to gameplay ! There are so many things to do, I don’t even know where to start…
I watched some contra like indie games¬†trailers lately (“Intrusion” for ex).
I’m really amazed every time I watch those videos… It makes me realize I won’t be able to do a “contra like” this great…
I’ll take some time this week to do some more game design.
If you got awesome ideas, don’t mind sharing…
To me, ideas are just like frags in Halo : it’s made to be shared with ME !

Anyway, it’s a pain to have no great concept nor even the time to think about it peacefully !!


Game Dev

Re-factoring !!

This one is just a post to say I’m still working !!
But right now I’m doing some¬†re-factoring¬†again. The whole thing keeps on growing so I have to be careful with my code.
I trashed my old camera to make a new one… The fact is the old one couldn’t handle zooming nor rotating without doing dirty things.
So now, I got a camera with a nice zoom/rotate feature ! I can now zoom in/out in the editor (or in-game)… Useful !

I’ll be doing some more cleaning next week and then I’ll work on gameplay again.

Game Dev

Engine now toolkitable

To extend the engine’s content, now I just have to specify an assembly in the App.config of my engine and it will load the dll on the fly.
What does it mean so far ?
– I can create a new¬†“toolkit” project with a reference to the engine core dll ;
– Then I add a simple class which inherits from my AI base class “AI_Script” ;
– I may override interesting methods (update, draw, and so on), use core functions;
– Add some fields with some attributes from the engine to make my AI class editable from the editor:
For example in a class using lights :

– Then I add the path of the new assembly to the config of the editor. Finally I launch it and I’m now able to¬†instantiate¬†the class through the editor, use it in levels and so on.

To make a parameter visible in the grid but not editable I could add the attribute [Editable(false)] to a field (the cell would be red instead of green).
The attribute [Description(“”)] is to display a tooltip which explains what the parameter is.

I forgot I added dynamic lights in the engine… It’s a cool stuff. I wish I could to do something nice with that.
Anyway, even if I don’t manage to complete a game with this project, it’s still interesting to work on it, so let’s continue.

Game Dev

Re-factoring is sooo boring, but it’s so important !

I’m digging in my engine code more and more and it’s a real pain to make changes !
I’m trying to make it¬†toolkit-able¬† so that I can add some new core classes to the engine without even changing the engine itself.
It could be great if I intend to share the engine one day. People could add their classes to the engine (without being able to change it directly), and then they use it through the editor.
It’s important for me too because I realized it would be bad to change the engine directly only to make my roller game.

Well, let’s add that, and continue¬†re-factoring.

In the other hand, I’m trying to make some design for my roller game… “Trying” huh ? Because so far, the only thing I know for sure is I’d like to make something twisted with a character with pink hair and rollers. Yeah right.

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


I’m almost done with refactoring (some parts are still horrible though). But the code looks cleaner !

I stopped my refactoring to add a little feature to the editor (and engine) : hierarchy. You can now attach an object to another one if they should be moving together and so on (Father node moves its childs).

Example :

Right now I’m working on the rotations. Then, using my animation timeline, hierarchy and rotation, I wonder if I will be able to make something like an animated stick-man. Well, I should…

PS : the sprites used in my tests are made in photoshop with brushes found here and there on the Internet. I’m not the creator and I won’t be using those brushes in any game.