Refactor game map to use tileset format, add sea shell object spawning, implement audio effects for chopping and inventory actions, update scene configuration for proper scaling and centering.
This commit is contained in:
parent
8a386a4789
commit
51e919b8aa
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,440 +1,162 @@
|
|||
{ "compressionlevel":-1,
|
||||
"height":40,
|
||||
"infinite":true,
|
||||
"layers":[
|
||||
{
|
||||
"chunks":[
|
||||
{
|
||||
"data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 5,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 5, 2,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5, 4, 2,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 4, 4, 2],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":0,
|
||||
"y":0
|
||||
},
|
||||
{
|
||||
"data":[1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 17, 17, 17, 17, 17,
|
||||
1, 1, 1, 1, 1, 1, 3, 3, 17, 17, 17, 17, 15, 15, 15, 15,
|
||||
1, 1, 1, 1, 1, 3, 3, 17, 17, 17, 17, 17, 17, 17, 15, 15,
|
||||
1, 1, 3, 3, 3, 3, 3, 3, 17, 17, 17, 17, 17, 17, 17, 17,
|
||||
3, 3, 3, 3, 3, 3, 13, 13, 13, 17, 17, 17, 17, 17, 17, 17,
|
||||
3, 3, 3, 3, 13, 13, 13, 13, 13, 2, 2, 2, 2, 17, 17, 17,
|
||||
3, 3, 3, 3, 13, 13, 13, 13, 2, 2, 2, 2, 2, 2, 17, 17,
|
||||
3, 3, 3, 5, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":16,
|
||||
"y":0
|
||||
},
|
||||
{
|
||||
"data":[17, 17, 17, 17, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7,
|
||||
15, 15, 15, 17, 17, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7,
|
||||
15, 15, 15, 15, 17, 17, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7,
|
||||
15, 15, 15, 15, 15, 17, 13, 13, 13, 5, 5, 5, 6, 6, 6, 6,
|
||||
15, 15, 15, 15, 17, 17, 13, 13, 13, 13, 13, 13, 5, 5, 6, 6,
|
||||
17, 17, 17, 17, 17, 17, 13, 2, 2, 2, 2, 13, 13, 5, 5, 6,
|
||||
17, 17, 17, 17, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 5, 5,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 5, 5,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 5, 5,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 13,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 13,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 13,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 14, 14, 14,
|
||||
2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 14, 14, 15, 15, 14],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":32,
|
||||
"y":0
|
||||
},
|
||||
{
|
||||
"data":[7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 0, 0, 0, 0,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 0, 0, 0, 0,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 2, 0, 0, 0, 0,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 2, 0, 0, 0, 0,
|
||||
6, 7, 7, 7, 7, 7, 7, 7, 6, 6, 2, 2, 0, 0, 0, 0,
|
||||
6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 0, 0, 0, 0,
|
||||
6, 6, 7, 7, 7, 7, 7, 6, 7, 7, 2, 2, 0, 0, 0, 0,
|
||||
6, 6, 6, 6, 7, 7, 6, 6, 7, 7, 2, 2, 0, 0, 0, 0,
|
||||
5, 6, 6, 6, 6, 6, 6, 8, 7, 7, 2, 2, 0, 0, 0, 0,
|
||||
5, 5, 6, 6, 6, 16, 8, 8, 8, 2, 2, 2, 0, 0, 0, 0,
|
||||
5, 5, 16, 16, 16, 16, 8, 8, 8, 2, 2, 2, 0, 0, 0, 0,
|
||||
13, 16, 16, 16, 16, 16, 8, 8, 2, 2, 2, 2, 0, 0, 0, 0,
|
||||
13, 16, 16, 16, 17, 17, 8, 2, 2, 2, 2, 2, 0, 0, 0, 0,
|
||||
13, 13, 16, 17, 17, 15, 15, 2, 2, 2, 2, 2, 0, 0, 0, 0,
|
||||
13, 13, 17, 17, 17, 15, 15, 12, 12, 12, 2, 2, 0, 0, 0, 0,
|
||||
14, 13, 17, 17, 15, 15, 15, 12, 11, 12, 12, 12, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":48,
|
||||
"y":0
|
||||
},
|
||||
{
|
||||
"data":[1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 4, 4, 2,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 4, 4, 2,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 4, 4, 4,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 3, 5, 4, 4, 4,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 4, 4,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5, 4,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 3, 3, 5, 5,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 12, 3, 3, 5,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 11, 12, 12, 3, 3,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 11, 11, 12, 12, 3,
|
||||
1, 1, 1, 1, 1, 1, 1, 11, 11, 11, 11, 11, 11, 12, 12, 12,
|
||||
1, 1, 1, 1, 1, 1, 1, 11, 11, 11, 11, 11, 11, 11, 12, 12,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 11, 11, 11, 11, 12, 12,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 11, 11, 11, 11, 11,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 11, 11, 11, 11, 11,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 11, 11],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":0,
|
||||
"y":16
|
||||
},
|
||||
{
|
||||
"data":[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
5, 4, 4, 4, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 2,
|
||||
5, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 5, 2,
|
||||
3, 5, 5, 5, 5, 3, 3, 3, 12, 12, 12, 12, 12, 3, 5, 5,
|
||||
12, 3, 3, 3, 3, 3, 12, 12, 11, 11, 11, 11, 12, 12, 3, 3,
|
||||
12, 12, 3, 3, 12, 12, 11, 11, 11, 11, 11, 12, 12, 12, 3, 3,
|
||||
12, 12, 12, 12, 12, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 3,
|
||||
11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
|
||||
11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11,
|
||||
11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":16,
|
||||
"y":16
|
||||
},
|
||||
{
|
||||
"data":[2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 13, 14, 15, 15, 15, 15,
|
||||
2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 14, 14, 15, 15, 15, 15,
|
||||
2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 14, 15, 15, 15, 15, 15,
|
||||
2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 14, 13, 15, 15, 15, 15,
|
||||
2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 14, 14, 15, 15, 15, 15,
|
||||
2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 14, 15, 15, 15, 15,
|
||||
2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 14, 14, 14, 14, 14,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 13, 3, 13,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 3, 3, 3, 3,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 3, 3, 1, 1, 1,
|
||||
2, 2, 2, 2, 2, 2, 3, 2, 3, 3, 3, 1, 1, 1, 1, 1,
|
||||
3, 3, 2, 2, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1,
|
||||
12, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
11, 3, 11, 11, 11, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
11, 11, 11, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":32,
|
||||
"y":16
|
||||
},
|
||||
{
|
||||
"data":[14, 14, 17, 17, 15, 15, 15, 12, 11, 11, 11, 11, 0, 0, 0, 0,
|
||||
15, 14, 14, 17, 15, 15, 12, 11, 11, 11, 11, 11, 0, 0, 0, 0,
|
||||
15, 15, 14, 3, 17, 12, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0,
|
||||
15, 15, 14, 3, 12, 11, 11, 11, 11, 11, 1, 1, 0, 0, 0, 0,
|
||||
14, 14, 14, 3, 11, 11, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
14, 13, 13, 11, 11, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
14, 13, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
13, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":48,
|
||||
"y":16
|
||||
},
|
||||
{
|
||||
"data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 11,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":0,
|
||||
"y":32
|
||||
},
|
||||
{
|
||||
"data":[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
|
||||
11, 11, 11, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 1,
|
||||
11, 11, 1, 1, 1, 1, 1, 11, 11, 11, 11, 11, 11, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 11, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":16,
|
||||
"y":32
|
||||
},
|
||||
{
|
||||
"data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":32,
|
||||
"y":32
|
||||
},
|
||||
{
|
||||
"data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 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,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":48,
|
||||
"y":32
|
||||
}],
|
||||
"height":48,
|
||||
"id":1,
|
||||
"name":"main",
|
||||
"opacity":1,
|
||||
"startx":0,
|
||||
"starty":0,
|
||||
"type":"tilelayer",
|
||||
"visible":true,
|
||||
"width":64,
|
||||
"x":0,
|
||||
"y":0
|
||||
}],
|
||||
"nextlayerid":2,
|
||||
"nextobjectid":1,
|
||||
"orientation":"orthogonal",
|
||||
"renderorder":"right-down",
|
||||
{ "columns":10,
|
||||
"image":"images\/terrain.png",
|
||||
"imageheight":1000,
|
||||
"imagewidth":1000,
|
||||
"margin":0,
|
||||
"name":"terrain",
|
||||
"spacing":0,
|
||||
"tilecount":100,
|
||||
"tiledversion":"1.11.2",
|
||||
"tileheight":100,
|
||||
"tilesets":[
|
||||
"tiles":[
|
||||
{
|
||||
"columns":10,
|
||||
"firstgid":1,
|
||||
"image":"images\/terrain.png",
|
||||
"imageheight":1000,
|
||||
"imagewidth":1000,
|
||||
"margin":0,
|
||||
"name":"terrain",
|
||||
"spacing":0,
|
||||
"tilecount":100,
|
||||
"tileheight":100,
|
||||
"tiles":[
|
||||
"id":0,
|
||||
"properties":[
|
||||
{
|
||||
"id":0,
|
||||
"properties":[
|
||||
{
|
||||
"name":"collides",
|
||||
"type":"bool",
|
||||
"value":true
|
||||
}]
|
||||
"name":"collides",
|
||||
"type":"bool",
|
||||
"value":true
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":1,
|
||||
"properties":[
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":40
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":2,
|
||||
"properties":[
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":2
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":3,
|
||||
"properties":[
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":5
|
||||
},
|
||||
{
|
||||
"id":1,
|
||||
"properties":[
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":40
|
||||
}]
|
||||
"name":"palmTree",
|
||||
"type":"int",
|
||||
"value":2
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":4,
|
||||
"properties":[
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":0
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":7,
|
||||
"properties":[
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":8
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":8,
|
||||
"properties":[
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":15
|
||||
},
|
||||
{
|
||||
"id":2,
|
||||
"properties":[
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":2
|
||||
}]
|
||||
"name":"palmTree",
|
||||
"type":"int",
|
||||
"value":2
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":10,
|
||||
"properties":[
|
||||
{
|
||||
"name":"fish",
|
||||
"type":"int",
|
||||
"value":6
|
||||
},
|
||||
{
|
||||
"id":3,
|
||||
"properties":[
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":5
|
||||
},
|
||||
{
|
||||
"name":"palmTree",
|
||||
"type":"int",
|
||||
"value":2
|
||||
}]
|
||||
"name":"palmTree",
|
||||
"type":"int",
|
||||
"value":15
|
||||
},
|
||||
{
|
||||
"id":4,
|
||||
"properties":[
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":0
|
||||
}]
|
||||
"name":"rock",
|
||||
"type":"int",
|
||||
"value":6
|
||||
},
|
||||
{
|
||||
"id":7,
|
||||
"properties":[
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":8
|
||||
}]
|
||||
"name":"seaShell",
|
||||
"type":"int",
|
||||
"value":8
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":11,
|
||||
"properties":[
|
||||
{
|
||||
"name":"palmTree",
|
||||
"type":"int",
|
||||
"value":10
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":12,
|
||||
"properties":[
|
||||
{
|
||||
"name":"boulder",
|
||||
"type":"int",
|
||||
"value":2
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":13,
|
||||
"properties":[
|
||||
{
|
||||
"name":"boulder",
|
||||
"type":"int",
|
||||
"value":8
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":14,
|
||||
"properties":[
|
||||
{
|
||||
"name":"boulder",
|
||||
"type":"int",
|
||||
"value":20
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":16,
|
||||
"properties":[
|
||||
{
|
||||
"name":"boulder",
|
||||
"type":"int",
|
||||
"value":15
|
||||
},
|
||||
{
|
||||
"id":8,
|
||||
"properties":[
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":15
|
||||
},
|
||||
{
|
||||
"name":"palmTree",
|
||||
"type":"int",
|
||||
"value":2
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":10,
|
||||
"properties":[
|
||||
{
|
||||
"name":"palmTree",
|
||||
"type":"int",
|
||||
"value":15
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":11,
|
||||
"properties":[
|
||||
{
|
||||
"name":"palmTree",
|
||||
"type":"int",
|
||||
"value":10
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":12,
|
||||
"properties":[
|
||||
{
|
||||
"name":"boulder",
|
||||
"type":"int",
|
||||
"value":2
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":13,
|
||||
"properties":[
|
||||
{
|
||||
"name":"boulder",
|
||||
"type":"int",
|
||||
"value":8
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":14,
|
||||
"properties":[
|
||||
{
|
||||
"name":"boulder",
|
||||
"type":"int",
|
||||
"value":20
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id":16,
|
||||
"properties":[
|
||||
{
|
||||
"name":"boulder",
|
||||
"type":"int",
|
||||
"value":15
|
||||
},
|
||||
{
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":2
|
||||
}]
|
||||
}],
|
||||
"tilewidth":100
|
||||
"name":"forestTree",
|
||||
"type":"int",
|
||||
"value":2
|
||||
}]
|
||||
}],
|
||||
"tilewidth":100,
|
||||
"type":"map",
|
||||
"version":"1.10",
|
||||
"width":60
|
||||
"type":"tileset",
|
||||
"version":"1.10"
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 836 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 180 KiB |
Binary file not shown.
Binary file not shown.
16
index.html
16
index.html
|
|
@ -5,20 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Fablewood - Survival Crafting Game</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #1a1a1a;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
#game-container {
|
||||
border: 2px solid #4a752c;
|
||||
box-shadow: 0 0 20px rgba(74, 117, 44, 0.5);
|
||||
}
|
||||
body { margin: 0; background-color: black; }
|
||||
canvas { display: block; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,10 @@
|
|||
</tile>
|
||||
<tile id="10">
|
||||
<properties>
|
||||
<property name="fish" type="int" value="6"/>
|
||||
<property name="palmTree" type="int" value="15"/>
|
||||
<property name="rock" type="int" value="6"/>
|
||||
<property name="seaShell" type="int" value="8"/>
|
||||
</properties>
|
||||
</tile>
|
||||
<tile id="11">
|
||||
|
|
|
|||
BIN
raw/objects.psd
BIN
raw/objects.psd
Binary file not shown.
|
|
@ -1,11 +1,14 @@
|
|||
import { Game } from './scenes/Game.js';
|
||||
import { MenuScene } from './scenes/MenuScene.js';
|
||||
|
||||
const config = {
|
||||
type: Phaser.AUTO,
|
||||
scale: {
|
||||
mode: Phaser.Scale.RESIZE,
|
||||
mode: Phaser.Scale.FIT,
|
||||
autoCenter: Phaser.Scale.CENTER_BOTH,
|
||||
width: 1280,
|
||||
height: 720,
|
||||
parent: 'game-container'
|
||||
},
|
||||
physics: {
|
||||
default: 'arcade',
|
||||
|
|
@ -17,7 +20,7 @@ const config = {
|
|||
},
|
||||
backgroundColor: '#000000',
|
||||
scene: [
|
||||
// MenuScene,
|
||||
MenuScene,
|
||||
// Intro,
|
||||
// Tutorial,
|
||||
Game
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@ export class ObjectManager {
|
|||
const objectType = tile.properties;
|
||||
|
||||
Object.keys(objectType).forEach(key => {
|
||||
const rand = Phaser.Math.Between(1,300);
|
||||
|
||||
if (key === 'palmTree' && rand <= objectType[key]) {
|
||||
if (key === 'palmTree' && Phaser.Math.Between(1,300) <= objectType[key]) {
|
||||
const palmTree = this.scene.physics.add.sprite(x, y, 'objects', 0);
|
||||
this.scene.objects.add(palmTree);
|
||||
palmTree.setImmovable(true).setSize(60,100);
|
||||
|
|
@ -47,7 +45,7 @@ export class ObjectManager {
|
|||
doneSprite: 10
|
||||
};
|
||||
this.createHealthBar(palmTree);
|
||||
} else if (key === 'forestTree' && rand <= objectType[key]) {
|
||||
} else if (key === 'forestTree' && Phaser.Math.Between(1,300) <= objectType[key]) {
|
||||
const forestRand = Phaser.Math.Between(1,4);
|
||||
const forestTree = this.scene.physics.add.sprite(x, y, 'objects', forestRand);
|
||||
this.scene.objects.add(forestTree);
|
||||
|
|
@ -61,7 +59,7 @@ export class ObjectManager {
|
|||
doneSprite: 11
|
||||
};
|
||||
this.createHealthBar(forestTree);
|
||||
} else if (key === 'boulder' && rand <= objectType[key]) {
|
||||
} else if (key === 'boulder' && Phaser.Math.Between(1,300) <= objectType[key]) {
|
||||
const boulder = this.scene.physics.add.sprite(x, y, 'objects', 20);
|
||||
this.scene.objects.add(boulder);
|
||||
boulder.setImmovable(true);
|
||||
|
|
@ -74,6 +72,19 @@ export class ObjectManager {
|
|||
doneSprite: null
|
||||
};
|
||||
this.createHealthBar(boulder);
|
||||
} else if (key === 'seaShell' && Phaser.Math.Between(1,300) <= objectType[key]) {
|
||||
const item = this.scene.physics.add.sprite(x, y, 'objects', 5);
|
||||
this.scene.objects.add(item);
|
||||
item.setImmovable(true);
|
||||
item.props = {
|
||||
type: key,
|
||||
health: 1,
|
||||
fullHealth: 1,
|
||||
yield: 'seaShell',
|
||||
amount: [1,1],
|
||||
doneSprite: null
|
||||
};
|
||||
this.createHealthBar(item);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -148,9 +159,11 @@ export class ObjectManager {
|
|||
switch (object.props.type){
|
||||
case 'palmTree':
|
||||
object.props.health -= dmg;
|
||||
this.scene.sound.play('chop');
|
||||
break;
|
||||
case 'forestTree':
|
||||
object.props.health -= dmg;
|
||||
this.scene.sound.play('chop');
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,10 @@ export class Game extends Phaser.Scene {
|
|||
this.load.image('terrain-tileset', 'assets/images/terrain.png');
|
||||
this.load.image('backpack', 'assets/images/backpack.png');
|
||||
|
||||
// Fonts
|
||||
this.load.font('eraserDust', 'assets/fonts/EraserDust.ttf');
|
||||
// FX
|
||||
this.load.audio('chop', 'assets/fx/chop.mp3');
|
||||
this.load.audio('zip', 'assets/fx/zip.mp3');
|
||||
this.load.audio('inventory', 'assets/fx/inventory.mp3');
|
||||
|
||||
// Music
|
||||
this.load.audio('bgMusic', 'assets/music/bgMusic.mp3');
|
||||
|
|
@ -76,12 +78,14 @@ export class Game extends Phaser.Scene {
|
|||
player.stop();
|
||||
this.inventoryManager.addItem(item);
|
||||
const cam = this.cameras.main.worldView;
|
||||
this.sound.play('zip');
|
||||
this.tweens.add({
|
||||
targets: item,
|
||||
x: cam.x+cam.width-150,
|
||||
y: cam.y+cam.height-150,
|
||||
duration: 500,
|
||||
onComplete: () => {
|
||||
this.sound.play('inventory');
|
||||
item.destroy();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,161 @@
|
|||
export class MenuScene extends Phaser.Scene {
|
||||
constructor() {
|
||||
super({ key: 'MenuScene' });
|
||||
}
|
||||
|
||||
preload() {
|
||||
// Images
|
||||
this.load.image('logo', 'assets/images/logo.png');
|
||||
|
||||
// Fonts
|
||||
this.load.font('eraserDust', 'assets/fonts/EraserDust.ttf');
|
||||
|
||||
// Videos
|
||||
this.load.video('mainMenu', 'assets/videos/mainMenu.mp4');
|
||||
|
||||
// Music
|
||||
this.load.audio('menuMusic', 'assets/music/menuMusic.mp3');
|
||||
}
|
||||
|
||||
create() {
|
||||
// Add typing text
|
||||
const fullText = "Yet Another AAA Fertig Game....";
|
||||
const typingText = new TypingText(this,
|
||||
this.game.config.width / 2,
|
||||
this.game.config.height / 2,
|
||||
fullText,
|
||||
{
|
||||
fontFamily: 'eraserDust, Arial',
|
||||
fontSize: '32px',
|
||||
color: '#ffffff',
|
||||
align: 'center'
|
||||
}
|
||||
);
|
||||
|
||||
// Start typing animation
|
||||
this.time.delayedCall(1000, () => {
|
||||
typingText.startTyping();
|
||||
});
|
||||
|
||||
// Maun Menu
|
||||
this.time.delayedCall(7300, () => {
|
||||
// Play mainMenu video on loop and stretch to fill background
|
||||
this.mainMenuVideo = this.add.video(0, 0, 'mainMenu');
|
||||
this.mainMenuVideo.setOrigin(0);
|
||||
this.mainMenuVideo.scaleX = this.scale.width / 1280;
|
||||
this.mainMenuVideo.scaleY = this.scale.height / 720;
|
||||
this.mainMenuVideo.play(true);
|
||||
const logo = this.physics.add.image(610, 225, 'logo').setScale(0).setOrigin(0.5);
|
||||
this.tweens.add({
|
||||
targets: logo,
|
||||
angle: 360,
|
||||
scale: .65,
|
||||
duration: 3500,
|
||||
ease: 'Bounce',
|
||||
onComplete: () => {
|
||||
this.tweens.add({
|
||||
targets: logo,
|
||||
scale: .7,
|
||||
y: 250,
|
||||
yoyo: true,
|
||||
repeat: -1,
|
||||
duration: 3000
|
||||
});
|
||||
const typingText2 = new TypingText(this,
|
||||
this.game.config.width / 2,
|
||||
this.game.config.height / 2 + 150,
|
||||
"Use Mouse to Control your Character",
|
||||
{
|
||||
fontFamily: 'eraserDust, Arial',
|
||||
fontSize: '32px',
|
||||
color: '#ffffff',
|
||||
align: 'center'
|
||||
}
|
||||
);
|
||||
typingText2.startTyping();
|
||||
const typingText3 = new TypingText(this,
|
||||
this.game.config.width / 2,
|
||||
this.game.config.height / 2 + 200,
|
||||
"Click Here to Start",
|
||||
{
|
||||
fontFamily: 'eraserDust, Arial',
|
||||
fontSize: '32px',
|
||||
color: '#ffffff',
|
||||
align: 'center'
|
||||
}
|
||||
);
|
||||
typingText3.startTyping();
|
||||
|
||||
// Add click handler to start game
|
||||
typingText3.typingText.setInteractive({ useHandCursor: true });
|
||||
typingText3.typingText.on('pointerdown', () => {
|
||||
// Stop video and music
|
||||
if (this.mainMenuVideo) {
|
||||
this.mainMenuVideo.stop();
|
||||
}
|
||||
if (this.bgMusic) {
|
||||
this.bgMusic.stop();
|
||||
}
|
||||
|
||||
// Start Game scene
|
||||
this.scene.start('Game');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Background Music
|
||||
this.bgMusic = this.sound.add('menuMusic', { volume: 0.5 });
|
||||
this.bgMusic.loop = true;
|
||||
this.bgMusic.play();
|
||||
}
|
||||
|
||||
update(time, delta) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Typing text class implementation
|
||||
class TypingText {
|
||||
constructor(scene, x, y, text, style = {}) {
|
||||
this.scene = scene;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.text = text;
|
||||
this.style = style;
|
||||
this.fullText = text;
|
||||
|
||||
// Create empty text object
|
||||
this.typingText = scene.add.text(x, y, '', style).setShadow(3,3, '#333', 5);
|
||||
this.typingText.setOrigin(0.5);
|
||||
|
||||
// Animation properties
|
||||
this.currentCharIndex = 0;
|
||||
this.isTyping = false;
|
||||
this.typingDelay = 100; // milliseconds per character
|
||||
}
|
||||
|
||||
startTyping() {
|
||||
if (this.isTyping) return;
|
||||
|
||||
this.isTyping = true;
|
||||
this.currentCharIndex = 0;
|
||||
|
||||
// Clear existing text and start typing animation
|
||||
this.typingText.setText('');
|
||||
|
||||
const typeCharacter = () => {
|
||||
if (this.currentCharIndex < this.fullText.length) {
|
||||
this.typingText.text += this.fullText.charAt(this.currentCharIndex);
|
||||
this.currentCharIndex++;
|
||||
|
||||
// Schedule next character
|
||||
setTimeout(typeCharacter, this.typingDelay);
|
||||
} else {
|
||||
this.isTyping = false;
|
||||
}
|
||||
};
|
||||
|
||||
typeCharacter();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue