transparent textures
Before Width: | Height: | Size: 24 KiB |
BIN
data/images/entities/berry.png
Normal file
After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 3.9 KiB |
BIN
data/images/entities/bush.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 64 KiB |
BIN
data/images/entities/cranberry.png
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
data/images/entities/mushroom.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 17 KiB |
BIN
data/images/entities/player.png
Normal file
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 2.9 KiB |
BIN
data/images/entities/rabbit.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 78 KiB |
BIN
data/images/entities/rock.png
Normal file
After Width: | Height: | Size: 608 KiB |
Before Width: | Height: | Size: 4.3 KiB |
BIN
data/images/terrain/water.png
Normal file
After Width: | Height: | Size: 61 KiB |
@ -18,7 +18,7 @@
|
|||||||
"name" : "cranberry",
|
"name" : "cranberry",
|
||||||
"position" : {
|
"position" : {
|
||||||
"x": 7,
|
"x": 7,
|
||||||
"y": 1
|
"y": 3
|
||||||
},
|
},
|
||||||
"isPickupable" : true,
|
"isPickupable" : true,
|
||||||
"effect" : {
|
"effect" : {
|
||||||
@ -56,8 +56,23 @@
|
|||||||
"name" : "rock",
|
"name" : "rock",
|
||||||
"position" : {
|
"position" : {
|
||||||
"x": 13,
|
"x": 13,
|
||||||
"y": 1
|
"y": 2
|
||||||
},
|
},
|
||||||
"isPickupable" : false
|
"isPickupable" : false
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"name" : "mushroom",
|
||||||
|
"position" : {
|
||||||
|
"x": 14,
|
||||||
|
"y": 3
|
||||||
|
},
|
||||||
|
"isPickupable": true,
|
||||||
|
"effect" : {
|
||||||
|
"hp": -50,
|
||||||
|
"stamina": 0,
|
||||||
|
"thirst": 0,
|
||||||
|
"hunger": 25
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -9,7 +9,7 @@ class Player(Entity):
|
|||||||
statistics: Statistics
|
statistics: Statistics
|
||||||
|
|
||||||
def __init__(self, spawnpoint, size):
|
def __init__(self, spawnpoint, size):
|
||||||
super().__init__("player.jpg", size, (spawnpoint[0] * size, spawnpoint[1] * size))
|
super().__init__("player.png", size, (spawnpoint[0] * size, spawnpoint[1] * size))
|
||||||
# Where the player is facing, 0 - north, 1
|
# Where the player is facing, 0 - north, 1
|
||||||
self.rotation = Rotations.NORTH
|
self.rotation = Rotations.NORTH
|
||||||
self.statistics = Statistics(100, 0, 0, 100)
|
self.statistics = Statistics(100, 0, 0, 100)
|
||||||
|
@ -42,7 +42,7 @@ class Map:
|
|||||||
for entity in entityListJson:
|
for entity in entityListJson:
|
||||||
try:
|
try:
|
||||||
if entity["isPickupable"]:
|
if entity["isPickupable"]:
|
||||||
actualEntities.append(Pickupable(entity["name"] + ".jpg",
|
actualEntities.append(Pickupable(entity["name"] + ".png",
|
||||||
self.tileSize,
|
self.tileSize,
|
||||||
(entity["position"]["x"] * self.tileSize, entity["position"]["y"] * self.tileSize),
|
(entity["position"]["x"] * self.tileSize, entity["position"]["y"] * self.tileSize),
|
||||||
Statistics(entity["effect"]["hp"],
|
Statistics(entity["effect"]["hp"],
|
||||||
@ -50,7 +50,7 @@ class Map:
|
|||||||
entity["effect"]["thirst"],
|
entity["effect"]["thirst"],
|
||||||
entity["effect"]["stamina"])))
|
entity["effect"]["stamina"])))
|
||||||
else:
|
else:
|
||||||
actualEntities.append(Entity(entity["name"] + ".jpg",
|
actualEntities.append(Entity(entity["name"] + ".png",
|
||||||
self.tileSize,
|
self.tileSize,
|
||||||
(entity["position"]["x"] * self.tileSize, entity["position"]["y"] * self.tileSize)))
|
(entity["position"]["x"] * self.tileSize, entity["position"]["y"] * self.tileSize)))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
@ -67,7 +67,7 @@ class Map:
|
|||||||
elif tile == '.':
|
elif tile == '.':
|
||||||
self.screen.draw(TerrainTile(col, row, 'grass.png', self.tileSize), Locations.MAP, 0, 0)
|
self.screen.draw(TerrainTile(col, row, 'grass.png', self.tileSize), Locations.MAP, 0, 0)
|
||||||
elif tile == 'x':
|
elif tile == 'x':
|
||||||
object = TerrainTile(col, row, 'water.jpg', self.tileSize)
|
object = TerrainTile(col, row, 'water.png', self.tileSize)
|
||||||
self.screen.draw(object, Locations.MAP, 0, 0)
|
self.screen.draw(object, Locations.MAP, 0, 0)
|
||||||
self.collidables.add(object)
|
self.collidables.add(object)
|
||||||
elif tile == 'w':
|
elif tile == 'w':
|
||||||
|