re:Creation Week #0: Preparation

This week I don’t think I’ve accomplished something really huge, because I’ve decided to finally rest after month of studying hard. But now I can work almost full-time so lots of changes will come, I guess.

But still, I’ve managed to develop some cool stuff.

Game

This isn’t really first week I’m programming this game. I’ve spent some month on engine and level editor, but this is the week I’m starting to see the game itself!

It’s called re:Creation. It’s oldschool top-down action rpg where you play as undead knight who wants to seek revenge for his death and free people from evil wizard who used trapped demon’s soul as the power source for 800 years. Here’s what was implemented:

Runtime script reloading

Well, this thing is actually amazing and useful. I can now reload scripts when the game is running. That means that I can change lots of things without the need to recompile or restart the game. I think this will save me lots of hours.http://gfycat.com/FlakyExemplaryAmethystsunbird

Advanced script support and dialogues

Witch can heal the player now

This one is actually one of the most impressive things I’ve ever done, I think. I was using Lua as configuration language most of the time, but I can use even more now.
I’ve spent some time messing around with different Lua/C++ libraries and I think LuaBridge is the best. I think I’ll rewrite third part of my Lua/C++ tutorial which will show how to use it.

My game uses entity/component/system and each entity can be accessed by integer id. Here’s how I can get health value of some entity:

Yeah, this is quite verbose. I didn’t want to translate it 1:1 to Lua, because it would be much easier to have some wrapper function, which only needs entity id to get its health value. It will be easier and safer to use it this way

I can get “interact” function and don’t even need to harcode witch’s behaviour! This is so cool!
Ah, and I’ve also added lots of error checking which is something that takes a lot of time but isn’t seen by many. If you misspell some name of a function, you get an error and the game ignores it.

Improved level editor

Added snapping to grid and help menu. Nothing very special

Well, that’s it for this week. I’ll try to work very hard this week (I hope I won’t be interrupted too often) and will post the next update in a week!

I also recommend you to watch this awesome talk by Jeff Atwood. The most important points for me were “Embrace the suck” and “Do it public“. Well, as you can see (look at this post!), I do these things. Nice.