new assets

This commit is contained in:
s452635 2021-03-11 18:51:43 +01:00
parent 0a41eb42ae
commit cb61ee5147
16 changed files with 95 additions and 2 deletions

View File

@ -1,5 +1,6 @@
# libraries # libraries
import pygame import pygame
from pyglet.gl import * # for blocky textures
# other files of this project # other files of this project
import project_constants import project_constants
@ -13,6 +14,10 @@ if __name__ == "__main__":
pygame.init() pygame.init()
pygame.display.set_caption(project_constants.V_NAME_OF_WINDOW) pygame.display.set_caption(project_constants.V_NAME_OF_WINDOW)
# for blocky textures
glEnable(GL_TEXTURE_2D)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
# loading minefields # loading minefields
# TODO : call to a minefield loading function goes here # TODO : call to a minefield loading function goes here

View File

@ -1,10 +1,16 @@
import pygame import pygame
# VARIABLE STARTS WITH ... IF IT'S # VARIABLE STARTS WITH ... IF IT'S
# V a value like a string or an int # V a value like a string or an int
# ASSET a png file (or other graphic format) # ASSET a png file (or other graphic format)
# ================= #
# === VARIABLES === #
# ================= #
V_NAME_OF_WINDOW = "MineFusion TM" V_NAME_OF_WINDOW = "MineFusion TM"
@ -16,8 +22,90 @@ SCREEN = pygame.display.set_mode\
( (
( (
V_TILE_SIZE * V_GRID_HOR_TILES + 2 * V_SCREEN_PADDING, # screen width V_TILE_SIZE * V_GRID_HOR_TILES + 2 * V_SCREEN_PADDING, # screen width
V_TILE_SIZE * V_GRID_HOR_TILES + 2 * V_SCREEN_PADDING # screen height V_TILE_SIZE * V_GRID_HOR_TILES + 2 * V_SCREEN_PADDING # screen height
) )
) )
ASSET_BACKGROUND = pygame.image.load('resources/assets/grid.png')
# ============== #
# === ASSETS === #
# ============== #
ASSET_BACKGROUND = pygame.transform.scale\
(
pygame.image.load('resources/assets/new_grid.png'),
( 600, 600 )
)
ASSET_SAPPER = pygame.transform.scale\
(
pygame.image.load( 'resources/assets/sapper.png' ),
( 60, 60 )
)
ASSET_MINE_A = pygame.transform.scale\
(
pygame.image.load( 'resources/assets/mine_a.png' ),
( 60, 60 )
)
ASSET_MINE_B = pygame.transform.scale\
(
pygame.image.load( 'resources/assets/mine_b.png' ),
( 60, 60 )
)
ASSET_MINE_F = pygame.transform.scale\
(
pygame.image.load( 'resources/assets/mine_f.png' ),
( 60, 60 )
)
ASSET_MINE_K = pygame.transform.scale\
(
pygame.image.load( 'resources/assets/mine_k.png' ),
( 60, 60 )
)
ASSET_TILE_ORANGE = pygame.transform.scale\
(
pygame.image.load( 'resources/assets/tile_orange.png' ),
( 60, 60 )
)
ASSET_TILE_RED = pygame.transform.scale\
(
pygame.image.load( 'resources/assets/tile_red.png' ),
( 60, 60 )
)
ASSET_TILE_BLUE = pygame.transform.scale\
(
pygame.image.load( 'resources/assets/tile_blue.png' ),
( 60, 60 )
)
ASSET_TILE_PURPLE = pygame.transform.scale\
(
pygame.image.load( 'resources/assets/tile_purple.png' ),
( 60, 60 )
)
ASSET_TILE_GREEN = pygame.transform.scale\
(
pygame.image.load( 'resources/assets/tile_green.png' ),
( 60, 60 )
)
ASSET_TILE_YELLOW = pygame.transform.scale\
(
pygame.image.load( 'resources/assets/tile_yellow.png' ),
( 60, 60 )
)
ASSET_TILE_WHITE = pygame.transform.scale\
(
pygame.image.load( 'resources/assets/tile_white.png' ),
( 60, 60 )
)

BIN
resources/assets/mine_a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

BIN
resources/assets/mine_b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

BIN
resources/assets/mine_f.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 B

BIN
resources/assets/mine_k.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

BIN
resources/assets/romb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B