Nitrous and other things

Nitrous and other things

Postby Sentmoraap » 25 Jun 2013, 20:16

Hi, it's been a long time since the last time I got involved in STK. I just discovered all the improvements made to STK since that.

I have a few suggestions, I can code them in my spare time :

Currently, when you use the nitrous, the top speed is increased temporarily in a way that you can just use a bit of nitro every time the timer expires to have the maximum speed. I think you should have 100% of the speed bonus only if you hold down the button 100% of time.
I think it could be better this way:
B is the top speed bonus, B=0 when there isn't nitro boost, and B=1 when the top speed is the maximum reachable with nitrous
X, Y ∈[0,1]
B(t)=(1-X)+X*B(t-1) if the player is using nitrous,
B(t)=Y*B(t-1) if the player is not using nitrous

If X>Y, the best strategy is to use all your nitro at once. You will get more boost per nitro by holding the button all the time.
If X=Y, the nitro consumption equals the max speed increase, so you can use it like you want. It may even handle analog input, where a P% value is like holding the button P% of time.
If X<Y, the best strategy is to use as little nitro as possible, just enough to have an empty tank at the end of the race. Using all nitro at once is less efficient. I think is not fun to play this way.

I used discrete mathematics to make it easier to understand, but it should use a continuous function.

For the inputs, currently it's not possible to bind a AND/OR combination of keys to an action. The game could have MAME-like bindings.

For the multiplayer modes:
- bomb mode (based on GTI Club's bomb tag) : one player has a time bomb, it can pass it to another player. When it explodes, the player looses a certain amount of life. It can regain life by being near the player with the bomb. Or the players can simply be eliminated until there is only one player left.
- pac-man mode : one player is pac-man, the others players are ghosts. To be pac-man you have to touch pac-man. When you are pac-man, you can eat all the dots scattered around the arena
- deathmath
- highly configurable mode : you can combine all those modes (+ three strikes battle)
You can choose:
- the number of lives
- the score needed to win
- the lives and points lost when you are being hit, and when the bomb explodes
- the lives and points you win when you hit someone, when you eat dots
- the number of bombs and pac-mans
...

What are your opinions about those things ?
Sentmoraap
 
Posts: 21
Joined: 07 Jun 2010, 14:53

Re: Nitrous and other things

Postby Totoplus62 » 25 Jun 2013, 20:45

Sentmoraap {l Wrote}: I think you should have 100% of the speed bonus only if you hold down the button 100% of time.

If you want the nitro to be done this way you will have to increase to maximum speed limit you can obtain with nitro otherwise nitro will not be a real advantage. ( Or to change nitro "comsumption" in stk config)

People have lots of idea about multiplayer modes but they can't be done at the same time. There is not enough coders :|
For example i want a game mode to be done but this is not currently possible -> viewtopic.php?f=18&t=4033
And i think soccer mode is not completely done.
Last edited by Totoplus62 on 25 Jun 2013, 20:55, edited 1 time in total.
"Imagination is more important than knowledge." Features under CC-BY 3.0, CC-BY-SA 3.0 or equivalent GNU license
Image SuperTuxKart Popularity
User avatar
Totoplus62
 
Posts: 584
Joined: 10 Nov 2012, 13:33
Location: France - Pas-de-Calais

Re: Nitrous and other things

Postby E-Dragon » 25 Jun 2013, 20:55

Sentmoraap {l Wrote}:Currently, when you use the nitrous, the top speed is increased temporarily in a way that you can just use a bit of nitro every time the timer expires to have the maximum speed. I think you should have 100% of the speed bonus only if you hold down the button 100% of time.
I think it could be better this way:
B is the top speed bonus, B=0 when there isn't nitro boost, and B=1 when the top speed is the maximum reachable with nitrous
X, Y ∈[0,1]
B(t)=(1-X)+X*B(t-1) if the player is using nitrous,
B(t)=Y*B(t-1) if the player is not using nitrous

If X>Y, the best strategy is to use all your nitro at once. You will get more boost per nitro by holding the button all the time.
If X=Y, the nitro consumption equals the max speed increase, so you can use it like you want. It may even handle analog input, where a P% value is like holding the button P% of time.
If X<Y, the best strategy is to use as little nitro as possible, just enough to have an empty tank at the end of the race. Using all nitro at once is less efficient. I think is not fun to play this way.

I used discrete mathematics to make it easier to understand, but it should use a continuous function.


Another discussed solution of this is to make it impossible to press the nitro button for a short time (if you once press nitro , you keep loosting nitro until a certain ammount and get a certain boost for this. If you have only some nitro left you only get a small boost), but this Idea is also very good.

Sentmoraap {l Wrote}:For the inputs, currently it's not possible to bind a AND/OR combination of keys to an action. The game could have MAME-like bindings.

In my opinion you don´t need key combinations, because you only need them if the number of possible actions you can do overweights the number of buttons you have.

Sentmoraap {l Wrote}:For the multiplayer modes:
- bomb mode (based on GTI Club's bomb tag) : one player has a time bomb, it can pass it to another player. When it explodes, the player looses a certain amount of life. It can regain life by being near the player with the bomb. Or the players can simply be eliminated until there is only one player left.
- pac-man mode : one player is pac-man, the others players are ghosts. To be pac-man you have to touch pac-man. When you are pac-man, you can eat all the dots scattered around the arena
- deathmath
- highly configurable mode : you can combine all those modes (+ three strikes battle)
You can choose:
- the number of lives
- the score needed to win
- the lives and points lost when you are being hit, and when the bomb explodes
- the lives and points you win when you hit someone, when you eat dots
- the number of bombs and pac-mans
...

What are your opinions about those things ?


I don´t know about bomb mode, I think it is not necessary. (hasn´t something like this already been discussed ?)
Pac-man mode sounds funny, but I don´t think it´s worth like the bomb mode.

Sentmoraap {l Wrote}:- deathmath

funny tipping mistake ;) (I don´t mind math :) ), but three strikes is enough for me.

