Add WebAssembly support for assets and chunks, implement gameover screen rendering, and enhance server gameplay logic with dynamic speeds, team naming, and score components.
@@ -1 +0,0 @@
|
||||
../assets
|
||||
364
cmd/client/web/assets/assets.json
Normal file
@@ -0,0 +1,364 @@
|
||||
{
|
||||
"assets": {
|
||||
"baskeball": {
|
||||
"ID": "baskeball",
|
||||
"Type": "obstacle",
|
||||
"Filename": "baskeball.png",
|
||||
"Scale": 0.1,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -3,
|
||||
"DrawOffY": -158,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 3,
|
||||
"OffsetY": 64,
|
||||
"W": 99,
|
||||
"H": 96,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"coin": {
|
||||
"ID": "coin",
|
||||
"Type": "coin",
|
||||
"Filename": "coin.png",
|
||||
"Scale": 0.1,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -7,
|
||||
"DrawOffY": -163,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 6,
|
||||
"OffsetY": 63,
|
||||
"W": 94,
|
||||
"H": 100,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"desk": {
|
||||
"ID": "desk",
|
||||
"Type": "obstacle",
|
||||
"Filename": "desk.png",
|
||||
"Scale": 0.1,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -2,
|
||||
"DrawOffY": -155,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 4,
|
||||
"OffsetY": 65,
|
||||
"W": 100,
|
||||
"H": 93,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"eraser": {
|
||||
"ID": "eraser",
|
||||
"Type": "obstacle",
|
||||
"Filename": "eraser.png",
|
||||
"Scale": 0.05,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -29,
|
||||
"DrawOffY": -61,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 30,
|
||||
"OffsetY": 14,
|
||||
"W": 73,
|
||||
"H": 47,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"g-l": {
|
||||
"ID": "g-l",
|
||||
"Type": "obstacle",
|
||||
"Filename": "g-l.png",
|
||||
"Scale": 0.5,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -65,
|
||||
"DrawOffY": -381,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 64,
|
||||
"OffsetY": 1,
|
||||
"W": 121,
|
||||
"H": 384,
|
||||
"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",
|
||||
"Filename": "h-l.png",
|
||||
"Scale": 0.15,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -19,
|
||||
"DrawOffY": -357,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 21,
|
||||
"OffsetY": 2,
|
||||
"W": 107,
|
||||
"H": 360,
|
||||
"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",
|
||||
"Filename": "k-l-monitor.png",
|
||||
"Scale": 0.15,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -33,
|
||||
"DrawOffY": -332,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 7,
|
||||
"OffsetY": 10,
|
||||
"W": 147,
|
||||
"H": 328,
|
||||
"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",
|
||||
"Filename": "pc-trash.png",
|
||||
"Scale": 0.15,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -3,
|
||||
"DrawOffY": -240,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 5,
|
||||
"OffsetY": 111,
|
||||
"W": 154,
|
||||
"H": 132,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"platform_1767135546": {
|
||||
"ID": "platform_1767135546",
|
||||
"Type": "platform",
|
||||
"Filename": "platform_1767135546.png",
|
||||
"Scale": 1,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": 1,
|
||||
"DrawOffY": -34,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"OffsetX": 0,
|
||||
"OffsetY": 2,
|
||||
"W": 126,
|
||||
"H": 28,
|
||||
"Type": ""
|
||||
}
|
||||
},
|
||||
"player": {
|
||||
"ID": "player",
|
||||
"Type": "obstacle",
|
||||
"Filename": "playernew.png",
|
||||
"Scale": 0.08,
|
||||
"ProcWidth": 0,
|
||||
"ProcHeight": 0,
|
||||
"DrawOffX": -56,
|
||||
"DrawOffY": -231,
|
||||
"Color": {},
|
||||
"Hitbox": {
|
||||
"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": 55,
|
||||
"H": 113,
|
||||
"Type": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
cmd/client/web/assets/background.jpg
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
cmd/client/web/assets/background1.jpg
Normal file
|
After Width: | Height: | Size: 113 KiB |
BIN
cmd/client/web/assets/background2.jpg
Normal file
|
After Width: | Height: | Size: 184 KiB |
BIN
cmd/client/web/assets/baskeball.png
Normal file
|
After Width: | Height: | Size: 4.1 MiB |
41
cmd/client/web/assets/chunks/chunk_01.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"ID": "chunk_01",
|
||||
"Width": 50,
|
||||
"Objects": [
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 419,
|
||||
"Y": 517
|
||||
},
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 549,
|
||||
"Y": 516
|
||||
},
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 682,
|
||||
"Y": 449
|
||||
},
|
||||
{
|
||||
"AssetID": "platform_1767135546",
|
||||
"X": 808,
|
||||
"Y": 449
|
||||
},
|
||||
{
|
||||
"AssetID": "eraser",
|
||||
"X": 1280,
|
||||
"Y": 529
|
||||
},
|
||||
{
|
||||
"AssetID": "pc-trash",
|
||||
"X": 1960,
|
||||
"Y": 533
|
||||
},
|
||||
{
|
||||
"AssetID": "coin",
|
||||
"X": 1024,
|
||||
"Y": 412
|
||||
}
|
||||
]
|
||||
}
|
||||
61
cmd/client/web/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/web/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/web/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
|
||||
}
|
||||
]
|
||||
}
|
||||
5
cmd/client/web/assets/chunks/start.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ID": "start",
|
||||
"Width": 20,
|
||||
"Objects": []
|
||||
}
|
||||
BIN
cmd/client/web/assets/coin.png
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
BIN
cmd/client/web/assets/desk.png
Normal file
|
After Width: | Height: | Size: 4.1 MiB |
BIN
cmd/client/web/assets/eraser.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
cmd/client/web/assets/front.ttf
Normal file
BIN
cmd/client/web/assets/g-l.png
Normal file
|
After Width: | Height: | Size: 366 KiB |
BIN
cmd/client/web/assets/game.mp3
Normal file
BIN
cmd/client/web/assets/game.wav
Normal file
BIN
cmd/client/web/assets/gen_plat_1767135546.png
Normal file
|
After Width: | Height: | Size: 222 B |
BIN
cmd/client/web/assets/gen_plat_1767369130.png
Normal file
|
After Width: | Height: | Size: 222 B |
BIN
cmd/client/web/assets/gen_wall_1767369789.png
Normal file
|
After Width: | Height: | Size: 307 B |
BIN
cmd/client/web/assets/godmode.png
Normal file
|
After Width: | Height: | Size: 653 KiB |
BIN
cmd/client/web/assets/h-l.png
Normal file
|
After Width: | Height: | Size: 3.0 MiB |
BIN
cmd/client/web/assets/jump.wav
Normal file
BIN
cmd/client/web/assets/jump0.png
Normal file
|
After Width: | Height: | Size: 559 KiB |
BIN
cmd/client/web/assets/jump1.png
Normal file
|
After Width: | Height: | Size: 545 KiB |
BIN
cmd/client/web/assets/jumpboost.png
Normal file
|
After Width: | Height: | Size: 696 KiB |
BIN
cmd/client/web/assets/k-l-monitor.png
Normal file
|
After Width: | Height: | Size: 2.8 MiB |
BIN
cmd/client/web/assets/k-l.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
cmd/client/web/assets/k-m.png
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
cmd/client/web/assets/m-l.png
Normal file
|
After Width: | Height: | Size: 316 KiB |
BIN
cmd/client/web/assets/p-l.png
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
cmd/client/web/assets/pc-trash.png
Normal file
|
After Width: | Height: | Size: 4.2 MiB |
BIN
cmd/client/web/assets/pickupCoin.wav
Normal file
BIN
cmd/client/web/assets/platform_1767135546.png
Normal file
|
After Width: | Height: | Size: 222 B |
BIN
cmd/client/web/assets/player.png
Normal file
|
After Width: | Height: | Size: 384 B |
BIN
cmd/client/web/assets/playernew.png
Normal file
|
After Width: | Height: | Size: 2.9 MiB |
BIN
cmd/client/web/assets/powerUp.wav
Normal file
BIN
cmd/client/web/assets/r-l.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
cmd/client/web/assets/t-s.png
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
cmd/client/web/assets/w-l.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |