I thought I'd do a quick extra post to show people my competition game. It's called TouchLine.
The basic idea is that you move a line around the screen using two fingers (it's best to play with two hands to get the best view of the screen), and avoid obstacles for as long as you can. Take one hit, remove either finger, or make the line too short, and it's game over.
There are a number of power ups (would've liked to add more, but ran out of time):
Here's a YouTube video showing it in action: http://www.youtube.com/watch?v=ih6IE2bZOQI
I'll post code soon. I also want to extend and separate out the Tween class I started to put together for this. It basically allows you to pass the name of a property, a starting value, a finishing value, and a timespan, and will then animate the property between the provided value for you. Hopefully other people will find it useful! I also created a starfield backdrop - I know there was a discussion abut that sort of thing on here the other day.
I think this game mechanic is really clever. Though one thing I notice is that there's not often much advantage to extending the line — or do you get a larger point multiplier the longer the line is?
If I had known you were making a Tween class I would have sent you @John's Tweener! He'a built a similar thing. He came up with a really clever way to hook into the draw() loop using just Lua (so you never have to actually call an update method). We are thinking to integrate it into an upcoming Codea version once the API is stable.
Thanks for the comments, guys!
@Simeon Yeah, you do get a score multiplier the longer the line ism- but you're right, it should give you feedback and be far more obvious! And probably a bigger multiplier, too...
My Tween class was only very simple - I just used loadstring() to increment a property that was passed in by name (as a string). Would like to add more, but if you're thinking of adding @John's into Codea, that'd be excellent. I'd be interested in seeing his code, if that's okay?
Another similar piece of functionality that I'd find really useful would be a way to delay an action / method call. I find I end up having to create a load of timers variables to check a certain amount of time has elapsed before doing something.
@sanit You do currently have to use two fingers. I quite like your idea though - the main problem when you play with two is that you hand often gets in the way. It's actually easier playing with both hands.
I've also found a need for scheduled events and implemented my own scheduler. It would be great if Codea provided a scheduler. Something like:
local scheduledEvent = schedule(1.5, myCallbackFunction, x, y, z)
Would call myCallbackFunction after 1.5 seconds passing it x, y, z as parameters, returning an object that can be used to cancel the event.
Being able to schedule repeating events as well would be even better.
@Nat John's tweener library has a delay, sequence and repeat actions. It can also accept arbitrary functions as part of animation sequences, so you can construct the following:
event = sequence( delay(1.5), function() myCallbackFunction(x,y,z) end )
It must use closures instead of argument forwarding, as the sequence already accepts an arbitrary number of parameters.
It's quite a powerful library. I'll see if I can get John to post a thread about the code so people can play with it before it's integrated officially.
^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^ ^:)^
We all hayoll you…you ar god of codea
It looks like you're new here. If you want to get involved, click one of these buttons!