What do you think ?
E-Dragon
 
Posts: 43
Joined: 31 Jan 2013, 18:41
Location: Germany

Re: Nitrous and other things

Postby tavariz91 » 25 Jun 2013, 22:12

I think the highly configurable mode is not a very good idea, because the game is supposed to be played by children, and 3-strikes mode is balanced. Other game mode proposals look good :)

/\ C<............. I Love the Pacman mode :D

For the nitro mathematics, I'd prefer 1 nitro = 1 unit of boost (X=Y),
BUT maybe it could be cool that, say, 5 units nitro used in one shot make suddenly a "huge" boost distorting the kart and giving 2 or 3 units more of boost with a sonic bang, stunning the other players in the near field and giving lots of smoke. The gameplay effect would be great, because using nitro would be more useful for the guy behind (if he reaches the others at the bang ;) ). Just remember that if you are at the wrong distance, you cannot get any gift because all players have taken them before you. But, if nitro comes back a bit before... you have just the amount you need, you run and run and run and BAAAANG! you kick them out and you continue at your superspeed to the first place!

That superboost should stay until the player stops to use the nitro; if he doesn't have nitro anymore (and the superboost effect is still alive), the engine could "fail" and the kart decrease its speed at 50% of the normal speed for 1 second or 2. In those conditions, using the nitro could be very, very interesting and strategic. :cool:
"I do not agree with what you say, but I will fight up to death so that you have the right to say it"
- Voltaire
User avatar
tavariz91
 
Posts: 146
Joined: 03 Apr 2013, 11:22
Location: Lausanne, in my Sweet Zerland

Re: Nitrous and other things

Postby Sentmoraap » 26 Jun 2013, 21:38

