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.
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 = (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