It’s always worth clicking around on Twitter, and following replies to people’s tweets. You find all sorts of useful things. In this case I found a nice little web based game development environment called MicroStudio.
It seems to be a small project run by a few people, and deserves far more interest than it currently gets. Using a programming language slightly similar to Lua, and with a built in code editor and sprite designer it’s possible to make games entirely within your browser.
I spent the past week using it on and off, and managed to create the following.
It’s a simple prototype of the old Columns game from the Sega GameGear. You can play it at the link below
Programming the game
There’s not much to this game, the most tricky part was figuring out whether the player has made three blocks in a row. I decided to use recursive functions to work this out which is probably a complete overkill, but it did make writing the code rather easy…
// Horizontal to the right checkHorizRMatch = function(x,y,piece) if (piece == -1 or board[y][x] == -1) then return end if (x < 0 or y < 0 or x > boardWidth-1 or y > boardHeight-1) then return end if (board[y][x] != piece) then return end item = object _x = x _y = y end currentMatches.push(item) checkHorizRMatch(x+1,y,piece) end
Over time I’ll add more to the game and improve it. Over on my other YouTube channel I’ve been doing a lot of programming on old computers. I’ve wanted a small project I can use to try these systems out, and this game is going to be one of them.