About the inputs:
- the game handles only 6 axes. Some gamepads/joysticks/whatever have more than 6 axes, and Linux considers POVs as pair of axes. The PS3 controller has 28 axes. I suggest changing the line 354 of lib/irrlicht/include/IEventReciever.h with NUMBER_OF_AXES=32 :
{l Code}: {l Select All Code}
      enum
      {
         NUMBER_OF_BUTTONS = 32,

         AXIS_X = 0, // e.g. analog stick 1 left to right
         AXIS_Y,      // e.g. analog stick 1 top to bottom
         AXIS_Z,      // e.g. throttle, or analog 2 stick 2 left to right
         AXIS_R,      // e.g. rudder, or analog 2 stick 2 top to bottom
         AXIS_U,
         AXIS_V,
         NUMBER_OF_AXES=32
      };


For the axes, the game seems to consider that all analog axes are centered by default, so it uses only a half of axes which the default value is -32767 or 32767.
The game should detect this case. I will try add that if nobody sees an inconvenience.

E-Dragon {l Wrote}:three strikes is enough for me

Deathmatch can seem redundant, but there some differences with three strikes battle : all players plays until the end. In three strikes battle survival is more important than hitting other players, because hitting a players benefits all other players. In deathmatch, hitting a player is as important as not being hit.

tavariz91 {l Wrote}:I think the highly configurable mode is not a very good idea, because the game is supposed to be played by children, and 3-strikes mode is balanced.

I don't know if there are a lot of older people playing this game. It forces nobody to play other modes, and I don't think that the "Iron Man" difficulty is designed to be played by children.
This mode could be unlocked by having a lot of points from story mode.

tavariz91 {l Wrote}:5 units nitro used in one shot make suddenly a "huge" boost distorting the kart and giving 2 or 3 units more of boost with a sonic bang, stunning the other players in the near field

The big boost might be an interesting idea, but it could make the player hoard all the nitro until the and of the race (or until the tank is filled) then they use all their reserve.
Does the sonic bang only stuns once or stuns as long as you keep using nitro ? I think the first case may be interesting, and the second is overpowered.
Sentmoraap
 
Posts: 21
Joined: 07 Jun 2010, 14:53

Re: Nitrous and other things

Postby Sentmoraap » 30 Jun 2013, 19:12

I uploaded a nitro.diff so you can test my proposal. It does not features a superboost, but it can be added.
Also, there is an error in the translation of "Around the lighthouse" : translation files have an entry with "Around the Lighthouse", so it's not translated.
Attachments
translation.diff
(20.71 KiB) Downloaded 325 times
nitro.diff
(18.01 KiB) Downloaded 319 times
Sentmoraap
 
Posts: 21
Joined: 07 Jun 2010, 14:53

Re: Nitrous and other things

Postby Auria » 02 Jul 2013, 00:24

Hi,

translations are automatically generated; so rather than apply your patch, I will just launch the automated process. Note that translation typically mostly occurs within a couple weeks of the release, before that we don't bother too much since things are subject to change
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Nitrous and other things

Postby Sentmoraap » 05 Jul 2013, 23:07

It's planed to have some air control ? For now you can't turn the karts while in the air, this can be problematic with a jump folowed by a turn (like in the mansion track). They can be different physics for the kart while in the air, like be able to turn while still going in the same direction to quickly go into another direction when you land, or have the same physics in the ground.

I made two examples of air control. The first makes the kart behaves like on ground, the second make the kart rotate freely when skidding in the air. They can be other ways of determining when the kart velocity changes.

EDIT : 3rd possibility : you can lock the speed direction with the brake (it dosen't slow you down), so you can turn in the air and land in another direction.
Attachments
air_control_3.diff
(847 Bytes) Downloaded 305 times
air_control_2.diff
(964 Bytes) Downloaded 295 times
air_control.diff
(778 Bytes) Downloaded 297 times
Sentmoraap
 
Posts: 21
Joined: 07 Jun 2010, 14:53

Re: Nitrous and other things

Postby Auria » 10 Jul 2013, 00:18

Hi,

we will need to discuss it a bit, that's not especially realistic since in real life steering wouldn't work in that case. However STK is not always realistic either, so we may need to spend some time testing it to see how it feels :)


EDIT: I just tried the patch and I am a bit unsure, it feels a little unnatural. maybe if it was a bit less strong?
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Nitrous and other things

