Doors and Buckets

I've been busy with life lately having started a new contract position, among other things, so I haven't had the mental capacity to devote to game development as much as I'd like. That being said, I did have some spare time to rig up the map segment connectivity via "doors" in-game. The connections are stored in an array as such:

doors = {
		position = {x = 6, y = 7},
		link_id = 0,
		load_map_id = 2,
		direction = 3,
		tile_id = 181
		position = {x = 24, y = 5},
		link_id = 1,
		load_map_id = 3,
		direction = 1,
		tile_id = 149

Each item stores a position which is the convention used in the game engine to position elements. The link_id is a unique ID given to each door in the map file. Corresponding doors in other files (the "other side") will have the same link_id. I don't know if this scheme will pan out so well once I get more connection points between map segments, but for now it'll stay as is. Load_map_id specifies which map file we're connecting to (e.g. load_map_id of 3 will load "maps/3.lua"). Direction tells us which way the player sprite needs to be facing when the map file loads. Finally, tile_id is just a metadata piece used only in the map editor.

Here's a video of the functionality in-game:

I've also added a new release of v0.05 on the game page.

Moving to Bitbucket

In other news, I've moved my game code and a few other private repositories over to Bitbucket. I'm finding it to be more suitable to my desires in a source control service lately with free private repos and integration with some other useful tools like Trello. For a while I had been hosting my repos on my VPS, but those days are about over. I still don't intend on making my game code public right now (or ever; for all I know it's really crappy C code), so the vast usage of GitHub in the open source realm doesn't appeal to me for this project. But hey, if it ever comes to that, I can always push a mirror to migrate easily. The joys of using Git.

Code Stats

Language                     files          blank        comment           code
JavaScript                       1            226             86           1232
C                               12            191             59           1054
C/C++ Header                    15             85             49            590
Lua                              1             11              6             73
PHP                              3              2              0             40
Bourne Shell                     1              5              0             14
DOS Batch                        1              6              0             13
make                             1              0              0              3
SUM:                            35            526            200           3019