It's not just output anymore!

posted in I am a duck
Published February 18, 2011
Advertisement
Well the last couple of nights I've had some time to do some work and managed to get the input side of the house in order. I created an input listener component that is strikingly similar to the scriptable component. It is given a lua script to run and is passed in the latest input state to act upon. I'm not 100% sure if having separate components for handling input as well as handling running a script without input makes sense but I'll deal with refactoring one away in the future if I find that it's redundant. I was amazed again at how easy it was to hook things up using tolua++. I just needed to add the new input state struct to my list of bindings and viola it was a go.

One thing that is becoming apparent is that generating scenes through a script instead of a static data file is the better way to go. Whenever I need to add a new component to my model it means updating the scene file parsing code. If I had just gone the route of a script I would just have to expose the new component generation methods instead. I haven't gone ahead with ditching the scene file yet but it's only because of my limited amount of time. Once I get some more time I'll go back in and rework things.

While working in a coffee shop in the University district of Seattle I was showing off my GD.net colours for all to see! No one came to ask me about developing games :). I blame my haggard look on a late night hockey game I had early in the week. I just can't burn the candle at both ends like the good old days.

gallery_79488_111_22842.jpg
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement