Game in 7 LOC - Tap To Lose

Introducing “Tap To Lose”, of the “impossible game” genre…

local rect = display.newRect(display.contentCenterX, display.contentCenterY, display.actualContentWidth, display.actualContentHeight) rect:setFillColor(0) local text = display.newText({x=display.contentCenterX, y=display.contentCenterY, text="TAP TO LOSE", fontSize=80}) rect:addEventListener("tap", function(event) text.text = "YOU LOSE!" timer.performWithDelay(1000, function() text.text="TAP TO LOSE" end) end)

btw, could easily shave it down to 3 or 4 lines, if didn’t care much about readability

or even munge it all into a single obfuscated line, if didn’t care at all

but that seems to be about the practical limit - so far I haven’t been able to reduce it to zero lines

Remember that contest way back where you had to make an entire game with these limits?

  1. Only main.lua, config.lua, and build.settings

  2. main.lua had to be 1024 bytes or less (on disk)

… so far I haven’t been able to reduce it to zero lines

 
That would be the no-play game :slight_smile:
 
PS - I’m waiting for the sequel now… ‘Game in 7 LOC 2’ - Tap To Win

I’m not sure if this is just a brilliant joke, or a joke at my expense. :smiley:

Either way, it’s a solid game of patience.

btw, the 0LOC metric will eventually be met by its sequel, a hyper-hyper-casual game, working title “Pure Zen” (though I might instead go with “What The Heck Is This Thing?”, or “Great, Now What Am I Supposed To Do?”, or “I Can’t Believe I Downloaded This!”)  full source:

and no, the joke, such as it is, is NOT intended at anyone directly, with apologies as necessary

No apologies necessary :D 

Speaking of that competition that Ed mentioned, now that actually sounds like an interesting challenge.

Oh, I needed that chuckle!

Reminds me of the game Adam Sandler played with his kid in “Big Daddy”.  “I Win”.

Remember that contest way back where you had to make an entire game with these limits?

  1. Only main.lua, config.lua, and build.settings

  2. main.lua had to be 1024 bytes or less (on disk)

… so far I haven’t been able to reduce it to zero lines

 
That would be the no-play game :slight_smile:
 
PS - I’m waiting for the sequel now… ‘Game in 7 LOC 2’ - Tap To Win

I’m not sure if this is just a brilliant joke, or a joke at my expense. :smiley:

Either way, it’s a solid game of patience.

btw, the 0LOC metric will eventually be met by its sequel, a hyper-hyper-casual game, working title “Pure Zen” (though I might instead go with “What The Heck Is This Thing?”, or “Great, Now What Am I Supposed To Do?”, or “I Can’t Believe I Downloaded This!”)  full source:

and no, the joke, such as it is, is NOT intended at anyone directly, with apologies as necessary

No apologies necessary :D 

Speaking of that competition that Ed mentioned, now that actually sounds like an interesting challenge.

Oh, I needed that chuckle!

Reminds me of the game Adam Sandler played with his kid in “Big Daddy”.  “I Win”.