Scubywars
Links
Website
Jenkins. You can download all the stuff you need there
Testserver: test.scubywars.de:1337
Other Projects
scubywars.parent
scubywars.library
scubywars.visualizer
scubywars.sampleclient
scubywars.sampleclient.java
Clients
Killer-Client (Scala-Client)
Scandroid (Android-App in Scala)
Scubla (Other Scala-Client with Viewer)
pyDSLForScubyWars (Python Client with DSL)
ScubyNet (C# Client with DSL)
scubywars.gameclient.interactive.python (Interactive Python Client)
scubywars.client.joe (Python Bot)
Protocol
###MessageLayout
<tr>
<th colspan="3"><strong>Body</strong></th>
</tr>
<tr>
<td colspan="3">messageLength bytes</td>
</tr>
Header |
Attribute |
Bytes |
Type |
messageTypeId |
2 |
Short |
messageLength |
4 |
Int |
<tr>
<th colspan="3"><strong>New Protocol (PlayerNG and VisualizerNG)</strong></th>
</tr>
<tr>
<td>PlayerKilledEvent</td>
<td>10</td>
<td>Server->Client</td>
</tr>
<tr>
<td>PlayerCollisionEvent</td>
<td>11</td>
<td>Server->Client</td>
</tr>
<tr>
<td>ShotCollisionEvent</td>
<td>12</td>
<td>Server->Client</td>
</tr>
<tr>
<td>PlayerSpawnedEvent</td>
<td>13</td>
<td>Server->Client</td>
</tr>
<tr>
<td>ShotSpawnedEvent</td>
<td>14</td>
<td>Server->Client</td>
</tr>
MessageTypeIds |
Type |
Wert |
Direction |
Player |
0 |
Server->Client |
Shot |
1 |
Server->Client |
PowerUp |
2 |
Server->Client |
World |
3 |
Server->Client |
Handshake |
4 |
Server<->Client |
Action |
5 |
Client->Server |
Scoreboard |
6 |
Server->Client |
PlayerJoined |
7 |
Server->Client |
PlayerLeft |
8 |
Server->Client |
PlayerName |
9 |
Server->Client |
PlayerRelationId |
Type |
Value |
Direction |
Player |
0 |
Server<->Client |
Visualizer |
1 |
Server->Client |
PlayerNG |
2 |
Server<->Client |
VisualizerNG |
3 |
Server->Client |
Short: Server does not accept any commands from a visualizer
All values are big endian.
Messagedetails
Player (0) |
Attribute |
Bytes |
Type |
Detail |
publicId |
8 |
Long |
unique player ID |
pos.x |
4 |
Float |
|
pos.y |
4 |
Float |
|
direction |
4 |
Float |
0° = right 360° = 2π ≈ 6.28 |
radius |
2 |
Short |
player default: 15 |
speed |
2 |
Short |
player default: 100/s |
rotationSpeed |
4 |
Float |
player default: 2π per second |
turn left |
1 |
Byte |
|
turn right |
1 |
Byte |
|
thrust |
1 |
Byte |
|
fire |
1 |
Byte |
|
Shot (1) |
Attribute |
Bytes |
Type |
Detail |
publicId |
8 |
Long |
unique shot ID |
pos.x |
4 |
Float |
|
pos.y |
4 |
Float |
|
direction |
4 |
Float |
same as in Player(0) |
radius |
2 |
Short |
shot default: 5 |
speed |
2 |
Short |
shot default: 400/s |
parentId |
8 |
Long |
ID of the player who raised the shot |
lifeTime |
4 |
Float |
remaining lifeTime; spawn value: 1.25s |
PowerUp (2) |
Attribute |
Bytes |
Type |
Not implemented |
World (3) |
Attribute |
Bytes |
Type |
entityCount |
4 |
Int |
Handshake Client -> Server (4) |
Attribute |
Bytes |
Type |
PlayerRelationId |
2 |
Short |
playerName |
40 |
char[20] (UTF-16 Big Endian) |
Handshake Server -> Client (4) |
Attribute |
Bytes |
Type |
Ack(0)/Nack(1) |
1 |
Byte |
publicId |
8 |
Long |
PlayerActionMessage Client -> Server (5) |
Attribute |
Bytes |
Type |
turnLeft |
1 |
Byte |
turnRight |
1 |
Byte |
thrust |
1 |
Byte |
fire |
1 |
Byte |
(turnLeft && turnRight) == (!turnLeft && !turnRight)
Scoreboard (6) |
Attribute |
Bytes |
Type |
publicId |
8 |
Long |
score |
4 |
Int |
(publicId) |
(8) |
(Long) |
(score) |
(4) |
(Int) |
... (Map) |
PlayerJoinedMessage (7) |
Attribute |
Bytes |
Type |
publicId |
8 |
Long |
playerName |
40 |
char[20] (UTF-16 Big Endian) |
PlayerLeftMessage (8) |
Attribute |
Bytes |
Type |
publicId |
8 |
Long |
PlayerName (9) |
Attribute |
Bytes |
Type |
publicId |
8 |
Long |
playerName |
40 |
char[20] (UTF-16 Big Endian) |
New Protocol (PlayerNG and VisualizerNG)
PlayerKilledEvent (10) |
Attribute |
Bytes |
Type |
victimPublicId |
8 |
Long |
shotPublicId |
8 |
Long |
killerPublicId |
8 |
Long |
shotPosition.x |
4 |
Float |
shotPosition.y |
4 |
Float |
victimPosition.x |
4 |
Float |
victimPosition.y |
4 |
Float |
PlayerCollisionEvent (11) |
Attribute |
Bytes |
Type |
player1PublicId |
8 |
Long |
player2PublicId |
8 |
Long |
player1Position.x |
4 |
Float |
player1Position.y |
4 |
Float |
player2Position.x |
4 |
Float |
player2Position.y |
4 |
Float |
ShotCollisionEvent (12) |
Attribute |
Bytes |
Type |
shot1PublicId |
8 |
Long |
shot2PublicId |
8 |
Long |
s1Position.x |
4 |
Float |
s1Position.y |
4 |
Float |
s2Position.x |
4 |
Float |
s2Position.y |
4 |
Float |
PlayerSpawnedEvent (13) |
Attribute |
Bytes |
Type |
publicId |
8 |
Long |
pos.x |
4 |
Float |
pos.y |
4 |
Float |
ShotSpawnedEvent (14) |
Attribute |
Bytes |
Type |
publicId |
8 |
Long |
parentId |
8 |
Long |
pos.x |
4 |
Float |
pos.y |
4 |
Float |
default values
Player
radius: 15
speed: 100/s
rotSpeed: 2π/s
Shot
radius: 5
speed: 400/s
lifeTime: 1.25s
World
size: 1000x1000