RUZZLE clone: is it possible with corona sdk?

Hello guyz!

just wanted to ask if Im able to clone “RUZZLE” game using CORONA SDK??? 

Right now I’m having a hard time with the “swipe functionality” where the player can form words in just one swipe, without lifting the finger (as opposed to clicking the letters one by one to form a word.)

does anyone have a tip??

here’s what ruzzle looks like

http://www.youtube.com/watch?v=8bS47jCGsVI

Yes. This game was created with Corona

http://www.numberjoy.com/

do you have an idea how he does the ‘one swipe’ functionality??

Yes. This game was created with Corona

http://www.numberjoy.com/

do you have an idea how he does the ‘one swipe’ functionality??

nevermind, im pretty close to cloning it now. u dont have to teach me coz that’s ur company secret right?? hahaha, but im digging it. except for the enterprise features and multiplayer mode.

For those that are wondering, it would be pretty easy to just compare the position of the touch to the known bounds of the tiles.

local tiles = {} local selectedLetters = {} local validWords = {"Hello", "World"} for i = 16 do --setup your tiles tiles[i] = display...... tiles[i].letter = "A" tiles[i].selected = false end local function touch(event) if event.phase == "moved" then for i = 1, #tiles do --prevent reusing same tile if not tiles[i].selected then --check if touch is currently over a tile if event.x \> tiles[i].x - (tiles[i].width \* 0.5) and event.x \< tiles[i].x + (tiles[i].width \* 0.5) and event.y \> tiles[i].y - (tiles[i].height \* 0.5) and event.y \< tiles[i].y + (tiles[i].height \* 0.5) then print("selecting tile "..i) tiles[i].selected = true selectedLetters[#selectedLetters+1] = tiles[i].letter end end end elseif event.phase == "ended" then local success = false for i = 1, #validWords do if table.concat(selectedLetters) == validWords[i] then success = true print("success - word found") end end if not success then print("not a valid word") end selectedLetters = {} for i = 1, #tiles do tiles[i].selected = false end end end

@AlanPlantPot

hey, just checked this right now. thnx mayt! will review ur code and savor the infobits from it. :)) i think i was looking for this functionality.

more power! :D 

do you have a blog?

Is there any reason why you used a display object to create the button instead of widget.newButton()

I frequently use display objects instead if widgets.  It’s less overhead to support all the options that the widget has to support.   It’s pretty fast to just do your own touch object.

Rob

nevermind, im pretty close to cloning it now. u dont have to teach me coz that’s ur company secret right?? hahaha, but im digging it. except for the enterprise features and multiplayer mode.

For those that are wondering, it would be pretty easy to just compare the position of the touch to the known bounds of the tiles.

local tiles = {} local selectedLetters = {} local validWords = {"Hello", "World"} for i = 16 do --setup your tiles tiles[i] = display...... tiles[i].letter = "A" tiles[i].selected = false end local function touch(event) if event.phase == "moved" then for i = 1, #tiles do --prevent reusing same tile if not tiles[i].selected then --check if touch is currently over a tile if event.x \> tiles[i].x - (tiles[i].width \* 0.5) and event.x \< tiles[i].x + (tiles[i].width \* 0.5) and event.y \> tiles[i].y - (tiles[i].height \* 0.5) and event.y \< tiles[i].y + (tiles[i].height \* 0.5) then print("selecting tile "..i) tiles[i].selected = true selectedLetters[#selectedLetters+1] = tiles[i].letter end end end elseif event.phase == "ended" then local success = false for i = 1, #validWords do if table.concat(selectedLetters) == validWords[i] then success = true print("success - word found") end end if not success then print("not a valid word") end selectedLetters = {} for i = 1, #tiles do tiles[i].selected = false end end end

@AlanPlantPot

hey, just checked this right now. thnx mayt! will review ur code and savor the infobits from it. :)) i think i was looking for this functionality.

more power! :D 

do you have a blog?

Is there any reason why you used a display object to create the button instead of widget.newButton()

I frequently use display objects instead if widgets.  It’s less overhead to support all the options that the widget has to support.   It’s pretty fast to just do your own touch object.

Rob