Postby Sentmoraap » 10 Jul 2013, 12:37

Auria {l Wrote}:we may need to spend some time testing it to see how it feels :)

That's why I made several versions : to test different possibilities, but they surely needs tweaking (or to try better ideas). You can try with multiplying rot by 0.8 or something else to make it turn less.
For me the 3rd version is interesting : it's easy to drive and you can do skilled things.
Sentmoraap
 
Posts: 21
Joined: 07 Jun 2010, 14:53

Re: Nitrous and other things

Postby rubberduck » 10 Jul 2013, 14:01

One other thing: in 3-strikes-mod you should be able to change the lives (3 - 10 lives would be good)

one idea is, that every player could have it own life-count, ( this would be good, if a beginner plays against a non-beginner)
https://notabug.org/rbduck/Nucleagacy
my puzzle / action game in godot 4
User avatar
rubberduck
 
Posts: 910
Joined: 23 Apr 2013, 18:31
Location: sitting with tux in a bathtub

Re: Nitrous and other things

Postby Sentmoraap » 10 Jul 2013, 20:04

There is something else I would like to add is rumble and force feedback support. Irrlicht dosen't support force feedback, so it needs to use another library (OIS ?).
It can be done this way :
- add a ForceFeedback class in karts/controller
- this class is used by the Kart class to control force feedback effects
- a controller have an instance of ForceFeedback
- a ForceFeedback instance knows the Controller it belongs to, so it can get the player's InputDevice (it does nothing if getPlayer returns null)
- the InputDevice has extra methods to output force feedback
Sentmoraap
 
Posts: 21
Joined: 07 Jun 2010, 14:53

Re: Nitrous and other things

Postby hiker » 11 Jul 2013, 00:41

Auria {l Wrote}:EDIT: I just tried the patch and I am a bit unsure, it feels a little unnatural. maybe if it was a bit less strong?

I haven't had time to test the patches yet, but note that it is possible to skid while in the air, which should give you pretty much the affect you want: when you land again and release skid, the kart will shoot off in the new direction. Have you tried that?

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Nitrous and other things

Postby hiker » 11 Jul 2013, 05:46

rubberduck {l Wrote}:One other thing: in 3-strikes-mod you should be able to change the lives (3 - 10 lives would be good)

one idea is, that every player could have it own life-count, ( this would be good, if a beginner plays against a non-beginner)

The main issue here is that it requires more work on the GUI, to allow people setting this. And some of the GUIs are already somewhat crowded (esp. when you think of not using a mouse to select this). The actual coding for the mode is not hard.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Nitrous and other things

Postby hiker » 11 Jul 2013, 07:22

Sentmoraap {l Wrote}:There is something else I would like to add is rumble and force feedback support. Irrlicht dosen't support force feedback, so it needs to use another library (OIS ?).
It can be done this way :
- add a ForceFeedback class in karts/controller
- this class is used by the Kart class to control force feedback effects
- a controller have an instance of ForceFeedback
- a ForceFeedback instance knows the Controller it belongs to, so it can get the player's InputDevice (it does nothing if getPlayer returns null)
- the InputDevice has extra methods to output force feedback

Player have a special controller already, so just add empty functions to controller, and implement the code in PlayerController (or make a new class based on PlayerController, which is used if a controller with forcefeedbac/rumble is available).

Any chance of getting this on as many platforms as possible? Also make sure to #ifdef the new code, so that stk still compiles without the additional libraries installed. Things like rumble would also be interesting for wiimote support.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Nitrous and other things

Postby rubberduck » 11 Jul 2013, 07:54

you also have other things, where you can choose the count:

number of karts, number of rounds

is that possible to do this like that?
https://notabug.org/rbduck/Nucleagacy
my puzzle / action game in godot 4
User avatar
rubberduck
 
Posts: 910
Joined: 23 Apr 2013, 18:31
Location: sitting with tux in a bathtub

Re: Nitrous and other things

Postby hiker » 12 Jul 2013, 02:58

rubberduck {l Wrote}:you also have other things, where you can choose the count:

number of karts, number of rounds

