Add platform-specific implementations for assets, audio, WebSocket, and rendering on Desktop and WebAssembly platforms. Introduce embedded assets for WebAssembly and native file handling for Desktop. Add platform-specific chunk loading and game state synchronization.
@@ -90,6 +90,24 @@
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"godmode": {
|
||||
"ID": "godmode",
|
||||
"Type": "powerup",
|
||||
"Filename": "godmode.png",
|
||||
"Scale": 0.08,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": 3,
|
||||
"DrawOffY": -90,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": -1,
|
||||
"OffsetY": 3,
|
||||
"W": 59,
|
||||
"H": 85,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"h-l": {
|
||||
"ID": "h-l",
|
||||
"Type": "obstacle",
|
||||
@@ -108,6 +126,78 @@
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"jump0": {
|
||||
"ID": "jump0",
|
||||
"Type": "obstacle",
|
||||
"Filename": "jump0.png",
|
||||
"Scale": 0.17,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -8,
|
||||
"DrawOffY": -193,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 22,
|
||||
"OffsetY": 6,
|
||||
"W": 72,
|
||||
"H": 183,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"jump1": {
|
||||
"ID": "jump1",
|
||||
"Type": "obstacle",
|
||||
"Filename": "jump1.png",
|
||||
"Scale": 0.16,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -1,
|
||||
"DrawOffY": -167,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 18,
|
||||
"OffsetY": 11,
|
||||
"W": 72,
|
||||
"H": 149,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"jumpboost": {
|
||||
"ID": "jumpboost",
|
||||
"Type": "powerup",
|
||||
"Filename": "jumpboost.png",
|
||||
"Scale": 0.09,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": 1,
|
||||
"DrawOffY": -81,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 3,
|
||||
"OffsetY": 2,
|
||||
"W": 97,
|
||||
"H": 76,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"k-l": {
|
||||
"ID": "k-l",
|
||||
"Type": "obstacle",
|
||||
"Filename": "k-l.png",
|
||||
"Scale": 0.12,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -43,
|
||||
"DrawOffY": -228,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 43,
|
||||
"OffsetY": 5,
|
||||
"W": 78,
|
||||
"H": 222,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"k-l-monitor": {
|
||||
"ID": "k-l-monitor",
|
||||
"Type": "obstacle",
|
||||
@@ -126,6 +216,24 @@
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"k-m": {
|
||||
"ID": "k-m",
|
||||
"Type": "obstacle",
|
||||
"Filename": "k-m.png",
|
||||
"Scale": 1,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -528,
|
||||
"DrawOffY": -2280,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": -528,
|
||||
"OffsetY": -2280,
|
||||
"W": 1056,
|
||||
"H": 2280,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"pc-trash": {
|
||||
"ID": "pc-trash",
|
||||
"Type": "obstacle",
|
||||
@@ -165,18 +273,90 @@
|
||||
"player": {
|
||||
"ID": "player",
|
||||
"Type": "obstacle",
|
||||
"Filename": "player.png",
|
||||
"Scale": 7,
|
||||
"Filename": "playernew.png",
|
||||
"Scale": 0.08,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -53,
|
||||
"DrawOffY": -216,
|
||||
"DrawOffX": -56,
|
||||
"DrawOffY": -231,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 53,
|
||||
"OffsetX": 68,
|
||||
"OffsetY": 42,
|
||||
"W": 73,
|
||||
"H": 184,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"background": {
|
||||
"ID": "background",
|
||||
"Type": "background",
|
||||
"Filename": "background.jpg",
|
||||
"Scale": 1,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": 0,
|
||||
"DrawOffY": 0,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 0,
|
||||
"OffsetY": 0,
|
||||
"W": 0,
|
||||
"H": 0,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"background1": {
|
||||
"ID": "background1",
|
||||
"Type": "background",
|
||||
"Filename": "background1.jpg",
|
||||
"Scale": 1,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": 0,
|
||||
"DrawOffY": 0,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 0,
|
||||
"OffsetY": 0,
|
||||
"W": 0,
|
||||
"H": 0,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"background2": {
|
||||
"ID": "background2",
|
||||
"Type": "background",
|
||||
"Filename": "background2.jpg",
|
||||
"Scale": 1,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": 0,
|
||||
"DrawOffY": 0,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 0,
|
||||
"OffsetY": 0,
|
||||
"W": 0,
|
||||
"H": 0,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"wall_1767369789": {
|
||||
"ID": "wall_1767369789",
|
||||
"Type": "obstacle",
|
||||
"Filename": "gen_wall_1767369789.png",
|
||||
"Scale": 1,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": 1,
|
||||
"DrawOffY": -127,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 4,
|
||||
"OffsetY": 12,
|
||||
"W": 108,
|
||||
"H": 203,
|
||||
"W": 55,
|
||||
"H": 113,
|
||||
"Type": ""
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 184 KiB |
@@ -31,6 +31,11 @@
|
||||
"AssetID": "pc-trash",
|
||||
"X": 1960,
|
||||
"Y": 533
|
||||
},
|
||||
{
|
||||
"AssetID": "coin",
|
||||
"X": 1024,
|
||||
"Y": 412
|
||||
}
|
||||
]
|
||||
}
|
||||
61
cmd/client/assets/chunks/chunk_02.json
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"ID": "chunk_02",
|
||||
"Width": 50,
|
||||
"Objects": [
|
||||
{
|
||||
"AssetID": "coin",
|
||||
"X": 512,
|
||||
"Y": 476
|
||||
},
|
||||
{
|
||||
"AssetID": "coin",
|
||||
"X": 704,
|
||||
"Y": 476
|
||||
},
|
||||
{
|
||||
"AssetID": "coin",
|
||||
"X": 1024,
|
||||
"Y": 476
|
||||
},
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 1152,
|
||||
"Y": 484
|
||||
},
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 1344,
|
||||
"Y": 420
|
||||
},
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 1472,
|
||||
"Y": 420
|
||||
},
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 1600,
|
||||
"Y": 420
|
||||
},
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 1792,
|
||||
"Y": 292
|
||||
},
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 1920,
|
||||
"Y": 292
|
||||
},
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 2048,
|
||||
"Y": 292
|
||||
},
|
||||
{
|
||||
"AssetID": "coin",
|
||||
"X": 2112,
|
||||
"Y": 220
|
||||
}
|
||||
]
|
||||
}
|
||||
65
cmd/client/assets/chunks/chunk_03.json
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"ID": "chunk_03",
|
||||
"Width": 50,
|
||||
"Objects": [
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 514,
|
||||
"Y": 519,
|
||||
"moving_platform": {
|
||||
"start_x": 514,
|
||||
"start_y": 522,
|
||||
"end_x": 800,
|
||||
"end_y": 239,
|
||||
"speed": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"AssetID": "coin",
|
||||
"X": 834,
|
||||
"Y": 204
|
||||
},
|
||||
{
|
||||
"AssetID": "wall_1767369789",
|
||||
"X": 1026,
|
||||
"Y": 539
|
||||
},
|
||||
{
|
||||
"AssetID": "wall_1767369789",
|
||||
"X": 1026,
|
||||
"Y": 412
|
||||
},
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 1091,
|
||||
"Y": 318,
|
||||
"moving_platform": {
|
||||
"start_x": 1109,
|
||||
"start_y": 304,
|
||||
"end_x": 1898,
|
||||
"end_y": 307,
|
||||
"speed": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"AssetID": "desk",
|
||||
"X": 1421,
|
||||
"Y": 534
|
||||
},
|
||||
{
|
||||
"AssetID": "desk",
|
||||
"X": 1794,
|
||||
"Y": 535
|
||||
},
|
||||
{
|
||||
"AssetID": "coin",
|
||||
"X": 1169,
|
||||
"Y": 272
|
||||
},
|
||||
{
|
||||
"AssetID": "coin",
|
||||
"X": 1598,
|
||||
"Y": 260
|
||||
}
|
||||
]
|
||||
}
|
||||
16
cmd/client/assets/chunks/chunk_04.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"ID": "chunk_04",
|
||||
"Width": 50,
|
||||
"Objects": [
|
||||
{
|
||||
"AssetID": "godmode",
|
||||
"X": 569,
|
||||
"Y": 535
|
||||
},
|
||||
{
|
||||
"AssetID": "jumpboost",
|
||||
"X": 680,
|
||||
"Y": 538
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
cmd/client/assets/fonts/press-start-2p-v16-latin-regular.woff2
Normal file
BIN
cmd/client/assets/front.ttf
Normal file
BIN
cmd/client/assets/game.mp3
Normal file
BIN
cmd/client/assets/game.wav
Normal file
BIN
cmd/client/assets/gen_plat_1767369130.png
Normal file
|
After Width: | Height: | Size: 222 B |
BIN
cmd/client/assets/gen_wall_1767369789.png
Normal file
|
After Width: | Height: | Size: 307 B |
BIN
cmd/client/assets/godmode.png
Normal file
|
After Width: | Height: | Size: 653 KiB |
BIN
cmd/client/assets/jump.wav
Normal file
BIN
cmd/client/assets/jump0.png
Normal file
|
After Width: | Height: | Size: 559 KiB |
BIN
cmd/client/assets/jump1.png
Normal file
|
After Width: | Height: | Size: 545 KiB |
BIN
cmd/client/assets/jumpboost.png
Normal file
|
After Width: | Height: | Size: 696 KiB |
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 1.6 MiB |
BIN
cmd/client/assets/pickupCoin.wav
Normal file
BIN
cmd/client/assets/playernew.png
Normal file
|
After Width: | Height: | Size: 2.9 MiB |
BIN
cmd/client/assets/powerUp.wav
Normal file
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 1.3 MiB |