Page 1 of 1

Baby Pow: baby keyboard basher

Posted: Fri Feb 06, 2009 4:12 am
by francois
Want to let your kids have fun? This is pre-alpha, and only 2 keys work: J and A. ESC quits.

Comments?

See readme.txt for CC attribution details.

Code: http://github.com/francois/baby-pow/tree/master

Could not attach the file as the zipped version is > 512 kb, so grab yours here: http://blog.teksol.info/shared/baby-pow.love

Image

Thanks!
François

Re: Baby Pow: baby keyboard basher

Posted: Fri Feb 06, 2009 9:36 am
by osuf oboys
Nice, although if type fast, not all of the characters will be launched. Perhaps make a keypressed also add fireworks? If you'd like, you could simply print the key code of the keys that are down, e.g. if isDown(c) then addFirework(String.upper(String.char(c)). It would still not capture things like shift-2 though.

Re: Baby Pow: baby keyboard basher

Posted: Fri Feb 06, 2009 6:00 pm
by francois
Yes, I know about the problem with fast typing. Doing it on keypressed means that I lose the repeatability. Hold down K and it will only fire once. Tried on keyrelease, but again, same kind of problem. The only way to do it is check isDown(). But again, the problem is that too many letters are fired. I would have to introduce a delay (lower the FPS).

Thanks for the comments.

Bye!
François

Re: Baby Pow: baby keyboard basher

Posted: Fri Feb 06, 2009 6:02 pm
by Skofo
Neato! I branched off of this, if you don't mind. I was looking for an excuse to mess around with LOVE's particle system, and you gave me a perfect one. :ultraglee:

Will update once done.

P.S. You apparently forgot to upload keyhandler.lua to your git repository. ;)
P.P.S. Adding all of the extra keys in the keyhandler was a paiiiiinnn.

EDIT: Also, I fixed the keypress thingy. Just call the function (after a little bit of editing) in the keypressed function.

EDIT2: There we go! :ultraglee:

Link to Awesome Pow: http://willhostforfood.com/files4/53542 ... e-pow.love
Screenshot-49.jpg
Screenshot-49.jpg (73.84 KiB) Viewed 5127 times
Thanks again for making this and letting me use it! :ultrahappy: It was a cool learning experience.

EDIT3: Also, I never had a problem pressing non-J/A keys. Perhaps it's something specific to your computer?