[gameprogrammer] Re: Customizable Input
- From: Olof Bjarnason <olof.bjarnason@xxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Tue, 20 Dec 2005 16:34:01 +0100
sounds good to me. i'm using a similar system in my
event-based-scripted-ai-platform game
(ie. viewing the players character just like any other NPC, and sending the
players entity events just like an npc...)
note that you won't be coding any AI that is hard to fit in the "accelerate,
brake, steerleft" etc. style of thinking (eg. you won't code the debris
flying all over the place with this system) so you don't have "total"
uniformity in the system
/Olof
On 12/20/05, Kevin Fields <drunkendruid@xxxxxxxxxxx> wrote:
>
> I've been toying with the idea of trying to get customizable key inputs
> for
> a game I'm working on, and was just interested in getting some ideas from
> you guys & gals (if there are any here) that have already attempted this
> sort of thing.
>
> What I've been contemplating was to have an enumeration of actions that
> would be available to the user, like so:
>
> enum Actions { ACTION_ACCELERATE, ACTION_BRAKE, ACTION_STEERLEFT,
> ACTION_STEERRIGHT, ACTION_TURBO, ... };
>
> From that, I had thought of making a map container that would use the
> actual
> keycode as the key in the pair, and the action as the value; since, I
> would
> like to give players the option of mapping 2 keys (keyboard and
> gamepad/joystick) to an action. Now, whenever input is received from a
> device, the InputManager would check to see what was pressed, and would
> add
> an action entry into a kind of ActionQueue. The ActionQueue would then
> cycle
> through all of the actions it had been given during that frame, and would
> act accordingly. I thought of doing it this way so that I could use it for
> an AI controlled player too, and I would just send the id number of the
> player (whether it's a real person, or AI) and the action that was
> performed.
>
> Anyone have any thoughts on this? Any advice would be much appreciated.
>
> Kevin
>
>
>
>
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>
>
>
- Follow-Ups:
- [gameprogrammer] Re: Customizable Input
- From: Kevin Fields
- References:
- [gameprogrammer] Customizable Input
- From: Kevin Fields
Other related posts:
- » [gameprogrammer] Customizable Input
- » [gameprogrammer] Re: Customizable Input
- » [gameprogrammer] Re: Customizable Input
- [gameprogrammer] Re: Customizable Input
- From: Kevin Fields
- [gameprogrammer] Customizable Input
- From: Kevin Fields