feat: Add some more info
This commit is contained in:
parent
b059ac6bb9
commit
086be58860
39
README.md
39
README.md
@ -16,12 +16,12 @@ I'm thinking of using a 4 byte signal to send any data. The first byte will be t
|
||||
|
||||
|
||||
### Sender IDs
|
||||
| Reserved Sender | Description | ID | Notes |
|
||||
| --------- | --------- | --------- | --------- |
|
||||
| Programmer | Programmer | 0x00 | |
|
||||
| Team Base | Team Base for respawns (2nd digit is team ID) | 0x10-1F | This allows for up to 16 teams |
|
||||
| Packs | Health/ammo packs (2nd digit is pack type) | 0x20-0x2F | This allows for up to 16 pack types |
|
||||
| Gun | Gun ID's can be the same for teams | 0xE0-0xFF | Might need to allocate more if we want more than 32 players |
|
||||
| Reserved Sender | ID | Notes |
|
||||
| --------- | --------- | --------- |
|
||||
| Programmer | 0x00 | |
|
||||
| Team Base for respawns (2nd digit is team ID) | 0x10-1F | This allows for up to 16 teams |
|
||||
| Health/ammo packs (2nd digit is pack type) | 0x20-0x2F | This allows for up to 16 pack types |
|
||||
| Gun ID (can be the same for teams) | 0xE0-0xFF | Might need to allocate more if we want more than 32 players |
|
||||
|
||||
|
||||
### Commands that guns receive
|
||||
@ -40,13 +40,20 @@ I'm thinking of using a 4 byte signal to send any data. The first byte will be t
|
||||
|
||||
|
||||
## Gun options
|
||||
| Option | ID | Description | Values | Notes |
|
||||
| --------- | --------- | --------- | --------- | --------- |
|
||||
| ID | 0x00 | Gun ID | 0x00-0x1F | This corresponds to Gun IDs 0xE0-0xFF | |
|
||||
| Ammo Capacity | 0x01 | Max ammo | 0x00-0xFF | |
|
||||
| Health Capacity | 0x02 | Max health | 0x00-0xFF | |
|
||||
| Auto Reload | 0x03 | Auto reload | 0x00-0x01 | |
|
||||
| Auto Respawn | 0x04 | Auto respawn | 0x00-0x01 | |
|
||||
| Gun Type | 0x05 | Gun type | 0x00-0xFF | This is used to identify the gun type for optional statuses |
|
||||
| Starting Health | 0x10 | Starting health | 0x00-0xFF | To be used when the game starts or gun respawns |
|
||||
| Starting Ammo | 0x10 | Starting ammo | 0x00-0xFF | As above |
|
||||
| Option | ID | Values | Notes |
|
||||
| --------- | --------- | --------- | --------- |
|
||||
| ID | 0x00 | 0x00-0x1F | This corresponds to Gun IDs 0xE0-0xFF | |
|
||||
| Ammo Capacity | 0x01 | 0x00-0xFF | |
|
||||
| Health Capacity | 0x02 | 0x00-0xFF | |
|
||||
| Auto Reload | 0x03 | 0x00-0x01 | |
|
||||
| Auto Respawn | 0x04 | 0x00-0x01 | |
|
||||
| Gun Type | 0x05 | 0x00-0xFF | This is used to identify the gun type for optional statuses |
|
||||
| Starting Health | 0x10 | 0x00-0xFF | To be used when the game starts or gun respawns |
|
||||
| Starting Ammo | 0x10 | 0x00-0xFF | As above |
|
||||
|
||||
|
||||
## Shooting
|
||||
|
||||
Before firing the shooter will check if it is still alive and has ammo. If it is it will decrement the ammo left before sending a Shot signal with the GUN ID, damage, and gun type. The gun will then check if it is on auto reload. If it is, it will check if the ammo is less than the max ammo. If it is, it will reload the ammo.
|
||||
|
||||
If the target is in line of sight they will receive the signal. The target will then check if the sender is a valid gun and if so, check if it is on the same team (using the sender ID). If it is not on the same team, it will take damage and check if it is dead.
|
Loading…
Reference in New Issue
Block a user