POC: Inital commit (transcode json, ron, yaml)

This commit is contained in:
Zykino
2022-09-17 20:29:35 +02:00
commit c4becb0b12
9 changed files with 560 additions and 0 deletions

26
examples/gameConfig.ron Normal file
View File

@ -0,0 +1,26 @@
GameConfig( // optional struct name
window_size: (800, 600),
window_title: "PAC-MAN",
fullscreen: false,
mouse_sensitivity: 1.4,
key_bindings: {
"up": Up,
"down": Down,
"left": Left,
"right": Right,
// Uncomment to enable WASD controls
/*
"W": Up,
"A": Down,
"S": Left,
"D": Right,
*/
},
difficulty_options: (
start_difficulty: Easy,
adaptive: false,
),
)

4
examples/simple.json Normal file
View File

@ -0,0 +1,4 @@
{
"a boolean": true,
"an array": [3, 2, 1]
}

20
examples/standard.ron Normal file
View File

@ -0,0 +1,20 @@
Scene( // class name is optional
materials: { // this is a map
"metal": (
reflectivity: 1.0,
),
"plastic": (
reflectivity: 0.5,
),
},
entities: [ // this is an array
(
name: "hero",
material: "metal",
),
(
name: "monster",
material: "plastic",
),
],
)