Compare commits

..

2 Commits

Author SHA1 Message Date
45cbcded92 Load up a brand new map 2025-06-11 03:06:37 -04:00
0c0acea8b7 Remake the outside level with the new scale 2025-06-11 02:57:49 -04:00
7 changed files with 628 additions and 5 deletions

View File

@ -6,7 +6,7 @@
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
</head> </head>
<body> <body>
<canvas id="game-canvas" height="600" width="800"> <canvas id="game-canvas" height="800" width="1280">
You need a better browser to play this game. You need a better browser to play this game.
</canvas> </canvas>
</body> </body>

85
rooms/real_outside.tmj Normal file
View File

@ -0,0 +1,85 @@
{ "compressionlevel":-1,
"height":16,
"infinite":false,
"layers":[
{
"data":[2, 129, 130, 131, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1, 161, 162, 163, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1, 193, 194, 195, 2, 2, 2, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 2,
1, 229, 230, 231, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1, 261, 262, 263, 2, 2, 2, 2, 2, 2, 2, 137, 138, 138, 139, 2, 2, 1, 1, 2,
2, 2, 2, 2, 2, 8, 9, 9, 9, 10, 2, 169, 170, 170, 171, 2, 1, 1, 2, 2,
2, 2, 2, 2, 2, 40, 41, 41, 41, 42, 2, 201, 202, 202, 203, 2, 2, 2, 2, 2,
1, 1, 2, 2, 2, 40, 41, 41, 41, 42, 2, 233, 234, 234, 235, 2, 2, 2, 2, 2,
2, 1, 1, 2, 2, 72, 73, 73, 73, 74, 2, 265, 266, 266, 267, 2, 2, 2, 2, 2,
2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2,
2, 2, 1, 1, 2, 2, 2, 2, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2,
2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2,
2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 2],
"height":16,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":20,
"x":0,
"y":0
},
{
"draworder":"topdown",
"id":2,
"name":"Object Layer 1",
"objects":[],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
},
{
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4, 4, 4, 4, 5, 0, 0, 0, 0, 0, 0, 97, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 37, 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 35, 0, 75, 76, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 290, 0, 293, 0, 0, 3, 68, 68, 68,
0, 0, 0, 0, 67, 4, 4, 4, 6, 68, 68, 68, 68, 68, 68, 68, 69, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 3, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":16,
"id":3,
"name":"Tile Layer 2",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":20,
"x":0,
"y":0
}],
"nextlayerid":4,
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.11.2",
"tileheight":64,
"tilesets":[
{
"firstgid":1,
"source":"..\/tilesets\/real_outside.tsj"
}],
"tilewidth":64,
"type":"map",
"version":"1.10",
"width":20
}

180
rooms/sample_outside.tmj Normal file
View File

