Microstudio.dev Game Programming

How I wrote a game in a week using just my web browser.


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

Subscribe

Related Content

  • About Me January 3, 2025

    thumbnail

Recent Content

  • Helios 1 Title Here January 3, 2025

    ...
  • About Me January 3, 2025

    thumbnail
  • Let's recreate a 90's PC BIOS Boot Screen December 13, 2024

    ...

Archives