Dodanie mapy v1 #6
22
main.py
22
main.py
@ -1,25 +1,33 @@
|
||||
import pygame
|
||||
from map import preparedMap
|
||||
import pytmx
|
||||
from map import *
|
||||
from agent import trashmaster
|
||||
|
||||
|
||||
class WalleGame():
|
||||
|
||||
def __init__(self):
|
||||
self.SCREEN_SIZE = [512, 512]
|
||||
self.BACKGROUND_COLOR = '#ffffff'
|
||||
self.SCREEN_SIZE = [1000, 1000]
|
||||
#self.BACKGROUND_COLOR = '#ffffff'
|
||||
|
||||
pygame.init()
|
||||
pygame.display.set_caption('Wall-e')
|
||||
|
||||
|
||||
self.screen = pygame.display.set_mode(self.SCREEN_SIZE)
|
||||
self.screen.fill(pygame.Color(self.BACKGROUND_COLOR))
|
||||
#self.screen.fill(pygame.Color(self.BACKGROUND_COLOR))
|
||||
|
||||
# krata
|
||||
self.map = preparedMap(self.SCREEN_SIZE)
|
||||
self.screen.blit(self.map, (0,0))
|
||||
#self.map = preparedMap(self.SCREEN_SIZE)
|
||||
#self.screen.blit(self.map, (0,0))
|
||||
|
||||
self.map = TiledMap("resources/textures/map/roads.tmx")
|
||||
self.map_img = self.map.make_map()
|
||||
self.map_rect = self.map_img.get_rect()
|
||||
self.screen.blit(self.map_img, (0,0))
|
||||
|
||||
|
||||
|
||||
def update_window(self):
|
||||
pygame.display.update()
|
||||
|
||||
@ -34,7 +42,7 @@ def main():
|
||||
game = WalleGame()
|
||||
game.update_window()
|
||||
|
||||
smieciara_object = trashmaster(16,16,"resources/textures/trashmaster_blu.png",16)
|
||||
smieciara_object = trashmaster(86,52,"resources/textures/garbagetruck/trashmaster_blu.png",16)
|
||||
game.draw_trashmaster(smieciara_object)
|
||||
|
||||
game.update_window()
|
||||
|
45
map.py
45
map.py
@ -1,13 +1,40 @@
|
||||
import pygame
|
||||
import pygame as pg
|
||||
import pytmx
|
||||
|
||||
|
||||
|
||||
# config
|
||||
TILE_SIZE = 16
|
||||
# TILE_SIZE = 16
|
||||
|
||||
def preparedMap(screenSize):
|
||||
tileImage = pygame.image.load('tile1.png')
|
||||
surface = pygame.Surface(screenSize)
|
||||
# def preparedMap(screenSize):
|
||||
# tileImage = pg.image.load('tile1.png')
|
||||
# surface = pg.Surface(screenSize)
|
||||
|
||||
for x in range(0, screenSize[0], TILE_SIZE):
|
||||
for y in range(0, screenSize[1], TILE_SIZE):
|
||||
surface.blit(tileImage, (x, y))
|
||||
return surface
|
||||
# for x in range(0, screenSize[0], TILE_SIZE):
|
||||
# for y in range(0, screenSize[1], TILE_SIZE):
|
||||
# surface.blit(tileImage, (x, y))
|
||||
# return surface
|
||||
|
||||
class TiledMap:
|
||||
#loading file
|
||||
def __init__(self, filename):
|
||||
tm = pytmx.load_pygame(filename, pixelalpha=True)
|
||||
self.width = tm.width * tm.tilewidth
|
||||
self.height = tm.height * tm.tileheight
|
||||
self.tmxdata = tm
|
||||
|
||||
|
||||
#rendering map
|
||||
def render(self, surface):
|
||||
ti = self.tmxdata.get_tile_image_by_gid
|
||||
for layer in self.tmxdata.visible_layers:
|
||||
if isinstance(layer, pytmx.TiledTileLayer):
|
||||
for x, y, gid, in layer:
|
||||
tile = ti(gid)
|
||||
if tile:
|
||||
surface.blit(tile, (x * self.tmxdata.tilewidth, y * self.tmxdata.tilewidth))
|
||||
|
||||
def make_map(self):
|
||||
temp_surface = pg.Surface((self.width, self.height))
|
||||
self.render(temp_surface)
|
||||
return temp_surface
|
622
resources/Tankgame.py
Normal file
622
resources/Tankgame.py
Normal file
@ -0,0 +1,622 @@
|
||||
import os
|
||||
import tmx
|
||||
import math
|
||||
import pygame
|
||||
from pygame import Rect
|
||||
from pygame.math import Vector2
|
||||
|
||||
os.environ['SDL_VIDEO_CENTERED'] = '1'
|
||||
|
||||
###############################################################################
|
||||
# Game State #
|
||||
###############################################################################
|
||||
|
||||
class GameItem():
|
||||
def __init__(self,state,position,tile):
|
||||
self.state = state
|
||||
self.status = "alive"
|
||||
self.position = position
|
||||
self.tile = tile
|
||||
self.orientation = 0
|
||||
|
||||
class Unit(GameItem):
|
||||
def __init__(self,state,position,tile):
|
||||
super().__init__(state,position,tile)
|
||||
self.weaponTarget = Vector2(0,0)
|
||||
self.lastBulletEpoch = -100
|
||||
|
||||
class Bullet(GameItem):
|
||||
def __init__(self,state,unit):
|
||||
super().__init__(state,unit.position,Vector2(2,1))
|
||||
self.unit = unit
|
||||
self.startPosition = unit.position
|
||||
self.endPosition = unit.weaponTarget
|
||||
|
||||
class GameState():
|
||||
def __init__(self):
|
||||
self.epoch = 0
|
||||
self.worldSize = Vector2(16,10)
|
||||
self.ground = [ [ Vector2(5,1) ] * 16 ] * 10
|
||||
self.walls = [ [ None ] * 16 ] * 10
|
||||
self.units = [ Unit(self,Vector2(8,9),Vector2(1,0)) ]
|
||||
self.bullets = [ ]
|
||||
self.bulletSpeed = 0.1
|
||||
self.bulletRange = 4
|
||||
self.bulletDelay = 5
|
||||
self.observers = [ ]
|
||||
|
||||
@property
|
||||
def worldWidth(self):
|
||||
"""
|
||||
Returns the world width as an integer
|
||||
"""
|
||||
return int(self.worldSize.x)
|
||||
|
||||
@property
|
||||
def worldHeight(self):
|
||||
"""
|
||||
Returns the world height as an integer
|
||||
"""
|
||||
return int(self.worldSize.y)
|
||||
|
||||
def isInside(self,position):
|
||||
"""
|
||||
Returns true is position is inside the world
|
||||
"""
|
||||
return position.x >= 0 and position.x < self.worldWidth \
|
||||
and position.y >= 0 and position.y < self.worldHeight
|
||||
|
||||
def findUnit(self,position):
|
||||
"""
|
||||
Returns the index of the first unit at position, otherwise None.
|
||||
"""
|
||||
for unit in self.units:
|
||||
if int(unit.position.x) == int(position.x) \
|
||||
and int(unit.position.y) == int(position.y):
|
||||
return unit
|
||||
return None
|
||||
|
||||
def findLiveUnit(self,position):
|
||||
"""
|
||||
Returns the index of the first live unit at position, otherwise None.
|
||||
"""
|
||||
unit = self.findUnit(position)
|
||||
if unit is None or unit.status != "alive":
|
||||
return None
|
||||
return unit
|
||||
|
||||
def addObserver(self,observer):
|
||||
"""
|
||||
Add a game state observer.
|
||||
All observer is notified when something happens (see GameStateObserver class)
|
||||
"""
|
||||
self.observers.append(observer)
|
||||
|
||||
def notifyUnitDestroyed(self,unit):
|
||||
for observer in self.observers:
|
||||
observer.unitDestroyed(unit)
|
||||
|
||||
class GameStateObserver():
|
||||
def unitDestroyed(self,unit):
|
||||
pass
|
||||
|
||||
###############################################################################
|
||||
# Commands #
|
||||
###############################################################################
|
||||
|
||||
class Command():
|
||||
def run(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
class MoveCommand(Command):
|
||||
"""
|
||||
This command moves a unit in a given direction
|
||||
"""
|
||||
def __init__(self,state,unit,moveVector):
|
||||
self.state = state
|
||||
self.unit = unit
|
||||
self.moveVector = moveVector
|
||||
def run(self):
|
||||
unit = self.unit
|
||||
|
||||
# Destroyed units can't move
|
||||
if unit.status != "alive":
|
||||
return
|
||||
|
||||
# Update unit orientation
|
||||
if self.moveVector.x < 0:
|
||||
unit.orientation = 90
|
||||
elif self.moveVector.x > 0:
|
||||
unit.orientation = -90
|
||||
if self.moveVector.y < 0:
|
||||
unit.orientation = 0
|
||||
elif self.moveVector.y > 0:
|
||||
unit.orientation = 180
|
||||
|
||||
# Compute new tank position
|
||||
newPos = unit.position + self.moveVector
|
||||
|
||||
# Don't allow positions outside the world
|
||||
if not self.state.isInside(newPos):
|
||||
return
|
||||
|
||||
# Don't allow wall positions
|
||||
if not self.state.walls[int(newPos.y)][int(newPos.x)] is None:
|
||||
return
|
||||
|
||||
# Don't allow other unit positions
|
||||
unitIndex = self.state.findUnit(newPos)
|
||||
if not unitIndex is None:
|
||||
return
|
||||
|
||||
unit.position = newPos
|
||||
|
||||
class TargetCommand(Command):
|
||||
def __init__(self,state,unit,target):
|
||||
self.state = state
|
||||
self.unit = unit
|
||||
self.target = target
|
||||
def run(self):
|
||||
self.unit.weaponTarget = self.target
|
||||
|
||||
class ShootCommand(Command):
|
||||
def __init__(self,state,unit):
|
||||
self.state = state
|
||||
self.unit = unit
|
||||
def run(self):
|
||||
if self.unit.status != "alive":
|
||||
return
|
||||
if self.state.epoch-self.unit.lastBulletEpoch < self.state.bulletDelay:
|
||||
return
|
||||
self.unit.lastBulletEpoch = self.state.epoch
|
||||
self.state.bullets.append(Bullet(self.state,self.unit))
|
||||
|
||||
class MoveBulletCommand(Command):
|
||||
def __init__(self,state,bullet):
|
||||
self.state = state
|
||||
self.bullet = bullet
|
||||
def run(self):
|
||||
direction = (self.bullet.endPosition - self.bullet.startPosition).normalize()
|
||||
newPos = self.bullet.position + self.state.bulletSpeed * direction
|
||||
newCenterPos = newPos + Vector2(0.5,0.5)
|
||||
# If the bullet goes outside the world, destroy it
|
||||
if not self.state.isInside(newPos):
|
||||
self.bullet.status = "destroyed"
|
||||
return
|
||||
# If the bullet goes towards the target cell, destroy it
|
||||
if ((direction.x >= 0 and newPos.x >= self.bullet.endPosition.x) \
|
||||
or (direction.x < 0 and newPos.x <= self.bullet.endPosition.x)) \
|
||||
and ((direction.y >= 0 and newPos.y >= self.bullet.endPosition.y) \
|
||||
or (direction.y < 0 and newPos.y <= self.bullet.endPosition.y)):
|
||||
self.bullet.status = "destroyed"
|
||||
return
|
||||
# If the bullet is outside the allowed range, destroy it
|
||||
if newPos.distance_to(self.bullet.startPosition) >= self.state.bulletRange:
|
||||
self.bullet.status = "destroyed"
|
||||
return
|
||||
# If the bullet hits a unit, destroy the bullet and the unit
|
||||
unit = self.state.findLiveUnit(newCenterPos)
|
||||
if not unit is None and unit != self.bullet.unit:
|
||||
self.bullet.status = "destroyed"
|
||||
unit.status = "destroyed"
|
||||
self.state.notifyUnitDestroyed(unit)
|
||||
return
|
||||
# Nothing happends, continue bullet trajectory
|
||||
self.bullet.position = newPos
|
||||
|
||||
class DeleteDestroyedCommand(Command) :
|
||||
def __init__(self,itemList):
|
||||
self.itemList = itemList
|
||||
def run(self):
|
||||
newList = [ item for item in self.itemList if item.status == "alive" ]
|
||||
self.itemList[:] = newList
|
||||
|
||||
|
||||
class LoadLevelCommand(Command) :
|
||||
def __init__(self,ui,fileName):
|
||||
self.ui = ui
|
||||
self.fileName = fileName
|
||||
|
||||
def decodeLayer(self,tileMap,layer):
|
||||
"""
|
||||
Decode layer and check layer properties
|
||||
|
||||
Returns the corresponding tileset
|
||||
"""
|
||||
if not isinstance(layer,tmx.Layer):
|
||||
raise RuntimeError("Error in {}: invalid layer type".format(self.fileName))
|
||||
if len(layer.tiles) != tileMap.width * tileMap.height:
|
||||
raise RuntimeError("Error in {}: invalid tiles count".format(self.fileName))
|
||||
|
||||
# Guess which tileset is used by this layer
|
||||
gid = None
|
||||
for tile in layer.tiles:
|
||||
if tile.gid != 0:
|
||||
gid = tile.gid
|
||||
break
|
||||
if gid is None:
|
||||
if len(tileMap.tilesets) == 0:
|
||||
raise RuntimeError("Error in {}: no tilesets".format(self.fileName))
|
||||
tileset = tileMap.tilesets[0]
|
||||
else:
|
||||
tileset = None
|
||||
for t in tileMap.tilesets:
|
||||
if gid >= t.firstgid and gid < t.firstgid+t.tilecount:
|
||||
tileset = t
|
||||
break
|
||||
if tileset is None:
|
||||
raise RuntimeError("Error in {}: no corresponding tileset".format(self.fileName))
|
||||
|
||||
# Check the tileset
|
||||
if tileset.columns <= 0:
|
||||
raise RuntimeError("Error in {}: invalid columns count".format(self.fileName))
|
||||
if tileset.image.data is not None:
|
||||
raise RuntimeError("Error in {}: embedded tileset image is not supported".format(self.fileName))
|
||||
|
||||
return tileset
|
||||
|
||||
def decodeArrayLayer(self,tileMap,layer):
|
||||
"""
|
||||
Create an array from a tileMap layer
|
||||
"""
|
||||
tileset = self.decodeLayer(tileMap,layer)
|
||||
|
||||
array = [ None ] * tileMap.height
|
||||
for y in range(tileMap.height):
|
||||
array[y] = [ None ] * tileMap.width
|
||||
for x in range(tileMap.width):
|
||||
tile = layer.tiles[x + y*tileMap.width]
|
||||
if tile.gid == 0:
|
||||
continue
|
||||
lid = tile.gid - tileset.firstgid
|
||||
if lid < 0 or lid >= tileset.tilecount:
|
||||
raise RuntimeError("Error in {}: invalid tile id".format(self.fileName))
|
||||
tileX = lid % tileset.columns
|
||||
tileY = lid // tileset.columns
|
||||
array[y][x] = Vector2(tileX,tileY)
|
||||
|
||||
return tileset, array
|
||||
|
||||
def decodeUnitsLayer(self,state,tileMap,layer):
|
||||
"""
|
||||
Create a list from a tileMap layer
|
||||
"""
|
||||
tileset = self.decodeLayer(tileMap,layer)
|
||||
|
||||
units = []
|
||||
for y in range(tileMap.height):
|
||||
for x in range(tileMap.width):
|
||||
tile = layer.tiles[x + y*tileMap.width]
|
||||
if tile.gid == 0:
|
||||
continue
|
||||
lid = tile.gid - tileset.firstgid
|
||||
if lid < 0 or lid >= tileset.tilecount:
|
||||
raise RuntimeError("Error in {}: invalid tile id".format(self.fileName))
|
||||
tileX = lid % tileset.columns
|
||||
tileY = lid // tileset.columns
|
||||
unit = Unit(state,Vector2(x,y),Vector2(tileX,tileY))
|
||||
units.append(unit)
|
||||
|
||||
return tileset, units
|
||||
|
||||
|
||||
def run(self):
|
||||
# Load map
|
||||
if not os.path.exists(self.fileName):
|
||||
raise RuntimeError("No file {}".format(self.fileName))
|
||||
tileMap = tmx.TileMap.load(self.fileName)
|
||||
|
||||
# Check main properties
|
||||
if tileMap.orientation != "orthogonal":
|
||||
raise RuntimeError("Error in {}: invalid orientation".format(self.fileName))
|
||||
|
||||
if len(tileMap.layers) != 5:
|
||||
raise RuntimeError("Error in {}: 5 layers are expected".format(self.fileName))
|
||||
|
||||
# World size
|
||||
state = self.ui.gameState
|
||||
state.worldSize = Vector2(tileMap.width,tileMap.height)
|
||||
|
||||
# Ground layer
|
||||
tileset, array = self.decodeArrayLayer(tileMap,tileMap.layers[0])
|
||||
cellSize = Vector2(tileset.tilewidth,tileset.tileheight)
|
||||
state.ground[:] = array
|
||||
imageFile = tileset.image.source
|
||||
self.ui.layers[0].setTileset(cellSize,imageFile)
|
||||
|
||||
# Walls layer
|
||||
tileset, array = self.decodeArrayLayer(tileMap,tileMap.layers[1])
|
||||
if tileset.tilewidth != cellSize.x or tileset.tileheight != cellSize.y:
|
||||
raise RuntimeError("Error in {}: tile sizes must be the same in all layers".format(self.fileName))
|
||||
state.walls[:] = array
|
||||
imageFile = tileset.image.source
|
||||
self.ui.layers[1].setTileset(cellSize,imageFile)
|
||||
|
||||
# Units layer
|
||||
tanksTileset, tanks = self.decodeUnitsLayer(state,tileMap,tileMap.layers[2])
|
||||
towersTileset, towers = self.decodeUnitsLayer(state,tileMap,tileMap.layers[3])
|
||||
if tanksTileset != towersTileset:
|
||||
raise RuntimeError("Error in {}: tanks and towers tilesets must be the same".format(self.fileName))
|
||||
if tanksTileset.tilewidth != cellSize.x or tanksTileset.tileheight != cellSize.y:
|
||||
raise RuntimeError("Error in {}: tile sizes must be the same in all layers".format(self.fileName))
|
||||
state.units[:] = tanks + towers
|
||||
cellSize = Vector2(tanksTileset.tilewidth,tanksTileset.tileheight)
|
||||
imageFile = tanksTileset.image.source
|
||||
self.ui.layers[2].setTileset(cellSize,imageFile)
|
||||
|
||||
# Player units
|
||||
self.ui.playerUnit = tanks[0]
|
||||
|
||||
# Explosions layers
|
||||
tileset, array = self.decodeArrayLayer(tileMap,tileMap.layers[4])
|
||||
if tileset.tilewidth != cellSize.x or tileset.tileheight != cellSize.y:
|
||||
raise RuntimeError("Error in {}: tile sizes must be the same in all layers".format(self.fileName))
|
||||
state.bullets.clear()
|
||||
imageFile = tileset.image.source
|
||||
self.ui.layers[3].setTileset(cellSize,imageFile)
|
||||
|
||||
# Window
|
||||
windowSize = state.worldSize.elementwise() * cellSize
|
||||
self.ui.window = pygame.display.set_mode((int(windowSize.x),int(windowSize.y)))
|
||||
|
||||
###############################################################################
|
||||
# Rendering #
|
||||
###############################################################################
|
||||
|
||||
class Layer(GameStateObserver):
|
||||
def __init__(self,cellSize,imageFile):
|
||||
self.cellSize = cellSize
|
||||
self.texture = pygame.image.load(imageFile)
|
||||
|
||||
def setTileset(self,cellSize,imageFile):
|
||||
self.cellSize = cellSize
|
||||
self.texture = pygame.image.load(imageFile)
|
||||
|
||||
@property
|
||||
def cellWidth(self):
|
||||
return int(self.cellSize.x)
|
||||
|
||||
@property
|
||||
def cellHeight(self):
|
||||
return int(self.cellSize.y)
|
||||
|
||||
def unitDestroyed(self,unit):
|
||||
pass
|
||||
|
||||
def renderTile(self,surface,position,tile,angle=None):
|
||||
# Location on screen
|
||||
spritePoint = position.elementwise()*self.cellSize
|
||||
|
||||
# Texture
|
||||
texturePoint = tile.elementwise()*self.cellSize
|
||||
textureRect = Rect(int(texturePoint.x), int(texturePoint.y), self.cellWidth, self.cellHeight)
|
||||
|
||||
# Draw
|
||||
if angle is None:
|
||||
surface.blit(self.texture,spritePoint,textureRect)
|
||||
else:
|
||||
# Extract the tile in a surface
|
||||
textureTile = pygame.Surface((self.cellWidth,self.cellHeight),pygame.SRCALPHA)
|
||||
textureTile.blit(self.texture,(0,0),textureRect)
|
||||
# Rotate the surface with the tile
|
||||
rotatedTile = pygame.transform.rotate(textureTile,angle)
|
||||
# Compute the new coordinate on the screen, knowing that we rotate around the center of the tile
|
||||
spritePoint.x -= (rotatedTile.get_width() - textureTile.get_width()) // 2
|
||||
spritePoint.y -= (rotatedTile.get_height() - textureTile.get_height()) // 2
|
||||
# Render the rotatedTile
|
||||
surface.blit(rotatedTile,spritePoint)
|
||||
|
||||
def render(self,surface):
|
||||
raise NotImplementedError()
|
||||
|
||||
class ArrayLayer(Layer):
|
||||
def __init__(self,ui,imageFile,gameState,array,surfaceFlags=pygame.SRCALPHA):
|
||||
super().__init__(ui,imageFile)
|
||||
self.gameState = gameState
|
||||
self.array = array
|
||||
self.surface = None
|
||||
self.surfaceFlags = surfaceFlags
|
||||
|
||||
def setTileset(self,cellSize,imageFile):
|
||||
super().setTileset(cellSize,imageFile)
|
||||
self.surface = None
|
||||
|
||||
def render(self,surface):
|
||||
if self.surface is None:
|
||||
self.surface = pygame.Surface(surface.get_size(),flags=self.surfaceFlags)
|
||||
for y in range(self.gameState.worldHeight):
|
||||
for x in range(self.gameState.worldWidth):
|
||||
tile = self.array[y][x]
|
||||
if not tile is None:
|
||||
self.renderTile(self.surface,Vector2(x,y),tile)
|
||||
surface.blit(self.surface,(0,0))
|
||||
|
||||
class UnitsLayer(Layer):
|
||||
def __init__(self,ui,imageFile,gameState,units):
|
||||
super().__init__(ui,imageFile)
|
||||
self.gameState = gameState
|
||||
self.units = units
|
||||
|
||||
def render(self,surface):
|
||||
for unit in self.units:
|
||||
self.renderTile(surface,unit.position,unit.tile,unit.orientation)
|
||||
if unit.status == "alive":
|
||||
size = unit.weaponTarget - unit.position
|
||||
angle = math.atan2(-size.x,-size.y) * 180 / math.pi
|
||||
self.renderTile(surface,unit.position,Vector2(0,6),angle)
|
||||
|
||||
class BulletsLayer(Layer):
|
||||
def __init__(self,ui,imageFile,gameState,bullets):
|
||||
super().__init__(ui,imageFile)
|
||||
self.gameState = gameState
|
||||
self.bullets = bullets
|
||||
|
||||
def render(self,surface):
|
||||
for bullet in self.bullets:
|
||||
if bullet.status == "alive":
|
||||
self.renderTile(surface,bullet.position,bullet.tile,bullet.orientation)
|
||||
|
||||
class ExplosionsLayer(Layer):
|
||||
def __init__(self,ui,imageFile):
|
||||
super().__init__(ui,imageFile)
|
||||
self.explosions = []
|
||||
self.maxFrameIndex = 27
|
||||
|
||||
def add(self,position):
|
||||
self.explosions.append({
|
||||
'position': position,
|
||||
'frameIndex': 0
|
||||
})
|
||||
|
||||
def unitDestroyed(self,unit):
|
||||
self.add(unit.position)
|
||||
|
||||
def render(self,surface):
|
||||
for explosion in self.explosions:
|
||||
frameIndex = math.floor(explosion['frameIndex'])
|
||||
self.renderTile(surface,explosion['position'],Vector2(frameIndex,4))
|
||||
explosion['frameIndex'] += 0.5
|
||||
self.explosions = [ explosion for explosion in self.explosions if explosion['frameIndex'] < self.maxFrameIndex ]
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
# User Interface #
|
||||
###############################################################################
|
||||
|
||||
class UserInterface():
|
||||
def __init__(self):
|
||||
pygame.init()
|
||||
|
||||
# Game state
|
||||
self.gameState = GameState()
|
||||
|
||||
# Rendering properties
|
||||
self.cellSize = Vector2(64,64)
|
||||
|
||||
# Window
|
||||
windowSize = self.gameState.worldSize.elementwise() * self.cellSize
|
||||
self.window = pygame.display.set_mode((int(windowSize.x),int(windowSize.y)))
|
||||
pygame.display.set_caption("Discover Python & Patterns - https://www.patternsgameprog.com")
|
||||
pygame.display.set_icon(pygame.image.load("icon.png"))
|
||||
|
||||
# Layers
|
||||
self.layers = [
|
||||
ArrayLayer(self.cellSize,"ground.png",self.gameState,self.gameState.ground,0),
|
||||
ArrayLayer(self.cellSize,"walls.png",self.gameState,self.gameState.walls),
|
||||
UnitsLayer(self.cellSize,"units.png",self.gameState,self.gameState.units),
|
||||
BulletsLayer(self.cellSize,"explosions.png",self.gameState,self.gameState.bullets),
|
||||
ExplosionsLayer(self.cellSize,"explosions.png")
|
||||
]
|
||||
|
||||
# All layers listen to game state events
|
||||
for layer in self.layers:
|
||||
self.gameState.addObserver(layer)
|
||||
|
||||
# Controls
|
||||
self.playerUnit = self.gameState.units[0]
|
||||
self.commands = [
|
||||
LoadLevelCommand(self,"level2.tmx")
|
||||
]
|
||||
|
||||
# Loop properties
|
||||
self.clock = pygame.time.Clock()
|
||||
self.running = True
|
||||
|
||||
@property
|
||||
def cellWidth(self):
|
||||
return int(self.cellSize.x)
|
||||
|
||||
@property
|
||||
def cellHeight(self):
|
||||
return int(self.cellSize.y)
|
||||
|
||||
def processInput(self):
|
||||
# Pygame events (close, keyboard and mouse click)
|
||||
moveVector = Vector2()
|
||||
mouseClicked = False
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
self.running = False
|
||||
break
|
||||
elif event.type == pygame.KEYDOWN:
|
||||
if event.key == pygame.K_ESCAPE:
|
||||
self.running = False
|
||||
break
|
||||
elif event.key == pygame.K_RIGHT:
|
||||
moveVector.x = 1
|
||||
elif event.key == pygame.K_LEFT:
|
||||
moveVector.x = -1
|
||||
elif event.key == pygame.K_DOWN:
|
||||
moveVector.y = 1
|
||||
elif event.key == pygame.K_UP:
|
||||
moveVector.y = -1
|
||||
elif event.type == pygame.MOUSEBUTTONDOWN:
|
||||
mouseClicked = True
|
||||
|
||||
# Keyboard controls the moves of the player's unit
|
||||
if moveVector.x != 0 or moveVector.y != 0:
|
||||
self.commands.append(
|
||||
MoveCommand(self.gameState,self.playerUnit,moveVector)
|
||||
)
|
||||
|
||||
# Mouse controls the target of the player's unit
|
||||
mousePos = pygame.mouse.get_pos()
|
||||
targetCell = Vector2()
|
||||
targetCell.x = mousePos[0] / self.cellWidth - 0.5
|
||||
targetCell.y = mousePos[1] / self.cellHeight - 0.5
|
||||
command = TargetCommand(self.gameState,self.playerUnit,targetCell)
|
||||
self.commands.append(command)
|
||||
|
||||
# Shoot if left mouse was clicked
|
||||
if mouseClicked:
|
||||
self.commands.append(
|
||||
ShootCommand(self.gameState,self.playerUnit)
|
||||
)
|
||||
|
||||
# Other units always target the player's unit and shoot if close enough
|
||||
for unit in self.gameState.units:
|
||||
if unit != self.playerUnit:
|
||||
self.commands.append(
|
||||
TargetCommand(self.gameState,unit,self.playerUnit.position)
|
||||
)
|
||||
if unit.position.distance_to(self.playerUnit.position) <= self.gameState.bulletRange:
|
||||
self.commands.append(
|
||||
ShootCommand(self.gameState,unit)
|
||||
)
|
||||
|
||||
# Bullets automatic movement
|
||||
for bullet in self.gameState.bullets:
|
||||
self.commands.append(
|
||||
MoveBulletCommand(self.gameState,bullet)
|
||||
)
|
||||
|
||||
# Delete any destroyed bullet
|
||||
self.commands.append(
|
||||
DeleteDestroyedCommand(self.gameState.bullets)
|
||||
)
|
||||
|
||||
def update(self):
|
||||
for command in self.commands:
|
||||
command.run()
|
||||
self.commands.clear()
|
||||
self.gameState.epoch += 1
|
||||
|
||||
def render(self):
|
||||
for layer in self.layers:
|
||||
layer.render(self.window)
|
||||
|
||||
pygame.display.update()
|
||||
|
||||
def run(self):
|
||||
while self.running:
|
||||
self.processInput()
|
||||
self.update()
|
||||
self.render()
|
||||
self.clock.tick(60)
|
||||
|
||||
userInterface = UserInterface()
|
||||
userInterface.run()
|
||||
|
||||
pygame.quit()
|
||||
|
2
resources/textures/Ground.tsx
Normal file
2
resources/textures/Ground.tsx
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tileset version="1.8" tiledversion="1.8.2" name="Ground" tilewidth="1" tileheight="1" tilecount="0" columns="0"/>
|
142
resources/textures/Roads.tsx
Normal file
142
resources/textures/Roads.tsx
Normal file
@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tileset version="1.8" tiledversion="1.8.2" name="Roads" tilewidth="64" tileheight="64" tilecount="46" columns="0">
|
||||
<grid orientation="orthogonal" width="1" height="1"/>
|
||||
<tile id="0">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_257.bmp"/>
|
||||
</tile>
|
||||
<tile id="1">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_262.bmp"/>
|
||||
</tile>
|
||||
<tile id="2">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_263.bmp"/>
|
||||
</tile>
|
||||
<tile id="3">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_268.bmp"/>
|
||||
</tile>
|
||||
<tile id="4">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_270.bmp"/>
|
||||
</tile>
|
||||
<tile id="5">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_272.bmp"/>
|
||||
</tile>
|
||||
<tile id="6">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_273.bmp"/>
|
||||
</tile>
|
||||
<tile id="7">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_275.bmp"/>
|
||||
</tile>
|
||||
<tile id="8">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_278.bmp"/>
|
||||
</tile>
|
||||
<tile id="9">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_279.bmp"/>
|
||||
</tile>
|
||||
<tile id="10">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_673.bmp"/>
|
||||
</tile>
|
||||
<tile id="11">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_681.bmp"/>
|
||||
</tile>
|
||||
<tile id="12">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_682.bmp"/>
|
||||
</tile>
|
||||
<tile id="14">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_684.bmp"/>
|
||||
</tile>
|
||||
<tile id="15">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_687.bmp"/>
|
||||
</tile>
|
||||
<tile id="16">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_689.bmp"/>
|
||||
</tile>
|
||||
<tile id="17">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_695.bmp"/>
|
||||
</tile>
|
||||
<tile id="18">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_697.bmp"/>
|
||||
</tile>
|
||||
<tile id="19">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_698.bmp"/>
|
||||
</tile>
|
||||
<tile id="20">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_699.bmp"/>
|
||||
</tile>
|
||||
<tile id="21">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_700.bmp"/>
|
||||
</tile>
|
||||
<tile id="22">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_703.bmp"/>
|
||||
</tile>
|
||||
<tile id="23">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_803.bmp"/>
|
||||
</tile>
|
||||
<tile id="24">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_806.bmp"/>
|
||||
</tile>
|
||||
<tile id="25">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_807.bmp"/>
|
||||
</tile>
|
||||
<tile id="26">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_810.bmp"/>
|
||||
</tile>
|
||||
<tile id="27">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_812.bmp"/>
|
||||
</tile>
|
||||
<tile id="28">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_814.bmp"/>
|
||||
</tile>
|
||||
<tile id="29">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_815.bmp"/>
|
||||
</tile>
|
||||
<tile id="30">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_816.bmp"/>
|
||||
</tile>
|
||||
<tile id="31">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_817.bmp"/>
|
||||
</tile>
|
||||
<tile id="32">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_821.bmp"/>
|
||||
</tile>
|
||||
<tile id="33">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_829.bmp"/>
|
||||
</tile>
|
||||
<tile id="34">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_830.bmp"/>
|
||||
</tile>
|
||||
<tile id="35">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_967.bmp"/>
|
||||
</tile>
|
||||
<tile id="36">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_969.bmp"/>
|
||||
</tile>
|
||||
<tile id="37">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_972.bmp"/>
|
||||
</tile>
|
||||
<tile id="38">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_975.bmp"/>
|
||||
</tile>
|
||||
<tile id="39">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_976.bmp"/>
|
||||
</tile>
|
||||
<tile id="40">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_977.bmp"/>
|
||||
</tile>
|
||||
<tile id="41">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_988.bmp"/>
|
||||
</tile>
|
||||
<tile id="42">
|
||||
<image width="64" height="64" source="road/GTA2_TILE_991.bmp"/>
|
||||
</tile>
|
||||
<tile id="44">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_573.bmp"/>
|
||||
</tile>
|
||||
<tile id="45">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_574.bmp"/>
|
||||
</tile>
|
||||
<tile id="46">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_688.bmp"/>
|
||||
</tile>
|
||||
<tile id="47">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_693.bmp"/>
|
||||
</tile>
|
||||
</tileset>
|
49
resources/textures/Trash.tsx
Normal file
49
resources/textures/Trash.tsx
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tileset version="1.8" tiledversion="1.8.2" name="Trash" tilewidth="32" tileheight="30" tilecount="15" columns="0">
|
||||
<grid orientation="orthogonal" width="1" height="1"/>
|
||||
<tile id="0">
|
||||
<image width="16" height="16" source="misc/GTA2_CODE OBJECT_561.bmp"/>
|
||||
</tile>
|
||||
<tile id="1">
|
||||
<image width="32" height="30" source="misc/GTA2_CODE OBJECT_1061.bmp"/>
|
||||
</tile>
|
||||
<tile id="2">
|
||||
<image width="32" height="30" source="misc/GTA2_CODE OBJECT_1062.bmp"/>
|
||||
</tile>
|
||||
<tile id="3">
|
||||
<image width="32" height="30" source="misc/GTA2_CODE OBJECT_1063.bmp"/>
|
||||
</tile>
|
||||
<tile id="4">
|
||||
<image width="32" height="24" source="misc/GTA2_MAP OBJECT_1103.bmp"/>
|
||||
</tile>
|
||||
<tile id="5">
|
||||
<image width="32" height="26" source="misc/GTA2_MAP OBJECT_1104.bmp"/>
|
||||
</tile>
|
||||
<tile id="6">
|
||||
<image width="30" height="28" source="misc/GTA2_MAP OBJECT_1106.bmp"/>
|
||||
</tile>
|
||||
<tile id="7">
|
||||
<image width="16" height="16" source="misc/GTA2_MAP OBJECT_1115.bmp"/>
|
||||
</tile>
|
||||
<tile id="8">
|
||||
<image width="16" height="16" source="misc/GTA2_MAP OBJECT_1127.bmp"/>
|
||||
</tile>
|
||||
<tile id="10">
|
||||
<image width="16" height="14" source="misc/GTA2_MAP OBJECT_1172.bmp"/>
|
||||
</tile>
|
||||
<tile id="11">
|
||||
<image width="16" height="14" source="misc/GTA2_MAP OBJECT_1175.bmp"/>
|
||||
</tile>
|
||||
<tile id="9">
|
||||
<image width="14" height="10" source="misc/GTA2_MAP OBJECT_1131.bmp"/>
|
||||
</tile>
|
||||
<tile id="12">
|
||||
<image width="16" height="16" source="misc/GTA2_MAP OBJECT_1188.bmp"/>
|
||||
</tile>
|
||||
<tile id="13">
|
||||
<image width="20" height="18" source="misc/GTA2_MAP OBJECT_1189.bmp"/>
|
||||
</tile>
|
||||
<tile id="14">
|
||||
<image width="20" height="27" source="misc/GTA2_USER OBJECT_1294.bmp"/>
|
||||
</tile>
|
||||
</tileset>
|
139
resources/textures/Walls.tsx
Normal file
139
resources/textures/Walls.tsx
Normal file
@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tileset version="1.8" tiledversion="1.8.2" name="Walls" tilewidth="64" tileheight="64" tilecount="45" columns="0">
|
||||
<grid orientation="orthogonal" width="1" height="1"/>
|
||||
<tile id="0">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_473.bmp"/>
|
||||
</tile>
|
||||
<tile id="1">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_474.bmp"/>
|
||||
</tile>
|
||||
<tile id="2">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_475.bmp"/>
|
||||
</tile>
|
||||
<tile id="3">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_561.bmp"/>
|
||||
</tile>
|
||||
<tile id="4">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_194.bmp"/>
|
||||
</tile>
|
||||
<tile id="5">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_196.bmp"/>
|
||||
</tile>
|
||||
<tile id="6">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_216.bmp"/>
|
||||
</tile>
|
||||
<tile id="7">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_222.bmp"/>
|
||||
</tile>
|
||||
<tile id="8">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_608.bmp"/>
|
||||
</tile>
|
||||
<tile id="9">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_612.bmp"/>
|
||||
</tile>
|
||||
<tile id="10">
|
||||
<image width="64" height="64" source="edge/GTA2_TILE_619.bmp"/>
|
||||
</tile>
|
||||
<tile id="11">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_25.bmp"/>
|
||||
</tile>
|
||||
<tile id="12">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_26.bmp"/>
|
||||
</tile>
|
||||
<tile id="13">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_37.bmp"/>
|
||||
</tile>
|
||||
<tile id="14">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_112.bmp"/>
|
||||
</tile>
|
||||
<tile id="15">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_187.bmp"/>
|
||||
</tile>
|
||||
<tile id="16">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_231.bmp"/>
|
||||
</tile>
|
||||
<tile id="17">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_271.bmp"/>
|
||||
</tile>
|
||||
<tile id="18">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_280.bmp"/>
|
||||
</tile>
|
||||
<tile id="19">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_296.bmp"/>
|
||||
</tile>
|
||||
<tile id="20">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_307.bmp"/>
|
||||
</tile>
|
||||
<tile id="21">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_400.bmp"/>
|
||||
</tile>
|
||||
<tile id="22">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_408.bmp"/>
|
||||
</tile>
|
||||
<tile id="23">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_416.bmp"/>
|
||||
</tile>
|
||||
<tile id="24">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_622.bmp"/>
|
||||
</tile>
|
||||
<tile id="25">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_728.bmp"/>
|
||||
</tile>
|
||||
<tile id="26">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_729.bmp"/>
|
||||
</tile>
|
||||
<tile id="27">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_730.bmp"/>
|
||||
</tile>
|
||||
<tile id="28">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_733.bmp"/>
|
||||
</tile>
|
||||
<tile id="29">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_742.bmp"/>
|
||||
</tile>
|
||||
<tile id="30">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_743.bmp"/>
|
||||
</tile>
|
||||
<tile id="31">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_760.bmp"/>
|
||||
</tile>
|
||||
<tile id="32">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_761.bmp"/>
|
||||
</tile>
|
||||
<tile id="33">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_805.bmp"/>
|
||||
</tile>
|
||||
<tile id="34">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_837.bmp"/>
|
||||
</tile>
|
||||
<tile id="35">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_842.bmp"/>
|
||||
</tile>
|
||||
<tile id="36">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_844.bmp"/>
|
||||
</tile>
|
||||
<tile id="37">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_846.bmp"/>
|
||||
</tile>
|
||||
<tile id="38">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_855.bmp"/>
|
||||
</tile>
|
||||
<tile id="39">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_861.bmp"/>
|
||||
</tile>
|
||||
<tile id="40">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_913.bmp"/>
|
||||
</tile>
|
||||
<tile id="41">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_915.bmp"/>
|
||||
</tile>
|
||||
<tile id="42">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_922.bmp"/>
|
||||
</tile>
|
||||
<tile id="43">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_923.bmp"/>
|
||||
</tile>
|
||||
<tile id="44">
|
||||
<image width="64" height="64" source="buliding/GTA2_TILE_983.bmp"/>
|
||||
</tile>
|
||||
</tileset>
|
143
resources/textures/map/map1.tmx
Normal file
143
resources/textures/map/map1.tmx
Normal file
@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.8" tiledversion="1.8.2" orientation="orthogonal" renderorder="right-down" width="30" height="30" tilewidth="64" tileheight="64" infinite="0" nextlayerid="6" nextobjectid="1">
|
||||
<tileset firstgid="1" source="../Walls.tsx"/>
|
||||
<tileset firstgid="46" source="../Roads.tsx"/>
|
||||
<tileset firstgid="94" source="../Trash.tsx"/>
|
||||
<tileset firstgid="109" source="../player.tsx"/>
|
||||
<layer id="5" name="Ground" width="30" height="30">
|
||||
<data encoding="csv">
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,536870916,1610612829,67,75,1073741900,75,75,75,1073741895,0,3221225543,62,61,3221225528,3221225535,1610612793,61,62,3221225551,0,0,0,0,2684354639,0,0,0,0,0,
|
||||
0,0,91,2684354626,0,536870987,0,0,0,1610612811,0,1610612811,0,0,1610612799,0,536870975,0,0,0,2684354639,0,0,0,2684354623,0,3221225519,3221225551,0,0,
|
||||
0,0,90,3758096461,0,536870987,0,0,0,2147483719,1073741900,71,0,0,1610612815,0,1610612799,0,0,0,2684354618,61,62,2684354616,1610612793,0,1610612789,0,0,0,
|
||||
0,0,3221225543,70,0,2147483719,75,1073741895,0,0,1610612811,0,0,0,0,0,1610612798,0,0,0,2684354623,0,0,2684354617,58,0,2684354607,3221225518,0,0,
|
||||
0,0,1610612811,0,0,0,0,1610612811,0,0,1610612811,0,3758096442,61,61,1073741887,3221225528,3221225535,1073741885,1073741885,2147483706,58,0,1610612799,0,2684354639,0,1610612791,0,0,
|
||||
0,0,1610612811,0,536870991,0,0,1610612811,0,0,1610612811,0,1610612800,0,0,0,2684354621,0,0,0,0,2684354622,0,2684354611,3221225524,3221225521,3221225525,1610612787,0,0,
|
||||
0,0,1610612811,0,1610612814,0,0,2684354636,75,75,536870988,0,1610612804,0,0,0,2684354623,0,2684354639,0,0,3758096445,0,1610612789,0,1610612791,0,2684354612,0,0,
|
||||
0,0,1610612811,0,1610612803,0,3221225543,536870983,0,0,2684354631,75,1610612809,0,2684354639,0,2684354624,0,2684354633,1610612807,0,1610612815,0,1610612788,0,2684354638,0,2684354613,0,0,
|
||||
0,0,2684354636,77,76,75,1610612812,0,0,2684354639,0,0,1610612813,0,2684354627,75,71,0,0,2684354635,0,0,0,1610612791,0,1610612815,0,2684354628,0,0,
|
||||
0,0,3758096459,0,0,0,2684354637,0,0,2684354635,0,0,2684354635,0,2684354635,0,0,0,0,1610612791,0,0,0,2684354638,0,0,0,2684354638,0,0,
|
||||
0,0,3758096459,0,0,0,3758096460,75,75,3221225545,3221225547,78,1610612809,3221225549,76,3221225518,55,2147483703,3221225523,51,0,3221225519,53,3221225521,53,3221225523,3221225527,3221225518,0,0,
|
||||
0,0,2147483719,1073741895,0,0,1610612802,0,0,2684354626,0,0,2684354635,0,0,1610612789,0,0,1610612791,0,0,1610612788,0,2684354638,0,1610612789,0,1610612791,0,0,
|
||||
0,0,0,2684354636,75,75,76,75,75,3221225549,3221225547,3221225547,3221225545,0,0,1610612791,0,79,1610612785,3221225551,0,1610612789,0,1610612815,0,1610612788,0,1610612815,0,0,
|
||||
0,0,0,1610612811,0,0,0,0,0,0,0,0,1610612811,0,0,1610612790,0,0,1610612791,0,0,1610612791,0,0,0,1610612789,0,0,0,0,
|
||||
0,0,0,1610612811,0,0,3221225543,3221225547,78,1610612807,0,0,1610612811,0,0,2684354610,3221225521,3221225524,51,3221225527,78,1610612785,54,3221225524,3221225525,1610612785,78,3221225551,0,0,
|
||||
0,0,0,1610612811,0,0,2684354635,0,0,1610612811,0,0,2684354637,0,0,0,2684354614,0,0,0,0,1610612789,0,0,0,1610612789,0,0,0,0,
|
||||
0,0,0,1610612811,0,0,2684354635,0,0,2684354635,0,0,1610612811,0,79,3221225537,2684354610,78,3221225551,0,0,1610612815,0,0,0,1610612791,0,0,0,0,
|
||||
0,0,0,3758096460,3221225547,75,3221225545,64,75,76,3221225548,75,70,0,0,0,2684354638,0,0,0,0,0,0,0,0,1610612813,0,0,0,0,
|
||||
0,0,0,1610612811,0,0,1610612809,0,0,0,1610612815,0,0,0,3221225544,67,2684354610,3221225548,66,64,3221225548,77,3221225548,75,75,1610612809,3221225551,0,0,0,
|
||||
0,0,0,1610612811,0,79,76,77,1073741895,0,0,0,0,0,2684354624,0,0,2684354625,0,0,1610612815,0,1610612801,0,0,2684354638,0,0,0,0,
|
||||
0,0,0,1610612811,0,0,0,0,74,0,3221225543,75,77,3221225545,70,0,0,2684354624,0,0,0,0,1610612815,0,3221225543,76,1610612806,0,0,0,
|
||||
0,0,0,2684354631,3221225547,3221225548,3221225547,3221225547,1610612812,0,1610612802,0,0,1610612815,0,0,3221225553,85,88,1610612817,0,0,0,0,1610612800,0,2684354628,0,0,0,
|
||||
0,0,0,0,0,2684354635,0,0,2684354636,77,71,0,0,0,0,0,2684354644,0,0,1610612823,0,0,0,0,2684354625,0,2684354625,0,0,0,
|
||||
0,0,0,536870991,0,2684354624,0,79,536870992,0,0,3221225553,1073741908,1073741908,3221225557,88,85,1610612817,0,2684354645,84,84,3221225557,88,85,84,1610612821,0,0,0,
|
||||
0,0,0,3758096462,0,2684354635,0,0,0,0,0,536870996,0,0,536870996,0,0,2684354644,0,2684354646,0,0,2684354644,0,0,0,1610612819,0,0,0,
|
||||
0,0,0,2147483728,78,76,84,84,84,84,84,81,0,0,1610612815,0,0,2684354641,86,85,87,84,81,0,79,87,82,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="3" name="Walls" width="30" height="30">
|
||||
<data encoding="csv">
|
||||
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
||||
11,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,11,
|
||||
11,0,0,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,0,0,2684354599,35,17,25,0,24,29,33,7,11,
|
||||
11,7,0,0,23,0,17,14,12,0,13,0,16,13,0,24,0,42,13,25,0,45,22,29,0,44,0,0,7,11,
|
||||
11,7,0,0,15,0,45,37,17,0,0,0,24,12,0,45,0,44,24,14,0,0,0,0,0,37,0,23,7,11,
|
||||
11,7,0,0,13,0,0,0,41,25,0,20,16,41,22,35,0,29,37,21,0,17,42,0,0,25,0,0,7,11,
|
||||
11,7,0,26,27,28,29,0,21,43,0,29,0,0,0,0,0,0,0,0,0,0,43,0,536870952,0,2684354599,0,7,11,
|
||||
11,7,0,14,0,24,21,0,15,33,0,21,0,43,21,33,0,45,30,31,16,0,12,0,0,0,0,0,7,11,
|
||||
11,7,0,42,0,22,20,0,0,0,0,44,0,20,40,16,0,43,0,33,13,0,45,0,17,0,43,0,7,11,
|
||||
11,7,0,25,0,13,0,0,15,24,0,0,0,41,0,29,0,15,0,0,44,0,37,0,21,0,24,0,7,11,
|
||||
11,7,0,0,0,0,0,33,29,0,17,12,0,21,0,0,0,17,43,0,13,29,41,0,24,0,13,0,7,11,
|
||||
11,7,0,15,18,45,0,13,41,0,24,16,0,23,0,13,41,22,16,0,20,32,17,0,29,25,35,0,7,11,
|
||||
11,7,0,25,35,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,7,11,
|
||||
11,7,0,0,34,19,0,44,15,0,2684354596,2684354596,0,18,24,0,17,35,0,41,25,0,41,0,13,0,44,0,7,11,
|
||||
11,7,24,0,0,0,0,0,0,0,0,0,0,42,20,0,16,0,0,0,24,0,21,0,18,0,25,0,7,9,
|
||||
11,7,22,0,33,13,16,43,21,20,29,15,0,41,24,0,29,13,0,16,43,0,18,24,42,0,42,23,7,9,
|
||||
11,7,21,0,21,20,0,0,0,0,41,44,0,42,15,0,0,0,0,0,0,0,0,0,0,0,0,0,7,9,
|
||||
11,7,24,0,41,24,0,3221225510,1610612774,0,24,21,0,13,40,20,0,17,32,15,44,0,26,27,28,0,18,25,7,11,
|
||||
11,7,18,0,44,12,0,2684354598,38,0,17,22,0,41,0,0,0,0,0,24,20,0,21,35,33,0,12,24,7,11,
|
||||
11,7,13,0,0,0,0,0,0,0,0,0,0,12,15,21,0,13,35,18,41,37,43,39,15,0,22,18,7,11,
|
||||
11,7,15,0,43,15,0,33,17,41,0,29,18,33,0,0,0,0,0,0,0,0,0,0,0,0,0,24,7,11,
|
||||
11,7,13,0,25,0,0,0,0,39,21,42,44,14,0,18,45,0,13,14,0,29,0,42,13,0,25,35,7,11,
|
||||
11,7,24,0,14,18,23,24,0,13,0,0,0,0,0,21,42,0,41,15,2684354599,21,0,15,0,0,0,24,7,11,
|
||||
11,7,18,0,0,0,0,0,0,3221225508,0,21,15,0,41,29,0,0,0,0,43,14,18,42,0,14,0,18,7,11,
|
||||
11,7,14,40,43,0,43,14,0,0,0,29,17,18,22,24,0,17,23,0,13,30,31,25,0,33,0,32,7,11,
|
||||
11,7,14,0,44,0,12,0,0,24,14,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,15,7,11,
|
||||
11,7,25,0,29,0,14,13,25,14,43,0,15,13,0,44,33,0,25,0,13,44,0,43,15,44,0,42,7,11,
|
||||
11,7,23,0,0,0,0,0,0,0,0,0,32,45,0,35,25,0,0,0,0,0,0,32,0,0,0,18,7,11,
|
||||
11,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,11,
|
||||
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="4" name="Player" width="30" height="30">
|
||||
<data encoding="csv">
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,536871021,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="2" name="Trash" width="30" height="30">
|
||||
<data encoding="csv">
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,3221225579,0,0,0,0,0,0,0,0,106,0,0,0,3221225579,0,0,0,0,3221225579,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,1610612836,0,0,0,0,0,0,1610612836,0,0,0,3221225579,0,0,0,2684354662,0,0,3221225579,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,1610612836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,107,0,0,0,107,0,0,
|
||||
0,0,0,0,0,0,0,3221225579,0,0,0,0,0,0,3221225570,0,0,0,106,0,0,0,0,0,0,105,0,0,0,0,
|
||||
0,0,0,0,101,0,0,0,0,0,107,0,2684354662,0,0,0,0,0,0,0,0,0,0,0,0,0,2684354662,0,0,0,
|
||||
0,0,2684354658,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,101,0,0,0,0,0,0,3221225579,0,0,0,0,0,0,0,0,0,0,0,0,3221225579,0,0,
|
||||
0,0,0,0,0,0,0,0,0,102,0,0,0,0,0,0,0,0,0,3758096482,0,0,0,0,0,105,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,101,0,101,0,0,106,0,0,101,0,536871010,0,105,0,0,0,3221225579,0,0,
|
||||
0,0,101,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,101,0,0,0,0,0,0,0,105,0,105,0,106,0,0,0,536871013,0,0,0,1610612834,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,106,0,105,0,0,0,0,0,0,2684354658,0,0,0,0,0,0,0,0,1073741922,0,0,536871013,0,0,
|
||||
0,0,0,105,0,0,0,0,0,0,0,0,107,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,2684354665,0,0,0,102,0,0,2684354665,0,0,0,107,0,0,0,0,
|
||||
0,0,0,0,0,0,0,98,0,0,0,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,105,0,0,0,0,0,0,0,0,0,0,0,107,0,0,0,0,0,0,0,0,2147483746,0,106,0,0,0,
|
||||
0,0,0,0,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2684354658,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,98,0,0,0,0,1610612834,0,0,0,0,2684354665,0,0,0,105,0,0,0,
|
||||
0,0,0,0,0,105,0,0,0,0,0,0,0,101,0,0,0,0,3221225579,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,107,0,0,0,3221225574,0,0,0,0,0,536871013,0,107,0,0,0,0,0,3221225570,0,0,0,0,536871013,0,0,0,
|
||||
0,0,0,0,0,1610612834,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2684354658,0,0,0,
|
||||
0,0,0,0,105,0,0,0,101,0,3221225570,0,0,0,101,0,0,536871013,0,0,101,0,107,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
</data>
|
||||
</layer>
|
||||
</map>
|
143
resources/textures/map/roads.tmx
Normal file
143
resources/textures/map/roads.tmx
Normal file
@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.8" tiledversion="1.8.2" orientation="orthogonal" renderorder="right-down" width="30" height="30" tilewidth="64" tileheight="64" infinite="0" nextlayerid="6" nextobjectid="1">
|
||||
<tileset firstgid="1" source="../Walls.tsx"/>
|
||||
<tileset firstgid="46" source="../Roads.tsx"/>
|
||||
<tileset firstgid="94" source="../Trash.tsx"/>
|
||||
<tileset firstgid="109" source="../player.tsx"/>
|
||||
<layer id="5" name="Ground" width="30" height="30">
|
||||
<data encoding="csv">
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,536870916,1610612829,78,78,78,78,78,78,78,0,78,78,78,78,78,78,78,78,3221225551,0,0,0,0,2684354639,0,0,0,0,0,
|
||||
0,0,91,50,0,50,0,0,0,50,0,50,0,0,50,0,50,0,0,0,2684354639,0,0,0,50,0,78,3221225551,0,0,
|
||||
0,0,90,50,0,50,0,0,0,50,50,50,0,0,1610612815,0,50,0,0,0,78,78,78,78,78,0,50,0,0,0,
|
||||
0,0,50,50,0,78,78,78,0,0,50,0,0,0,0,0,50,0,0,0,50,0,0,78,78,0,78,78,0,0,
|
||||
0,0,50,0,0,0,0,50,0,0,50,0,78,78,78,78,78,78,78,78,78,78,0,50,0,2684354639,0,50,0,0,
|
||||
0,0,50,0,536870991,0,0,50,0,0,50,0,50,0,0,0,50,0,0,0,0,50,0,78,78,78,78,78,0,0,
|
||||
0,0,50,0,50,0,0,78,78,78,78,0,50,0,0,0,50,0,2684354639,0,0,50,0,50,0,50,0,50,0,0,
|
||||
0,0,50,0,50,0,78,78,0,0,50,50,50,0,2684354639,0,50,0,50,50,0,1610612815,0,50,0,2684354638,0,50,0,0,
|
||||
0,0,78,78,78,78,78,0,0,2684354639,0,0,50,0,50,50,50,0,0,50,0,0,0,50,0,1610612815,0,50,0,0,
|
||||
0,0,50,0,0,0,50,0,0,50,0,0,50,0,50,0,0,0,0,50,0,0,0,2684354638,0,0,0,2684354638,0,0,
|
||||
0,0,50,0,0,0,78,78,78,78,78,78,78,78,78,78,78,78,78,78,0,78,78,78,78,78,78,78,0,0,
|
||||
0,0,78,78,0,0,50,0,0,50,0,0,50,0,0,50,0,0,50,0,0,50,0,2684354638,0,50,0,50,0,0,
|
||||
0,0,0,78,78,78,78,78,78,78,78,78,78,0,0,50,0,79,50,3221225551,0,50,0,1610612815,0,50,0,1610612815,0,0,
|
||||
0,0,0,50,0,0,0,0,0,0,0,0,50,0,0,1610612790,0,0,50,0,0,50,0,0,0,50,0,0,0,0,
|
||||
0,0,0,50,0,0,50,50,50,50,0,0,50,0,0,78,78,78,78,78,78,78,78,78,78,78,78,3221225551,0,0,
|
||||
0,0,0,50,0,0,50,0,0,50,0,0,50,0,0,0,50,0,0,0,0,50,0,0,0,50,0,0,0,0,
|
||||
0,0,0,50,0,0,50,0,0,50,0,0,50,0,79,50,2684354610,78,3221225551,0,0,1610612815,0,0,0,50,0,0,0,0,
|
||||
0,0,0,78,78,78,78,78,78,78,78,78,78,0,0,0,2684354638,0,0,0,0,0,0,0,0,50,0,0,0,0,
|
||||
0,0,0,50,0,0,50,0,0,0,1610612815,0,0,0,78,78,78,78,78,78,78,78,78,78,78,78,3221225551,0,0,0,
|
||||
0,0,0,50,0,79,78,78,78,0,0,0,0,0,50,0,0,50,0,0,1610612815,0,50,0,0,50,0,0,0,0,
|
||||
0,0,0,50,0,0,0,0,50,0,78,78,78,78,78,0,0,50,0,0,0,0,1610612815,0,78,78,78,0,0,0,
|
||||
0,0,0,78,78,78,78,78,78,0,50,0,0,1610612815,0,0,50,50,50,50,0,0,0,0,50,0,50,0,0,0,
|
||||
0,0,0,0,0,50,0,0,50,50,50,0,0,0,0,0,50,0,0,50,0,0,0,0,50,0,50,0,0,0,
|
||||
0,0,0,536870991,0,50,0,79,50,0,0,78,78,78,78,78,78,78,0,78,78,78,78,78,78,78,78,0,0,0,
|
||||
0,0,0,50,0,50,0,0,0,0,0,50,0,0,50,0,0,50,0,50,0,0,50,0,0,0,50,0,0,0,
|
||||
0,0,0,2147483728,78,78,78,78,78,78,78,78,0,0,1610612815,0,0,78,78,78,78,78,78,0,79,78,78,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="3" name="Walls" width="30" height="30">
|
||||
<data encoding="csv">
|
||||
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
||||
11,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,11,
|
||||
11,0,0,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,0,0,2684354599,35,17,25,0,24,29,33,7,11,
|
||||
11,7,0,0,23,0,17,14,12,0,13,0,16,13,0,24,0,42,13,25,0,45,22,29,0,44,0,0,7,11,
|
||||
11,7,0,0,15,0,45,37,17,0,0,0,24,12,0,45,0,44,24,14,0,0,0,0,0,37,0,23,7,11,
|
||||
11,7,0,0,13,0,0,0,41,25,0,20,16,41,22,35,0,29,37,21,0,17,42,0,0,25,0,0,7,11,
|
||||
11,7,0,26,27,28,29,0,21,43,0,29,0,0,0,0,0,0,0,0,0,0,43,0,536870952,0,2684354599,0,7,11,
|
||||
11,7,0,14,0,24,21,0,15,33,0,21,0,43,21,33,0,45,30,31,16,0,12,0,0,0,0,0,7,11,
|
||||
11,7,0,42,0,22,20,0,0,0,0,44,0,20,40,16,0,43,0,33,13,0,45,0,17,0,43,0,7,11,
|
||||
11,7,0,25,0,13,0,0,15,24,0,0,0,41,0,29,0,15,0,0,44,0,37,0,21,0,24,0,7,11,
|
||||
11,7,0,0,0,0,0,33,29,0,17,12,0,21,0,0,0,17,43,0,13,29,41,0,24,0,13,0,7,11,
|
||||
11,7,0,15,18,45,0,13,41,0,24,16,0,23,0,13,41,22,16,0,20,32,17,0,29,25,35,0,7,11,
|
||||
11,7,0,25,35,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,7,11,
|
||||
11,7,0,0,34,19,0,44,15,0,2684354596,2684354596,0,18,24,0,17,35,0,41,25,0,41,0,13,0,44,0,7,11,
|
||||
11,7,24,0,0,0,0,0,0,0,0,0,0,42,20,0,16,0,0,0,24,0,21,0,18,0,25,0,7,9,
|
||||
11,7,22,0,33,13,16,43,21,20,29,15,0,41,24,0,29,13,0,16,43,0,18,24,42,0,42,23,7,9,
|
||||
11,7,21,0,21,20,0,0,0,0,41,44,0,42,15,0,0,0,0,0,0,0,0,0,0,0,0,0,7,9,
|
||||
11,7,24,0,41,24,0,3221225510,1610612774,0,24,21,0,13,40,20,0,17,32,15,44,0,26,27,28,0,18,25,7,11,
|
||||
11,7,18,0,44,12,0,2684354598,38,0,17,22,0,41,0,0,0,0,0,24,20,0,21,35,33,0,12,24,7,11,
|
||||
11,7,13,0,0,0,0,0,0,0,0,0,0,12,15,21,0,13,35,18,41,37,43,39,15,0,22,18,7,11,
|
||||
11,7,15,0,43,15,0,33,17,41,0,29,18,33,0,0,0,0,0,0,0,0,0,0,0,0,0,24,7,11,
|
||||
11,7,13,0,25,0,0,0,0,39,21,42,44,14,0,18,45,0,13,14,0,29,0,42,13,0,25,35,7,11,
|
||||
11,7,24,0,14,18,23,24,0,13,0,0,0,0,0,21,42,0,41,15,2684354599,21,0,15,0,0,0,24,7,11,
|
||||
11,7,18,0,0,0,0,0,0,3221225508,0,21,15,0,41,29,0,0,0,0,43,14,18,42,0,14,0,18,7,11,
|
||||
11,7,14,40,43,0,43,14,0,0,0,29,17,18,22,24,0,17,23,0,13,30,31,25,0,33,0,32,7,11,
|
||||
11,7,14,0,44,0,12,0,0,24,14,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,15,7,11,
|
||||
11,7,25,0,29,0,14,13,25,14,43,0,15,13,0,44,33,0,25,0,13,44,0,43,15,44,0,42,7,11,
|
||||
11,7,23,0,0,0,0,0,0,0,0,0,32,45,0,35,25,0,0,0,0,0,0,32,0,0,0,18,7,11,
|
||||
11,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,11,
|
||||
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="4" name="Player" width="30" height="30">
|
||||
<data encoding="csv">
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,536871021,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="2" name="Trash" width="30" height="30">
|
||||
<data encoding="csv">
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,3221225579,0,0,0,0,0,0,0,0,106,0,0,0,3221225579,0,0,0,0,3221225579,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,1610612836,0,0,0,0,0,0,1610612836,0,0,0,3221225579,0,0,0,2684354662,0,0,3221225579,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,1610612836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,107,0,0,0,107,0,0,
|
||||
0,0,0,0,0,0,0,3221225579,0,0,0,0,0,0,3221225570,0,0,0,106,0,0,0,0,0,0,105,0,0,0,0,
|
||||
0,0,0,0,101,0,0,0,0,0,107,0,2684354662,0,0,0,0,0,0,0,0,0,0,0,0,0,2684354662,0,0,0,
|
||||
0,0,2684354658,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,101,0,0,0,0,0,0,3221225579,0,0,0,0,0,0,0,0,0,0,0,0,3221225579,0,0,
|
||||
0,0,0,0,0,0,0,0,0,102,0,0,0,0,0,0,0,0,0,3758096482,0,0,0,0,0,105,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,101,0,101,0,0,106,0,0,101,0,536871010,0,105,0,0,0,3221225579,0,0,
|
||||
0,0,101,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,101,0,0,0,0,0,0,0,105,0,105,0,106,0,0,0,536871013,0,0,0,1610612834,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,106,0,105,0,0,0,0,0,0,2684354658,0,0,0,0,0,0,0,0,1073741922,0,0,536871013,0,0,
|
||||
0,0,0,105,0,0,0,0,0,0,0,0,107,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,2684354665,0,0,0,102,0,0,2684354665,0,0,0,107,0,0,0,0,
|
||||
0,0,0,0,0,0,0,98,0,0,0,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,105,0,0,0,0,0,0,0,0,0,0,0,107,0,0,0,0,0,0,0,0,2147483746,0,106,0,0,0,
|
||||
0,0,0,0,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2684354658,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,98,0,0,0,0,1610612834,0,0,0,0,2684354665,0,0,0,105,0,0,0,
|
||||
0,0,0,0,0,105,0,0,0,0,0,0,0,101,0,0,0,0,3221225579,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,107,0,0,0,3221225574,0,0,0,0,0,536871013,0,107,0,0,0,0,0,3221225570,0,0,0,0,536871013,0,0,0,
|
||||
0,0,0,0,0,1610612834,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2684354658,0,0,0,
|
||||
0,0,0,0,105,0,0,0,101,0,3221225570,0,0,0,101,0,0,536871013,0,0,101,0,107,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
</data>
|
||||
</layer>
|
||||
</map>
|
31
resources/textures/player.tsx
Normal file
31
resources/textures/player.tsx
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tileset version="1.8" tiledversion="1.8.2" name="player" tilewidth="347" tileheight="145" tilecount="9" columns="0">
|
||||
<grid orientation="orthogonal" width="1" height="1"/>
|
||||
<tile id="0">
|
||||
<image width="52" height="86" source="garbagetruck/GTA2_CAR_18.bmp"/>
|
||||
</tile>
|
||||
<tile id="1">
|
||||
<image width="58" height="88" source="garbagetruck/GTA2_CAR_20.bmp"/>
|
||||
</tile>
|
||||
<tile id="2">
|
||||
<image width="58" height="88" source="garbagetruck/GTA2_CAR_21.bmp"/>
|
||||
</tile>
|
||||
<tile id="3">
|
||||
<image width="347" height="145" source="garbagetruck/trashmaster_blu.png"/>
|
||||
</tile>
|
||||
<tile id="4">
|
||||
<image width="250" height="117" source="garbagetruck/trashmaster_orange.png"/>
|
||||
</tile>
|
||||
<tile id="5">
|
||||
<image width="58" height="58" source="misc/GTA2_USER OBJECT_1219.bmp"/>
|
||||
</tile>
|
||||
<tile id="6">
|
||||
<image width="50" height="60" source="misc/GTA2_USER OBJECT_1222.bmp"/>
|
||||
</tile>
|
||||
<tile id="7">
|
||||
<image width="60" height="60" source="misc/GTA2_USER OBJECT_1225.bmp"/>
|
||||
</tile>
|
||||
<tile id="8">
|
||||
<image width="56" height="64" source="misc/GTA2_USER OBJECT_1229.bmp"/>
|
||||
</tile>
|
||||
</tileset>
|
Loading…
Reference in New Issue
Block a user