Private
Public Access
1
0

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.

This commit is contained in:
Sebastian Unterschütz
2026-01-04 01:25:04 +01:00
parent 85d697df19
commit 3232ee7c2f
86 changed files with 4931 additions and 486 deletions

View File

@@ -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": ""
}
}

View File

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 142 KiB

View File

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 113 KiB

View File

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 184 KiB

View File

@@ -31,6 +31,11 @@
"AssetID": "pc-trash",
"X": 1960,
"Y": 533
},
{
"AssetID": "coin",
"X": 1024,
"Y": 412
}
]
}

View 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
}
]
}

View 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
}
]
}

View 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/front.ttf Normal file

Binary file not shown.

BIN
cmd/client/assets/game.mp3 Normal file

Binary file not shown.

BIN
cmd/client/assets/game.wav Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 KiB

BIN
cmd/client/assets/jump.wav Normal file

Binary file not shown.

BIN
cmd/client/assets/jump0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 KiB

BIN
cmd/client/assets/jump1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB