- Be the first player to capture 10 prisoners.
- Be the player with the most captures after 250 turns.
- In case of a tie according to the rules above, be the first player to have scored the last point.
SummaryMade by Illedan, pb4 and Agade!
Welcome to Bit Runner 2048!
Since community games do not feature silver/gold/legend leagues, we will use wood leagues as equivalents.
The rules of the game will not be introduced gradually: you are playing the full game from the beginning!
Winners of the contest, lasting from 19th of April to 12th of May 2019, are: reCurse, Neumann and RoboStac!
Each player controls
The MapThe playing field is a Prison yard, represented with a circle of radius mapRadius units. The coordinates
A manhole is located in the center of the field. It is circular, with a radius of centerRadius units.
The PrisonersPrisoners are located in escape pods with a radius of
At the start of a game, Prisoners are placed randomly across the map.
A game always starts with
Players must capture them to score points!
Prisoners roll on the playing field and are not subject to friction.
The CarsA Car is a disc of radius
Cars generate a magnetic field, which allows them to grab the prisoners' escape pods when they are separated by a distance lower than the Car's radius.
Cars glide on the playing field and are subject to friction.
Game mechanicsTo score one point, a Player must drop a prisoner into the man hole.
A new Prisoner will appear on the edge of the prison yard.
To move a car, you must print the X Y coordinates of a target destination and a thrust between
The Car will pivot towards the destination, by a maximum of
It will then apply thrust in that direction. Careful, the faster a Car goes, the harder it is to control!
It is impossible to leave the prison yard. Cars and Prisoners will bounce off the electric fence on the edge of the yard. Beware, Cars will rebound with surprising momentum!
Collisions occur between the pairs: Car-Car, Car-Fence, Prisoner-Fence.
If the center of a Prisoner enters the radius of a Car, the Prisoner is magnetically attached to the Car.
The Car's magnetic field is not sufficient to keep hold of a Prisoner during strong collisions. If two Cars collide with an impulse stronger than minSwapImpulse units, the eventual control of a Prisoner is transferred from one Car to the other.
The game ends after
If a player does not provide output in time or provides incorrect output, they are eliminated and the game ends immediately. If both players are eliminated on the same turn, they will be tied regardless of their score.
- Your opponent wins.
- Your program does not provide output in time.
- Your program provides invalid output.
You can find the game's source code on Github: https://github.com/Illedan/Bit-Runner-2048
- To grab a Prisoner, the distance between the center of the Car and the center of the Prisoner must be less than or equal to the Car's radius - 1.
- To score one point, the Car must have grabbed a Prisoner and the distance between the man hole and the Car's center point must be less than or equal to the Man hole's radius - 1. A new Prisoner will be spawned
4000units away from the man hole.
- Collisions are (nearly) elastic. A minimal impulse of
120is applied for Car-Car collisions, 600for Car-Fence collisions and 42for Prisoner-Fence collisions
- Cars have a mass of
- Thrust: the Car pivots towards its destination, by a maximum of
18degrees. The Car's normalized heading vector is multiplied by the thrust power divided by the mass. The result is added to the current speed vector.
- Movement: Their speed vector is added to the position of all entities to compute their new positions. If a collision occurs during the movement, the entities will rebound off one another.
- Friction: the speed vector is multiplied by a constant, then truncated. The constant is:
- The position values are truncated.
- The cars' heading angle is expressed in degrees and rounded.
Line 2: one integer centerRadius, the radius of the center.
Line 3: one integer minSwapImpulse, the impulse needed to steal a ball.
Line 4: one integer carCount, the number of Cars you control.
Next line: an integer oppScore, your opponent's score
Next line: an integer currentWinner, whether or not you win given the current score (in case of a draw). -1: lose, 0: draw, 1: win
Next line: an integer entities for the number of entities currently in play.
Next entities lines: one line per entity.
Each entity is represented by
entityId is the unique id of this entity.
entityType indicates the type of entity. The value can be:
0for one of your Cars
1for an opposing Car
2for a Prisoner that is not being held by a Car.
vx, vy for the entity's speed vector.
You may append the output with a message which we be displayed above the corresponding pod.
Optional debugging information
If the message is
id shall be interpreted as:
Alternative output format
For convenience purposes, you may also output your actions in the following format:
Response time for the first turn ≤
Response time per turn ≤
Note that the current referee uses a lower range of mapRadius, centerRadius and minSwapImpulse values than stated above. Creators of the puzzle reserve the right to update the referee with new numerical values, insofar as they remain within the bounds provided in this statement.
A higher resolution is required to access the IDE