-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplicity. Decided on a design and implementing
- Loading branch information
Showing
19 changed files
with
2,350 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/proto/**/*.ts |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "game", | ||
"version": "0.0.0", | ||
"scripts": { | ||
"install": "yarn run proto", | ||
"test": "vitest run", | ||
"proto": "run-script-os", | ||
"proto:default": "protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./proto --ts_proto_opt=unrecognizedEnum=false --ts_proto_opt=oneof=unions -I=./proto ./proto/*.proto", | ||
"proto:win32": "protoc --plugin=protoc-gen-ts_proto=\".\\node_modules\\.bin\\protoc-gen-ts_proto.cmd\" --ts_proto_out=./proto --ts_proto_opt=unrecognizedEnum=false --ts_proto_opt=oneof=unions -I=./proto ./proto/*.proto", | ||
"lint": "eslint \"src/**/*.{tsx,ts}\"" | ||
}, | ||
"dependencies": { | ||
"@dimforge/rapier2d": "^0.11.2", | ||
"@petamoriken/float16": "^3.8.3", | ||
"@stdlib/math": "^0.0.11", | ||
"lz-string": "^1.5.0", | ||
"mnemonist": "^0.39.5", | ||
"protobufjs": "^7.2.4", | ||
"runtime-framework": "*", | ||
"ts-proto": "^1.156.6", | ||
"typescript": "latest" | ||
}, | ||
"devDependencies": { | ||
"@protobuf-ts/protoc": "^2.9.1", | ||
"eslint-config-custom": "*", | ||
"run-script-os": "^1.1.6", | ||
"tsconfig": "*", | ||
"vitest": "^0.31.4" | ||
}, | ||
"eslintConfig": { | ||
"root": true, | ||
"extends": [ | ||
"custom" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
syntax = "proto3"; | ||
|
||
message ReplayModel { | ||
bytes frames = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
syntax = "proto3"; | ||
|
||
enum EntityType { | ||
ROCKET = 0; | ||
LEVEL = 1; | ||
SHAPE = 2; | ||
} | ||
|
||
message RocketBehaviorConfig { | ||
float thrust_distance = 1; | ||
float thrust_value = 2; | ||
float thrust_ground_multiplier = 3; | ||
float explosion_angle = 4; | ||
} | ||
|
||
message RocketConfig { | ||
float position_x = 1; | ||
float position_y = 2; | ||
float rotation = 3; | ||
|
||
RocketConfig default_config = 4; | ||
} | ||
|
||
message LevelConfig { | ||
float position_x = 1; | ||
float position_y = 2; | ||
float rotation = 3; | ||
|
||
float camera_top_left_x = 4; | ||
float camera_top_left_y = 5; | ||
|
||
float camera_bottom_right_x = 6; | ||
float camera_bottom_right_y = 7; | ||
|
||
float capture_area_left = 8; | ||
float capture_area_right = 9; | ||
|
||
optional RocketConfig rocket_config = 10; | ||
} | ||
|
||
message ShapeConfig { | ||
bytes vertices = 1; | ||
} | ||
|
||
message GroupConfig { | ||
repeated RocketConfig rockets = 1; | ||
repeated LevelConfig levels = 2; | ||
repeated ShapeConfig shapes = 3; | ||
} | ||
|
||
message GamemodeConfig { | ||
repeated string groups = 1; | ||
} | ||
|
||
message WorldConfig { | ||
map<string, GroupConfig> groups = 1; | ||
map<string, GamemodeConfig> gamemodes = 2; | ||
} |
Oops, something went wrong.