Spawning Player 1 in a level where arrow keys were auto-assigned to another player causes both to be controlled at once

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
ncrecc
Posts: 156
Joined: Thu Jul 12, 2018 12:59 am

Spawning Player 1 in a level where arrow keys were auto-assigned to another player causes both to be controlled at once

Post by ncrecc »









Magic Ball content:

When you start the level, Player 2 will be controlled with Player 1's controls. And, when you flip the switch, out of the magic ball comes Player 1, who also uses Player 1's controls. So when you move Player 2 around, Player 1 will move in the same direction at the same time.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Spawning Player 1 in a level where arrow keys were auto-assigned to another player causes both to be controlled at o

Post by Holger »

Although this looks strange, this is currently some sort of "expected behaviour".

The cause for the problem is that multi-player levels are currently detected only by checking the playfield for players, but not by checking elements that could create additional players (or elements that could create other elements that could create additional players, and so on).

Therefore, the level presented here is treated as a single-player level, therefore mapping input events for all configured devices to that single player. This has the advantage, for example, that you can control a single-player level by using both the keyboard or a joystick, without having to change the input devices settings before playing (if you have already configured these two devices for different players).

Now, if an additional player is created during the game, this "map all inputs to the player" logic is still true, but now for both players. Therefore, both players are controlled by both input devices in the example above.

Most probably this should be changed in a way that each input device is mapped to the configured player as soon as there is more than one player present in the game.

I'll check if this could easily be fixed...
Post Reply