Next units lines: Two integers unit_id, faction, being the unit's unique ID and faction (
Space Shooter
511 CodinGamers in the Space Shooter arena
Approved by NicolasAlmerge VoxMortem [ron]
A higher resolution is required to access the IDE
- 39
Learning Opportunities
This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.
Statement
This is a league based challenge.
For this challenge, three leagues for the same game are available. Once you have proven your skills against the Boss, you will access a higher league and extra rules will be available.The Goal
Win. Don't die.
Shoot at your enemy with bullets and missiles, watch out for their weapons. Be careful - the forcefield, which was used to trap your enemy, seems to also be keeping you inside. Keep away from the edge - crash with the forcefield will destroy your ship!
Rules
The game is played on a map
You and your opponent each own one starship, which has
The ship has an
The bullet can be shot every two turns. It detonates automatically in the first tick, when its distance
to the closest enemy unit, that was in its damage radius, starts to increase. Ending its lifetime
(after
Bullet's damage radius is
The ships start at symmetrical positions, close to the center of the board.
Ships move with the given acceleration along each axis, with the resultant acceleration (interpreted as
a vector) being clipped to length
Hitting the edge of the board immediately sets the unit's (ship's or bullet's) health to
Each turn takes exactly 1 time unit, so that every tick takes 1/5 of a time unit - for example, a ship moving with the speed of 10 will travel 2 units of space every tick, so 10 every turn.
unit | number of | damage | damage radius | health | lifetime | max acceleration |
---|---|---|---|---|---|---|
ship | 1 | - | - | 10 | - | 10 |
bullet | ∞ | 10 | 120 | 10 | 7 | - |
Note that there is a debug mode available in the game settings!
Acknowledgment
This contribution was developed for the Programming Programming Games course, University of Wrocław, 2021.
Authored by Michał Opanowicz (@MichalOp), Katarzyna Miernikiewicz (@Manwi23), Agnieszka Pawicka (@Agn).
Supervised by Jakub Kowalski (@aCat).
Game Input
Next units lines: Two integers unit_id, faction, being the unit's unique ID and faction (
Available commands:
- [A | ACCELERATE] ax ay - put acceleration
ax on x-axis,ay on y-axis (with instant effect) - [F | FIRE] vx vy - fire a bullet with velocity
vx on x-axis,vy on y-axis (relative to ship) - [P | PRINT] message - print a message - it can also be a multiline one, with lines split with an escaped newline symbol ("\\n")
- [W | WAIT] - do nothing
Example outputs:
You want to put acceleration (0, -4) on your ship, which has id 23, and at the same time fire a bullet with velocity (relative to the ship) (2, 1).
23 | A 0 -4 | F 2 1
You want to not do anything in this turn.
23 | W
You want to only fire a bullet with velocity (relative to the ship) (1, 1) and print "Hello there" and a debug information (note that 'S' is used instead of unit_id).
S | F 1 1 | P Hello there
What is in the higher league?
Missiles! They have their own engines and can be moved around just as your ship. A deadly weapon.A higher resolution is required to access the IDE