Init
23
game/assets/kenney-1bit/License.txt
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
|
||||||
|
1-Bit Pack (1.2)
|
||||||
|
|
||||||
|
Created/distributed by Kenney (www.kenney.nl)
|
||||||
|
Creation date: 09-11-2021
|
||||||
|
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
License: (Creative Commons Zero, CC0)
|
||||||
|
http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
|
||||||
|
This content is free to use in personal, educational and commercial projects.
|
||||||
|
|
||||||
|
Support us by crediting Kenney or www.kenney.nl (this is not mandatory)
|
||||||
|
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
Donate: http://support.kenney.nl
|
||||||
|
Patreon: http://patreon.com/kenney/
|
||||||
|
|
||||||
|
Follow on Twitter for updates:
|
||||||
|
http://twitter.com/KenneyNL
|
32
game/assets/kenney-1bit/Tilemap/sample_fantasy.tmx
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<map version="1.2" tiledversion="2018.12.22" orientation="orthogonal" renderorder="right-down" width="48" height="24" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="1">
|
||||||
|
<tileset firstgid="1" source="tileset_colored.tsx"/>
|
||||||
|
<layer id="2" name="Tile Layer 1" width="48" height="24">
|
||||||
|
<data encoding="csv">
|
||||||
|
1,1,33,1,1,68,1,68,1,1,1,1,1,1,1,6,1,1,6,33,33,33,1,1,1,1,1,1,1,2,6,6,1,1,137,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,68,33,68,1,1,1,1,138,2684354697,2684354697,2684354697,2684354697,2684354697,2684354697,2684354697,2684354698,2,2,1,488,102,102,102,102,102,102,102,488,1,68,68,1,33,137,1,1,1,6,68,1,1,1,1,1,1,1,1,
|
||||||
|
68,6,6,68,1,6,1,1,137,385,355,355,355,355,355,385,137,33,33,1,488,1,1,1,1,1,1,1,488,1,6,6,68,1,137,1,1,68,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
6,33,68,33,2,1,1,1,137,417,387,360,360,360,387,417,137,1,68,68,488,1,450,1,452,1,449,1,488,1,1,33,68,1,137,1,33,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
68,1,1,68,2,1,1,1,137,417,1,417,326,417,1,417,137,1,33,1,488,1,3,3,3,3,3,1,488,1,1,33,68,1,137,1,68,6,68,2,1,1,1,1,1,1,1,1,
|
||||||
|
2,2,6,68,33,1,2,1,137,417,1,1,41,1,1,417,137,1,1,1,488,1,449,1,3,1,450,1,488,71,1,1,138,2684354697,3221225610,1,68,2,33,1,1,1,1,1,1,1,1,1,
|
||||||
|
68,1,68,68,6,1,1,1,137,417,1,1610612781,3221225515,227,1,417,137,6,1,71,488,1,1,1,3,481,1,1,488,1,71,1,137,68,1,1,68,33,1,68,1,1,1,1,1,1,1,1,
|
||||||
|
68,33,6,6,6,1,1,1,137,417,1,1,43,2684354605,1,417,137,1,1,1,488,1,451,1,3,1,451,1,488,1,1,1,137,1,68,33,1,33,1,1,2,68,1,1,1,1,1,1,
|
||||||
|
6,6,68,68,1,1,1,1,137,386,355,355,355,355,355,386,137,1,6,1,488,102,488,102,3,102,488,102,488,1,208,208,137,6,2,33,68,33,68,68,68,68,68,1,1,1,1,1,
|
||||||
|
1,2,2,33,2,33,1,1,137,417,387,417,421,417,387,417,137,1,1,1,1,38,1,1,3,1,1,1,1,1,208,208,137,1,1,1,68,1,6,33,1,33,2,1,1,1,1,1,
|
||||||
|
1,33,33,33,1,33,1,1,1610612874,2684354697,2684354697,2684354697,197,2684354697,2684354697,2684354697,3221225610,1,1,1,38,1,1,1,3,3,3,3,3,1,208,208,1610612874,2684354697,2684354697,2684354697,2684354698,1,33,68,68,33,1,68,1,1,1,1,
|
||||||
|
1,33,1,33,2,1,1,68,1,2,1,1,41,1,6,1,1,1,1,1,1,6,358,358,358,166,166,166,41,1,1,1,1,1,68,1,137,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
68,2,33,1,1,1,68,33,355,1,1,1,41,2,1,1,6,359,359,359,1,1,422,293,422,1,6,1,43,2684354601,2684354601,2684354601,2684354601,2684354603,2684354601,2684354601,167,2684354601,2684354601,2684354601,2684354601,2684354601,2684354601,2684354601,2684354601,2684354601,2684354601,2684354601,
|
||||||
|
68,6,1,1,1,1,1,355,418,417,1,2,41,1,1,6,359,556,417,556,359,1,1,41,2,6,1,1,41,1,1,1,68,3221225513,1,1,137,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
68,1,1,1,1,1,354,417,417,417,369,1,41,1,1,1,417,556,297,556,417,1,1,43,2684354601,2684354601,2684354601,2684354601,3221225514,1,491,492,493,3221225513,38,1,137,1,33,1,6,68,33,6,6,1,2,1,
|
||||||
|
1,1,68,1,1,1,1,3,1,355,1610612781,2684354601,3221225515,1,1,1,1,1,41,1,2,241,6,41,1,1,38,1,1,1,523,524,525,3221225513,1,38,137,1,68,68,1,1,1,68,6,2,68,1,
|
||||||
|
6,68,1,1,1,401,1,1,3,417,417,1,41,1,453,1,1,2,1610612778,2684354603,2684354601,2684354601,2684354601,3221225515,1,358,358,358,358,1,1,1610612778,2684354601,3221225514,1,1,137,68,1,33,33,6,68,33,1,1,1,1,
|
||||||
|
68,6,6,68,1,1,2147484017,417,401,417,417,2147484002,41,1,45,1,1,6,1,41,1,2,1,3221225513,2147483919,424,488,292,488,1,206,206,206,206,206,1,137,1,1,1,2,68,68,2,1,1,1,1,
|
||||||
|
33,2,2,68,68,1,1,3,3,3,2,1,41,1,41,2,1,1,2,41,1,38,1,3221225513,1,1,1,3221225513,1,1,206,206,206,206,206,1,137,1,1,1,68,2,68,6,68,1,1,1,
|
||||||
|
2,2,68,68,1,1,1,1,1,1,1,1,1610612778,2684354601,1610612779,2684354601,2684354601,2684354601,2684354603,3221225514,1,1,359,359,2684354601,2684354601,2684354601,3221225514,6,1,1,1,1,1,1,1,137,1,68,1,1,6,33,1,2,1,1,1,
|
||||||
|
1,33,33,68,33,33,1,1,1,33,1,1,1,1,1,1,38,1,3221225513,1,1,359,417,417,359,1,2,6,1,68,1,138,2684354697,2684354697,2684354697,2684354697,3221225610,1,1,1,33,1,6,2,1,1,1,1,
|
||||||
|
68,68,33,1,2,1,6,68,6,1,68,1,1,1,1,1,1,6,3221225513,38,1,417,417,293,417,1,1,1,68,1,1,137,1,1,1,1,1,1,1,68,6,68,1,1,68,33,1,1,
|
||||||
|
68,68,1,33,33,6,1,6,1,1,6,1,33,6,1,1,1,1,3221225513,1,1,1,1,41,6,1,1,138,2684354697,2684354697,2684354697,3221225610,1,6,68,68,1,6,1,68,6,33,68,1,1,6,1,1,
|
||||||
|
33,33,68,68,2,1,2,2,68,33,6,68,1,1,6,1,1,1,1610612778,2684354601,2684354601,2684354601,2684354601,3221225514,1,1,1,137,1,1,1,1,33,33,1,33,6,68,68,2,68,1,1,1,1,1,1,1
|
||||||
|
</data>
|
||||||
|
</layer>
|
||||||
|
</map>
|
32
game/assets/kenney-1bit/Tilemap/sample_interior.tmx
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<map version="1.2" tiledversion="2018.12.22" orientation="orthogonal" renderorder="right-down" width="48" height="24" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="1">
|
||||||
|
<tileset firstgid="1" source="tileset_colored.tsx"/>
|
||||||
|
<layer id="2" name="Tile Layer 1" width="48" height="24">
|
||||||
|
<data encoding="csv">
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,417,419,417,417,417,419,417,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,35,1,417,1,269,236,237,1,417,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,35,1,1,1,417,1,1,1,1,63,417,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,417,417,417,417,417,417,417,292,417,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,417,417,417,417,417,417,1,228,1,265,1,1,5,417,1,35,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,419,1,1,257,229,417,1,1,1,1,1,154,1,417,35,1,35,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,417,262,1,1,4,292,1,258,258,258,1,1,1,417,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,417,1,1,486,1,417,1,260,261,2147483908,89,1,1,417,419,417,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,417,417,417,417,417,417,1,258,258,258,1,1,258,273,258,417,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,419,1,1,257,229,417,1,1,1,1,1,1,258,305,258,417,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,417,262,1,1,4,292,1,1,218,59,1,1,258,337,258,417,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,417,1,1,486,1,417,1,1,1,1,1,1,1,1,1,417,2,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,417,417,417,417,417,417,485,1,1,1,5,1,1,1,485,417,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,417,417,417,419,417,292,417,419,417,417,417,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,35,1,1,2,1,1,2,1,1,1,41,239,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,41,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,41,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,41,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,41,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,41,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,41,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||||
|
</data>
|
||||||
|
</layer>
|
||||||
|
</map>
|
32
game/assets/kenney-1bit/Tilemap/sample_platformer.tmx
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<map version="1.2" tiledversion="2018.12.22" orientation="orthogonal" renderorder="right-down" width="48" height="24" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="1">
|
||||||
|
<tileset firstgid="1" source="tileset_colored.tsx"/>
|
||||||
|
<layer id="2" name="Tile Layer 1" width="48" height="24">
|
||||||
|
<data encoding="csv">
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,55,1,1,55,1,1,1,1,1,1,1,1,1,1,1,55,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,55,1,1,55,1,1,1,1,1,1,1,1,1,1,1,55,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,55,1,1,55,1,1,1,1,1,1,1,1,1,1,1,55,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,55,1,1,55,1,1,1,1,1,1,1,1,1,1,1,55,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,87,1,1,55,1,1,1,1,1,1,1,1,1,1,1,55,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,55,1,1,55,1,1,1,1,1,1,1,1,1,1,1,55,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,55,1,1,55,1,152,1,1,1,1,1,1,1,1,1,55,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,55,1,1,55,1,88,1,1,1,1,1,1,1,1,1,55,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,55,1,1,55,214,215,2147483863,216,1,1,1,1,1,1,1,55,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,151,55,1,1,55,1,1,1,1,1,1,1,1,1,1,1,87,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,88,55,1,1,55,1,1,1,1,1,1,1,246,1,306,1,55,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,19,20,20,20,118,1,55,1,1,1,1,1,1,1,214,215,216,1,55,1,1,1,1,151,151,86,1,1,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,1,1,1,53,1,87,1,1,1,280,1,86,183,1,1,1,1,87,1,151,1,19,20,20,20,20,21,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,52,1,1,53,1,55,1,1,1,19,20,20,21,1,1,1,1,55,1,151,1,51,1,1,1,1,53,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,1,1,1,53,1,87,151,1,1,51,1,1,53,1,1,1,2147483956,88,86,1,86,51,1,1,1,1,53,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,1,1,1,53,1,55,86,1,117,148,1,1,53,179,179,179,19,20,20,20,20,148,1,1,1,1,53,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,1,1,52,147,20,20,20,20,148,1,1,1,53,1,1,1,51,1,1,1,1,1,1,1,1,1,53,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,86,1,1,51,1,1,1,1,1,1,1,1,1,1,1,1,53,1,1,1,51,1,1,1,1,1,1,1,1,1,53,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,19,20,20,20,148,1,1,1,1,1,1,1,52,1,1,1,1,53,23,23,23,51,1,1,1,1,1,1,1,1,1,53,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,51,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,147,20,20,20,148,1,1,1,1,1,1,1,1,1,53,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,51,1,1,1,1,1,1,1,1,1,1,52,1,1,1,1,1,1,1,1,1,1,1,1,52,1,1,1,1,1,1,53,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,19,20,20,20,148,1,1,1,1,1,1,1,1,1,1,1,1,1,52,1,1,1,1,1,1,1,1,52,1,1,52,1,1,1,1,53,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,51,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,53,1,1,1,1,
|
||||||
|
1,1,1,1,1,1,1,1,51,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,53,1,1,1,1
|
||||||
|
</data>
|
||||||
|
</layer>
|
||||||
|
</map>
|
32
game/assets/kenney-1bit/Tilemap/sample_urban.tmx
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<map version="1.2" tiledversion="2018.12.22" orientation="orthogonal" renderorder="right-down" width="48" height="24" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="1">
|
||||||
|
<tileset firstgid="1" source="tileset_colored.tsx"/>
|
||||||
|
<layer id="2" name="Tile Layer 1" width="48" height="24">
|
||||||
|
<data encoding="csv">
|
||||||
|
6,6,6,358,358,358,358,2,1,161,1,488,488,488,1,1,1,1,1,17,73,17,593,594,595,1,68,68,6,2,6,1610612907,1610612906,1610612906,169,169,169,169,169,3221225642,1,2147483716,2147483649,2147484243,2147484242,2147484241,2147483665,2147483721,
|
||||||
|
1,1,1,488,328,328,488,1,1,161,1,422,328,422,2,2,2,2,33,17,73,17,556,556,556,68,2,6,33,68,68,68,2,2,1610612907,1610612906,1610612906,1610612906,1610612906,3221225643,1,2147483650,2147483716,2147484204,2147484204,2147484204,2147483665,2147483721,
|
||||||
|
17,17,17,17,3221225486,14,17,17,17,107,17,17,17,17,17,17,33,6,33,17,73,17,556,556,556,1,1,1,68,1,1,1,6,1,1,2147483654,2147483649,2147483649,2147483649,2147483716,2147483649,2147483649,2147483649,2147484204,2147484204,2147484204,2147483665,2147483721,
|
||||||
|
1610612750,1610612750,1610612750,1610612750,1,1,1610612750,1610612750,1610612750,107,1610612750,1610612750,1610612750,1610612750,1610612752,17,1,33,1,17,73,17,555,326,555,130,130,130,130,130,130,130,130,130,2147483778,2147483778,2147483778,2147483778,2147483778,2147483778,2147483778,2147483778,2147483778,2147484203,2147483974,2147484203,2147483665,2147483721,
|
||||||
|
2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,107,2684354606,1610612782,1610612782,3221225519,14,17,529,530,531,17,73,17,17,17,17,17,17,17,17,17,17,17,17,17,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483721,
|
||||||
|
2684354574,2684354574,2684354574,2684354574,2684354574,2684354574,2684354574,2684354574,2684354574,107,2684354574,2684354574,1,46,14,17,561,1,563,17,73,17,398,1,1,1,529,530,530,531,1,1,1,1,130,130,130,130,2147484179,2147484178,2147484178,2147484177,2147483649,2147483649,2147483649,2147484046,2147483665,2147483721,
|
||||||
|
17,17,427,427,427,427,427,427,17,107,17,17,3221225486,46,15,17,593,594,595,17,73,17,1,529,530,531,561,1,1,563,1,1,33,1,130,70,2147483649,2147483649,2147484211,2147483649,2147483649,2147484209,2147484179,2147484178,2147484177,2147483649,2147483665,2147483721,
|
||||||
|
1,1,1,428,1,399,1,397,1,161,1,17,751,46,14,17,587,556,587,17,73,17,1,561,1,563,488,625,626,626,626,627,1,1,529,530,530,530,530,530,531,2147484136,2147484211,2147483649,2147484209,2147483649,2147483665,2147483721,
|
||||||
|
1,1,1,428,1,3,1,429,3,161,33,17,3221225486,46,14,17,587,556,587,17,73,17,1,593,594,595,488,657,1,1,1,659,1,68,561,1,1,1,1,1,563,2147484136,2147484243,2147484242,2147484241,2147483649,2147483665,2147483721,
|
||||||
|
1,1,462,462,462,1,3,1,1,161,1,17,3221225486,46,14,17,587,556,587,17,73,17,1,556,556,556,1,689,690,690,690,691,68,1,593,594,594,594,594,594,595,2147483649,2147484204,2147484204,2147484204,2147483649,2147483665,2147483721,
|
||||||
|
1,1,432,432,432,1,393,394,2147484041,161,401,17,3221225486,46,719,17,587,556,587,17,73,17,430,556,556,556,1,488,424,488,424,488,1,1,555,555,555,555,555,555,555,2147483649,2147484204,2147484204,2147484204,2147484078,2147483665,2147483721,
|
||||||
|
1,1,1,1,1,1,1,3,3,161,68,17,3221225486,46,14,17,587,328,587,17,73,17,130,555,326,555,1,488,424,362,424,488,1,1,555,331,2147483979,555,331,2147483979,555,2147483649,2147484203,2147483974,2147484203,2147483778,2147483665,2147483721,
|
||||||
|
99,99,99,99,99,99,99,99,99,161,99,17,367,46,719,17,398,17,1,17,73,17,1,35,17,35,1,6,6,17,6,6,1,1,2147483649,3221225486,14,2147483649,3221225486,14,2147483649,2147483649,2147483683,2147483665,2147483683,2147483649,2147483665,2147483721,
|
||||||
|
17,17,17,17,17,17,17,17,17,107,17,17,3221225486,46,14,17,17,17,17,17,73,17,17,17,17,17,17,17,17,17,17,2147483665,2147483665,2147483665,2147483665,3221225486,14,2147483665,3221225486,14,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483721,
|
||||||
|
1610612750,1610612750,1610612750,1610612750,1610612750,1610612750,1610612750,1610612750,1610612750,107,750,1610612750,1,46,1,1610612751,1610612750,1610612750,1610612750,1610612750,1,1610612750,716,1610612750,716,1610612750,1610612751,653,654,1610612750,1610612750,3758096398,3758096398,3758096398,3758096398,1,1,3758096398,1,653,654,3758096399,3758096398,716,3758096398,716,3758096398,2147483649,
|
||||||
|
2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,3221225520,2684354606,2684354606,107,2684354606,2684354606,2684354606,48,2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,2684354606,1610612782,1610612782,536870958,536870958,536870958,536870958,536870958,536870958,536870958,536870958,3758096430,3758096430,536870958,536870958,536870958,536870958,536870958,536870958,536870958,536870958,
|
||||||
|
2684354574,2684354574,2684354574,2684354574,2684354574,1,46,1,2684354574,107,2684354574,2684354574,2684354574,2147484270,2147484269,2684354574,2684354574,1,2684354574,2147484302,2147484301,2684354574,2147484398,2684354574,2684354574,2684354574,2684354574,2684354574,2684354574,1,46,2147483649,536870926,536870926,536870926,536870926,2147483649,2147483694,2147483649,536870926,536870926,536870926,536870926,536870926,536870926,2147484398,536870926,2147484302,
|
||||||
|
17,17,17,17,17,3221225486,46,14,17,107,17,17,17,17,17,17,17,73,17,17,17,17,17,17,17,17,17,17,17,3221225486,46,14,2147483665,2147483665,2147483665,2147483665,2147483662,2147483694,1073741838,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,2147483665,
|
||||||
|
33,2,68,1,17,3221225486,46,14,17,161,1,1,1,1,1,1,17,73,17,1,1,1,1,398,1,1,1,1,17,3221225677,3221225677,3221225677,17,130,130,2147483665,1073742029,1073742029,1073742029,2147483665,2147483649,2147483649,2147483649,2147483649,2147484046,2147483649,2147483649,2147483649,
|
||||||
|
6,68,68,1,17,3221225486,46,14,17,161,625,626,626,626,627,1,17,73,17,1,529,530,531,1,68,2,1,2,17,3221225486,46,751,17,1,2147483649,2147483665,2147483662,2147483694,1073741838,2147483665,2147483650,2147483649,2147483650,2147483716,2147483649,2147484179,2147484178,2147484177,
|
||||||
|
2684354730,2684354731,2,68,17,3221225486,46,14,17,161,657,1,1,1,659,1,17,73,17,1,561,1,563,1,1,68,6,1,17,719,46,14,17,360,360,2147483665,2147483662,2147483694,1073741838,2147483665,2147483649,2147483654,2147483716,2147483649,2147483649,2147484211,2147483649,2147484209,
|
||||||
|
169,3221225642,2,68,17,3221225486,46,14,17,161,689,690,690,690,691,130,17,73,17,130,593,594,595,530,530,530,531,1,17,3221225486,46,14,17,326,555,2147483665,2147483662,2147483694,1073741838,2147483665,2147483649,2147484179,2147484178,2147484178,2147484178,2147484243,2147484242,2147484241,
|
||||||
|
169,169,2684354731,33,17,3221225486,46,14,17,161,488,424,488,424,488,1,17,73,17,1,556,556,556,1,1,1,563,1,17,719,46,15,17,2147483665,2147483665,2147483665,2147483663,2147483694,1073741838,2147483665,2147483649,2147484211,2147483649,2147483649,2147483649,2147484204,2147484204,2147484204,
|
||||||
|
169,169,3221225642,1,17,3221225486,46,14,17,161,488,424,488,424,488,1,17,73,17,1,556,556,556,594,594,594,595,1,17,3221225486,46,14,17,2147483665,2147483665,2147483665,2147483662,2147483694,1073741838,2147483665,2147483649,2147484243,2147484242,2147484242,2147484242,2147484204,2147484204,2147484204
|
||||||
|
</data>
|
||||||
|
</layer>
|
||||||
|
</map>
|
4
game/assets/kenney-1bit/Tilemap/tileset_colored.tsx
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<tileset version="1.2" tiledversion="2018.12.22" name="colored" tilewidth="16" tileheight="16" spacing="1" tilecount="1024" columns="32">
|
||||||
|
<image source="tileset_legacy.png" width="543" height="543"/>
|
||||||
|
</tileset>
|
BIN
game/assets/kenney-1bit/Tilemap/tileset_legacy.png
Normal file
After Width: | Height: | Size: 26 KiB |
9
game/assets/kenney-1bit/Tilesheet.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Tilesheet information:
|
||||||
|
|
||||||
|
Tile size • 16px × 16px
|
||||||
|
Space between tiles • 1px × 1px
|
||||||
|
---
|
||||||
|
Total tiles (horizontal) • 49 tiles
|
||||||
|
Total tiles (vertical) • 22 tiles
|
||||||
|
---
|
||||||
|
Total tiles in sheet • 1078 tiles
|
BIN
game/assets/kenney-1bit/Tilesheet/colored-transparent.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
game/assets/kenney-1bit/Tilesheet/colored-transparent_packed.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
game/assets/kenney-1bit/Tilesheet/colored.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
game/assets/kenney-1bit/Tilesheet/colored_packed.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
game/assets/kenney-1bit/Tilesheet/monochrome-transparent.png
Normal file
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 17 KiB |
BIN
game/assets/kenney-1bit/Tilesheet/monochrome.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
game/assets/kenney-1bit/Tilesheet/monochrome_packed.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
game/assets/tiles.png
Normal file
After Width: | Height: | Size: 17 KiB |
69
game/game.odin
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
package game
|
||||||
|
|
||||||
|
import "core:fmt"
|
||||||
|
import rl "vendor:raylib"
|
||||||
|
|
||||||
|
|
||||||
|
player : Player
|
||||||
|
world : World
|
||||||
|
|
||||||
|
|
||||||
|
main :: proc() {
|
||||||
|
|
||||||
|
rl.InitWindow(1280, 720, "Odin game")
|
||||||
|
|
||||||
|
player.position.x = CELL_SIZE * 5
|
||||||
|
player.position.y = CELL_SIZE * 5
|
||||||
|
|
||||||
|
load_tilemap()
|
||||||
|
defer unload_tilemap()
|
||||||
|
|
||||||
|
fill_world_grid_with_nothing(&world)
|
||||||
|
|
||||||
|
t := Tile {
|
||||||
|
type = .WALL,
|
||||||
|
color = rl.WHITE,
|
||||||
|
tilemap_pos = {0,1},
|
||||||
|
}
|
||||||
|
t2 := Tile {
|
||||||
|
type = .WALL,
|
||||||
|
color = rl.WHITE,
|
||||||
|
tilemap_pos = {0,1},
|
||||||
|
}
|
||||||
|
t3 := Tile {
|
||||||
|
type = .WALL,
|
||||||
|
color = rl.WHITE,
|
||||||
|
tilemap_pos = {0,1},
|
||||||
|
}
|
||||||
|
|
||||||
|
set_grid_tile(&world, {3,3}, t)
|
||||||
|
set_grid_tile(&world, {3,4}, t2)
|
||||||
|
set_grid_tile(&world, {3,5}, t3)
|
||||||
|
|
||||||
|
fmt.println(world.grid[3][3])
|
||||||
|
|
||||||
|
game_loop()
|
||||||
|
}
|
||||||
|
|
||||||
|
game_loop :: proc() {
|
||||||
|
for !rl.WindowShouldClose() {
|
||||||
|
|
||||||
|
update()
|
||||||
|
|
||||||
|
rl.BeginDrawing()
|
||||||
|
rl.ClearBackground(rl.BLACK)
|
||||||
|
|
||||||
|
draw()
|
||||||
|
|
||||||
|
rl.EndDrawing()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
update :: proc() {
|
||||||
|
handle_player_input(&player)
|
||||||
|
}
|
||||||
|
|
||||||
|
draw :: proc() {
|
||||||
|
draw_player(&player)
|
||||||
|
draw_world(&world)
|
||||||
|
}
|
6
game/math.odin
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package game
|
||||||
|
|
||||||
|
Vec2i :: struct {
|
||||||
|
x: u32,
|
||||||
|
y:u32,
|
||||||
|
}
|
39
game/player.odin
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
package game
|
||||||
|
|
||||||
|
import rl "vendor:raylib"
|
||||||
|
import "core:fmt"
|
||||||
|
|
||||||
|
Player :: struct {
|
||||||
|
position : rl.Vector2,
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_player_input :: proc(p : ^Player) {
|
||||||
|
|
||||||
|
if rl.IsKeyPressed(.RIGHT) {
|
||||||
|
p.position.x += CELL_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
if rl.IsKeyPressed(.LEFT) {
|
||||||
|
p.position.x -= CELL_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
if rl.IsKeyPressed(.UP) {
|
||||||
|
p.position.y -= CELL_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
if rl.IsKeyPressed(.DOWN) {
|
||||||
|
p.position.y += CELL_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
get_player_grid_position :: proc(player:^Player) -> rl.Vector2 {
|
||||||
|
grid_pos_x := player.position.x / CELL_SIZE
|
||||||
|
grid_pos_y := player.position.y / CELL_SIZE
|
||||||
|
|
||||||
|
return {grid_pos_x, grid_pos_y}
|
||||||
|
}
|
||||||
|
|
||||||
|
draw_player :: proc(player:^Player) {
|
||||||
|
draw_tile({27,0}, player.position, rl.WHITE)
|
||||||
|
}
|
35
game/tilemap.odin
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
package game
|
||||||
|
|
||||||
|
import rl "vendor:raylib"
|
||||||
|
|
||||||
|
TILE_SIZE :: 16
|
||||||
|
TILE_IMAGE_PATH :: "assets/tiles.png"
|
||||||
|
|
||||||
|
tilemap_image : rl.Texture2D
|
||||||
|
|
||||||
|
tilesX : i32
|
||||||
|
tilesY : i32
|
||||||
|
|
||||||
|
load_tilemap :: proc() {
|
||||||
|
tilemap_image = rl.LoadTexture(TILE_IMAGE_PATH)
|
||||||
|
|
||||||
|
tilesX = tilemap_image.width / TILE_SIZE
|
||||||
|
tilesY = tilemap_image.height / TILE_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
unload_tilemap :: proc() {
|
||||||
|
rl.UnloadTexture(tilemap_image)
|
||||||
|
}
|
||||||
|
|
||||||
|
draw_tile :: proc(tilemap_pos:rl.Vector2, draw_pos:rl.Vector2, color:rl.Color) {
|
||||||
|
source_rect := rl.Rectangle {
|
||||||
|
x = tilemap_pos.x * TILE_SIZE,
|
||||||
|
y = tilemap_pos.y * TILE_SIZE,
|
||||||
|
width = TILE_SIZE,
|
||||||
|
height = TILE_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
rl.DrawTextureRec(tilemap_image, source_rect, draw_pos, color)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
54
game/world.odin
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
package game
|
||||||
|
|
||||||
|
import rl "vendor:raylib"
|
||||||
|
import "core:fmt"
|
||||||
|
|
||||||
|
|
||||||
|
CELL_SIZE :: 16
|
||||||
|
WORLD_SIZE :: 10
|
||||||
|
|
||||||
|
World :: struct {
|
||||||
|
grid: [WORLD_SIZE][WORLD_SIZE]Tile
|
||||||
|
}
|
||||||
|
|
||||||
|
Tile :: struct {
|
||||||
|
type: TileType,
|
||||||
|
tilemap_pos:rl.Vector2,
|
||||||
|
color:rl.Color,
|
||||||
|
}
|
||||||
|
|
||||||
|
TileType :: enum {
|
||||||
|
NOTHING,
|
||||||
|
WALL,
|
||||||
|
DOOR,
|
||||||
|
FLOOR,
|
||||||
|
}
|
||||||
|
|
||||||
|
set_grid_tile :: proc(w:^World, pos:Vec2i, t:Tile) {
|
||||||
|
w.grid[pos.x][pos.y] = t
|
||||||
|
}
|
||||||
|
|
||||||
|
fill_world_grid_with_nothing :: proc(w:^World) {
|
||||||
|
for x in 0..< len(w.grid) {
|
||||||
|
for y in 0..<len(w.grid) {
|
||||||
|
w.grid[x][y] = Tile {
|
||||||
|
type = .NOTHING,
|
||||||
|
tilemap_pos = {0,0}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
draw_world :: proc(w:^World) {
|
||||||
|
for x in 0..< len(w.grid) {
|
||||||
|
for y in 0..< len(w.grid) {
|
||||||
|
tile := w.grid[x][y]
|
||||||
|
posX := x * TILE_SIZE
|
||||||
|
posY := y * TILE_SIZE
|
||||||
|
|
||||||
|
if tile.type != .NOTHING {
|
||||||
|
draw_tile(tile.tilemap_pos, {f32(posX), f32(posY)}, tile.color)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|