Page 1 of 1

Match 3 demo

Posted: Sun Sep 28, 2014 2:27 am
by CaptainMaelstrom
Hello.

I'm developing a new game and I thought I'd share some code with you guys. I created a class for a puzzle quest-like match-3 grids. I thought maybe somebody would be interested so I'm uploading it here.

It's pretty stable. Instructions:

press 'c' to generate a new grid
press 'd' to clear the first set of matches
press 'a' to show a list of the matches currently possible
press keyboard number keys '1' through '6' while hovering over a tile to change it's color
left-click tiles to swap tiles (matches clear automatically after first clear or first swap)

That's pretty much it. Here's a .gif:

Image

Enjoy.

Re: Match 3 demo

Posted: Mon Sep 29, 2014 3:14 am
by artofwork

Code: Select all

Error
scripts/grid.lua:32: Cannot create canvas: Error in implementation. Possible fix: Make canvas width and height powers of two.
I see this error quite often with a lot of people's code, I'm sure it has something to do with my graphics card, Anyhow I believe when you write code you should write it out for everyone to see, not just your machine :)

But ty for the code i'll see if i can get working on my crappy machine :p

Re: Match 3 demo

Posted: Mon Sep 29, 2014 1:16 pm
by mode7
This error is related to your graphics adapter. Especially many old Laptop/Netbooks don't support canvas.
I usually avoud using canvas alltogether to maintian compatibility. There's almost always a way around canvasses.

Anyway, the game plays quite nice it has the same addiction factor but it doesn't one money from you like some similar game.
Maybe you should consider making the dots dragable, so you don't have to click twice everytime.

Re: Match 3 demo

Posted: Tue Sep 30, 2014 3:23 am
by CaptainMaelstrom
Thanks guys. I got rid of the canvas part of the code and I made one-click tile-swapping possible. Those are both good suggestions. :D