@ -0,0 +1,180 @@
{ "compressionlevel":-1,
"height":12,
"infinite":false,
"layers":[
{
"data":[94, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 1222, 1223, 1223, 1223, 1223, 1224, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 1336, 1337, 1337, 1337, 1337, 1338, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 880, 881, 881, 881, 881, 882, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 877, 876, 876, 94, 876, 879, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
"height":12,
"id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":16,
"x":0,
"y":0
},
{
"draworder":"topdown",
"id":2,
"name":"Object Layer 1",
"objects":[
{
"height":64,
"id":1,
"name":"hi_box",
"properties":[
{
"name":"color",
"type":"string",
"value":"red"
},
{
"name":"event",
"type":"string",
"value":"change_color"
}],
"rotation":0,
"type":"",
"visible":true,
"width":64,
"x":128.03226456947,
"y":252.960677555959
},
{
"height":64,
"id":4,
"name":"low_box",
"properties":[
{
"name":"color",
"type":"string",
"value":"green"
},
{
"name":"event",
"type":"string",
"value":"change_color"
},
{
"name":"interactEvent",
"type":"string",
"value":"log_test"
}],
"rotation":0,
"type":"",
"visible":true,
"width":64,
"x":129.064730792499,
"y":383.051421657592
},
{
"height":46.3794,
"id":5,
"name":"sign_crate",
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
},
{
"name":"interactEvent",
"type":"string",
"value":"show_message"
},
{
"name":"messageText",
"type":"string",
"value":"I'm just a humble box!\nIt's possible to say more than one thing you know."
}],
"rotation":0,
"type":"",
"visible":true,
"width":41.2588,
"x":331.441582052833,
"y":397.024052772737
},
{
"height":23.3879,
"id":6,
"name":"",
"properties":[
{
"name":"event",
"type":"string",
"value":"transport"
},
{
"name":"transport_to_coords",
"type":"string",
"value":"[300, 410]"
},
{
"name":"transport_to_room",
"type":"string",
"value":"sampleInside"
}],
"rotation":0,
"type":"",
"visible":true,
"width":48.4464,
"x":519.886499536197,
"y":357.928957844324
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
},
{
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 585, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 642, 0, 0, 0,
533, 0, 0, 0, 0, 496, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 664, 25, 0, 0, 0, 665, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 641, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0, 0, 0],
"height":12,
"id":3,
"name":"Tile Layer 2",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":16,
"x":0,
"y":0
}],
"nextlayerid":4,
"nextobjectid":7,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.11.2",
"tileheight":64,
"tilesets":[
{
"firstgid":1,
"source":"..\/tilesets\/kenney_roguelike_base.tsj"
}],
"tilewidth":64,
"type":"map",
"version":"1.10",
"width":16
}

View File

@ -8,8 +8,9 @@ const TILESET_ASSETS = {
} }
const ROOM_ASSETS = { const ROOM_ASSETS = {
sampleRoom: "./rooms/sample.tmj", sampleRoom: "./rooms/sample_outside.tmj",
sampleInside: "./rooms/sample_inside.tmj" sampleInside: "./rooms/sample_inside.tmj",
realOutside: "./rooms/real_outside.tmj"
} }
export default class Assets { export default class Assets {

View File

@ -35,7 +35,7 @@ export default class Game {
} }
start() { start() {
this.loadRoom(this.assets.get("sampleRoom")) this.loadRoom(this.assets.get("realOutside"))
requestAnimationFrame(this.loop.bind(this)) requestAnimationFrame(this.loop.bind(this))
} }

View File

@ -11,9 +11,352 @@
"margin":0, "margin":0,
"name":"kenney_roguelike_base", "name":"kenney_roguelike_base",
"spacing":4, "spacing":4,
"tilecount":27921, "tilecount":1767,
"tiledversion":"1.11.2", "tiledversion":"1.11.2",
"tileheight":64, "tileheight":64,
"tiles":[
{
"id":532,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":868,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":869,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":870,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":871,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":872,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":873,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":874,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":875,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":876,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":877,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":878,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":879,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":880,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":881,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":925,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":926,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":927,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":928,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":929,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":930,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":931,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":932,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":933,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":934,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":935,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":936,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":937,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":938,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":1221,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":1222,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":1223,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":1278,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":1279,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":1280,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":1335,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":1336,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
},
{
"id":1337,
"properties":[
{
"name":"collides",
"type":"bool",
"value":true
}]
}],
"tilewidth":64, "tilewidth":64,
"type":"tileset", "type":"tileset",
"version":"1.10" "version":"1.10"

14
tilesets/real_outside.tsj Normal file
View File

@ -0,0 +1,14 @@
{ "columns":32,
"image":"..\/assets\/outdoor.png",
"imageheight":1024,
"imagewidth":2048,
"margin":0,
"name":"real_outside",
"spacing":0,
"tilecount":512,
"tiledversion":"1.11.2",
"tileheight":64,
"tilewidth":64,
"type":"tileset",
"version":"1.10"
}