Re: [TuxKart-devel] Input/simulation seperation
Status: Alpha
Brought to you by:
sjbaker
|
From: <jam...@bt...> - 2004-08-14 21:23:44
|
Ingo Ruhnke <gr...@gm...> wrote:
James Gregory writes:
>> Log Message: - moved PlayerKartDriver out of the Driver-hierachy, to
>> seperate input from the actual simulation, will do the same with
>> AutoDriver stuff
>
> The input stuff already is seperate from the simulation, its in
> sdldrv.cxx in a function called kartInput(). The one exception is the
> cheat code for infinite ammo. I left this in player kart driver
> because that's where it was originally and I decided to leave it where
> it was in case this had been done for a good reason that had passed me
> by.
Basically I want to have the KartDriver 'AI' plugable, so that I can
switch from a PlayerKartDriver to a AutoKartDriver at any time, will
be necesarry if we for example want to display race times after the
finished race as on overlay about the kart driving around the course,
ie. MarioKart-like. The joystick/keyboard stuff itself isn't affected
by that.
BTW. Speaking about joystick/keyboard input, that might need a bit
cleanup as well, currently incomingJoystick() and incomingKeyboard()
are quite far away from each other in the source, while they are
actually quite closly related.
Again, the only thing incomingKeyboard() is used for is a single cheat code. Either:
a) Add a "cheat enabled" bool to the joystick struct and treat it as joystick input
or
b) just delete it
James
|