19 Commits

Author SHA1 Message Date
hikerstk
ea82c76fbe Made skidding react something faster: instead of the kart deciding which
direction to skid (which can take some time till max steering is reached
because of smoothed steering) the decision is now done in the control.
So now you can start skid left while the wheels are still in 'right'
direction.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11608 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-09-19 06:56:56 +00:00
hikerstk
ba1fd13a2a Properly reset skidding when a kart is rescued or explodes.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11583 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-09-15 10:29:52 +00:00
hikerstk
4a6f5ea494 Made initial skidding jump graphical only (both options can
be set in stk_config now).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11576 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-09-12 22:11:13 +00:00
hikerstk
a1c51d61a5 Added first and early version of an item-collecting AI (within
SkiddingAI).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11517 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-08-23 22:00:36 +00:00
hikerstk
203ae69ce6 Added support in MaxSpeed for an additional engine force
to work while a speed increase is active. This simplifies
existing code (for slipstream, nitro). Additional engine
force is also added for skidding, which should make 
skidding more worthwhile (since usually adjusting the
heading when stop skidding will use up the actual bonus
speed).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11450 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-07-29 23:46:16 +00:00
hikerstk
50e07355f5 Fixed skidding handling for players: players might
press skid while still turning in the opposite direction
(due to the delay with which the turning reacts). Therefore
skidding is only triggered when steering has nearly reached
full left or right (this code was by accident removed in
a previous commit).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11444 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-07-27 06:31:04 +00:00
hikerstk
fb5ae0a566 First version of the new AI that can skid. It's still behaving
quite stupid, but can sometimes compete with the old AI (unless
the new AI is behaving stupid ... as I've said). This is still
disabled by default (and if you want to test it, make sure
to adjust stk_config.xml as well).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11438 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-07-25 23:58:30 +00:00
hikerstk
736d0bf430 Tried to fix karts randomly disappearing, caused by an uninitialised
variable.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11264 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-05-24 00:08:20 +00:00
hikerstk
d6e3c5dc13 Added some visualisation feature for skidding (only when
defining SKID_DEBUG in skidding.hpp). Using this will show
the predicted path of a kart when starting to skid, and the
actual path taken. Note that the speed of the kart gets
fixed at a #defined value (since the speed affects the
turn radius making it much harder to evaluate the estimation
if the speed varies, as it naturally does when turning).
This will likely be removed once the AI skidding if done.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11253 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-05-21 06:46:56 +00:00
hikerstk
3980f1a667 Removed 'jump' in visual rotation when skidding is ended.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11230 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-05-13 21:49:28 +00:00
hikerstk
ebbc1a71d8 Introduced an 'abstract kart' class, which is used to
de-couple kart implementation and its interface. This
significantly reduces compile time when changing kart.hpp,
but is at this stage still work in progress.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10997 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-19 20:21:11 +00:00
hikerstk
83fc0b2644 Improved steering after releasing the skid button.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10968 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-14 23:10:16 +00:00
magned
6783ab7d6f Changed fabsf(steering)<0.3f to 0.9 in order to make it skid the other way even if steering is still at 90% to the other direction. It's complicated to explain.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10966 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-13 22:53:21 +00:00
hikerstk
330c269f42 Added a little jump (duration set in config file) when
starting to skid.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10965 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-13 22:34:50 +00:00
hikerstk
288f43d481 Made the bonus speed given for a skidding boost configurable (the values
were for bonuses were changed, but are still not considered to be tweaked).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10963 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-13 20:51:50 +00:00
hikerstk
73176a8d28 Made skidding more controllable: now once the kart
started to skid, you can influence the turn radius
to a certain degree (stk_config.xml, reduce-turn-min
and -max).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10954 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-08 23:30:26 +00:00
hikerstk
9d1e114bde Moved steering adjustment when skidding into skidding class.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10949 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-07 11:27:12 +00:00
hikerstk
65c73e9186 Refactored skidding to use a new base class SkiddingProperties.
This patch reduces the dependencies between KartProperties and
skidding core (and especially reduces compile time when skidding
core changes).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10926 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-06 11:28:04 +00:00
hikerstk
88c16e7cbe 1) Refactored skidding so that all skidding handling is now done
in a separate object (Skidding) of Kart.
2) Renamed m_drift of the kart control structure to m_skid
   to be consistent with the usage in STK.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10914 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-02 04:17:38 +00:00