Baby Pow: baby keyboard basher

Show off your games, demos and other (playable) creations.
Post Reply
francois
Prole
Posts: 6
Joined: Sun Feb 01, 2009 3:56 am
Location: Sherbrooke, Québec, Canada
Contact:

Baby Pow: baby keyboard basher

Post 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
François Beausoleil
http://blog.teksol.info/
osuf oboys
Party member
Posts: 215
Joined: Sun Jan 18, 2009 8:03 pm

Re: Baby Pow: baby keyboard basher

Post 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.
If I haven't written anything else, you may assume that my work is released under the LPC License - the LÖVE Community. See http://love2d.org/wiki/index.php?title=LPC_License.
francois
Prole
Posts: 6
Joined: Sun Feb 01, 2009 3:56 am
Location: Sherbrooke, Québec, Canada
Contact:

Re: Baby Pow: baby keyboard basher

Post 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
François Beausoleil
http://blog.teksol.info/
User avatar
Skofo
Party member
Posts: 146
Joined: Mon Dec 22, 2008 10:55 pm

Re: Baby Pow: baby keyboard basher

Post 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 4928 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?
Working on: Viator
Need a 64-bit Debian package for LÖVE? Here it is!
Post Reply

Who is online

Users browsing this forum: randomnovice and 176 guests