is that possible to do this like that?

It is of course possible, though the examples you point out are a single setting per race (independent on number of players), while number of lives needs to be set per players. This would likely mean to include another screen (since this can't be done at kart selection time, since it's now known what game mode is being used).

A player can of course just press 'rescue' and lose a life - though I admit that this is an ugly work around.

For online mode we could add a 'challenge': if you declare a challenge, you start with one life less ;)

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Nitrous and other things

Postby Sentmoraap » 12 Jul 2013, 06:53

SDL supports force feedback on Windows, Linux and Mac OS X. Since this library is ported on many platforms it may support force feedback on these platforms in the future.
I am currently trying to control the motors independently. Linux lets you control the magnitude of the weak and the strong motor, but SDL has just one value. Since rumble isn't really an effect but is translated into an actual effect, I am trying effects with different settings.
Sentmoraap
 
Posts: 21
Joined: 07 Jun 2010, 14:53

Re: Nitrous and other things

Postby Sentmoraap » 21 Jul 2013, 19:46

Here is a unfinished version of the rumble and force feedback support.
For now, it rumble more or less according to the top speed of the kart (normal=no rumble, zipper=100%).
For the wheel, it autocenters when it's not on the ground, and it goes to the left is the kart is skidding left, and to the right if the kart is skidding to the right.
I plan to make the gamepad rumble when the kart hits something or explode, and make the wheel react when the kart hit things.
Attachments
ff.diff
(10.64 KiB) Downloaded 298 times
Sentmoraap
 
Posts: 21
Joined: 07 Jun 2010, 14:53

Re: Nitrous and other things

Postby Auria » 23 Jul 2013, 01:49

Interesting! I'm just a little weary of that part :

{l Code}: {l Select All Code}
m_haptic = SDL_HapticOpen(irrIndex);


Nothing guarantees that the irrlicht ID will be a valid SDL ID, so this might fail in unpredictable ways. I am not sure how to solve that however
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Nitrous and other things

Postby Sentmoraap » 24 Jul 2013, 18:05

This can be done this way:
A gamepad has a list of potential SDL devices. It's initialised with the gamepads which have the same number of buttons and axes.
When the gamepad recives an event, it checks if the SDL devices have the same state (but it muse be sure that the SDL device is updated).
This will quickly reduce the list to one or zero gamepads.
When there is only one gamepad in the list is used for haptic effects.
Sentmoraap
 
Posts: 21
Joined: 07 Jun 2010, 14:53

Re: Nitrous and other things

Postby Totoplus62 » 24 Jul 2013, 22:49

Sorry i don't want to change this subject but you were talking about Gamepad and I was thinking that in the new game version: nobody will be able to know that you CAN play with your wiimotes

So I re-create "Option-input.png" (the Wiimote draw was made with Inkscape, come from Openclipart and was in Public Domain, i modified the outline and deleted the "WII" letters at the bottom of the wiimote)

New --> Image
Now people will play with wiimotes :p
"Imagination is more important than knowledge." Features under CC-BY 3.0, CC-BY-SA 3.0 or equivalent GNU license
Image SuperTuxKart Popularity
User avatar
Totoplus62
 
Posts: 584
Joined: 10 Nov 2012, 13:33
Location: France - Pas-de-Calais

Re: Nitrous and other things

Postby Auria » 25 Jul 2013, 00:49

interesting :) wiimote support is not complete yet however so it may take some more time
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Nitrous and other things

Postby Sentmoraap » 30 Jul 2013, 17:11

I have found a simpler way : SDL can give you the device names, and there are the same as Irrlicht's device names.
The only problem is when there are multiple times the same gamepad. Can they be in a different order ?
Sentmoraap
 
Posts: 21
Joined: 07 Jun 2010, 14:53

Re: Nitrous and other things

Postby Auria » 03 Aug 2013, 01:14

In all honesty I have no idea how to do this properly. The ideal option would be to integrate this right into irrlicht but that's quite a bit more work
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Who is online

Users browsing this forum: No registered users and 1 guest

cron