Simple and Easy to Use Custom Input Manager Class
Sweet! It’s ready to go. I have created a custom Input Manager for you to take advantage of. Check out this quick video tutorial that will walk you through how to use it in your projects or feel free to look it over yourself.
You can download the package containing the demos and the files or just grab it directly from the repository on my Google Project Page.






Jeejlej said
am November 12 2008 @ 11:11 pm
What the heck is an input manager?
Colby Cheeze said
am November 13 2008 @ 1:43 am
A class that handles all of your Input easily. Rather than setting up event listeners all over your code and looking up key codes you can do something such as: if( Input.instance.isKeyPressed( KeyCode.SPACEBAR ) ) { player.shoot(); }
The class has all kinds of goodies like that. Enjoy
Tintin said
am December 4 2008 @ 10:33 pm
Thanks Colby, it helps!
Gellyware said
am February 12 2009 @ 3:04 pm
Using the Input manager, how would I determine if a clip has been clicked without adding eventlisteners to that clip?
Colby Cheeze said
am February 12 2009 @ 8:09 pm
I generally don’t use the Input Manager to manage UI interaction such as clicking on buttons. It would be better to create a custom button class that handles events for itself in whatever way you need I believe. That being said, if you WERE to just use the Input Manager, you would have to determine if the mousePos was inside of the bounds of the object you were checking for a click with. I believe I may actually have used a method such as this for clicking units in a little demo app I was working on.
Ben said
am February 13 2009 @ 8:21 am
First off, thank you for this great library, its showing me another approach to game development that is very dynamic. I was attempting to have to boids do a collision detection like hitTestObject or hitTestPoint. Even if I type the boids as DisplayObjects, it doesn’t work. I looked through your library but I couldn’t make out how you go about this. Could you write a post about that aspect of building a game with the cheezeworld lib?
I did notice that you have WallAvoidance, but its not a collision.
Thank you again
Ben
p.s.your contact me form gives a 404 eror
Colby Cheeze said
am February 13 2009 @ 10:03 am
Glad you like the articles Ben. In order to do some basic collision detection with the entities I have been using the two functions I created under the Entity class: “isOverlapping( Entity )” and “isOverlappingCircle( position, radius )”
Thank you for pointing out the error on the contact form, I’ll be sure to get that fixed up!
Warll said
am October 15 2009 @ 10:21 pm
You’re definition of “quick” is, different from mine.
Warll said
am October 15 2009 @ 10:52 pm
With that said I watched it all and learned, now I’ll have to find time for the rest. Then I be a real boy programmer!
CaptainFreddy said
am December 29 2009 @ 10:34 am
Hi everyone,
My name is Freddy and I’ve wasted nearly a month of my life on this place
I found it after being recommended by a few friends who have been hanging out here for quite some time.
I am a writer, graphics artist, photographer and just about anything else that comes up around the office. Aside from the above interests i’m really into scifi as I know that is so much more out there to be discovered, and a feeling that the universe is just teaming with life.
Well, I hope that I get to know more people here, share some experience and start learning. Have a greay day!
Robbos said
am March 5 2010 @ 5:04 am
What I don’t really like about this approach is that you hardcode the commands instead of letting users choose which key does which action…
But it is good to have an inputmanager though! Good way of preventing keyboard input to be scattered all over your projects. What I usually do is have one class that translates the input to commands and then check if those commands need to be executed in the HandleInput method of other objects. Even better might be to make it fully event based.