Example #1
0
from pygame.image import load as image

window_width = 1200
window_height = window_width // 16 * 9

frame_width = window_width
frame_height = window_height * 0.8
frame_start_y = 0
frame_start_x = 0

scoretext_position_y = frame_height + (window_height - frame_height) * 0.4

unknown_object_size = (5, 5)

default_image = image("textures/orb_default.png")
wall_image = image("textures/wall/wall_default.png")
wall_used_image = image("textures/wall/wall_gray.png")
wall_crossed = image("textures/wall/wall_gray_crossed.png")
logo_image = image("textures/logo.png")

logo_image_dimensions = (800, 300)

font_size = 35

framerate = 60

distance_between_border_and_wall_cooldown_image_in_pixels = frame_width * 0.1

bullet_boosted_velocity = 30  # pixels/tick
bullet_default_velocity = 15  # pixels/tick
Example #2
0
from pygame.image import load as image
import base_class
import constants
import utils

powerup_types = (
    #'null',
    'speed',
    'tripleshot',
    'bulletspeed',
    'points',
    'ignorewalls',
)

powerup_textures = {
    'null' : image("textures/powerup/null.png"),
    'speed' : image("textures/powerup/speed.png"),
    'tripleshot' : image("textures/powerup/tripleshot.png"),
    'bulletspeed' : image("textures/powerup/ammospeed.png"),
    'points' : image("textures/powerup/points.png"),
    'ignorewalls' : image("textures/powerup/ignorewalls.png"),
}

class Powerup(base_class.Base):

    type = "null"
    # "null" = debug. No effect
    # "speed" = speed buff
    # "tripleshot" = triple shot
    # "blletspeed" = bullet speed buff
    # "points" = double points
Example #3
0
from pygame.image import load as image

player_image = image("textures/player.png")

wall_available = image("textures/wall/wall_black.png")
wall_oncooldown = image("textures/wall/wall_black_crossed.png")

powerup_null = image("textures/powerup/null.png")

powerup_images = {
    0: image("textures/powerup/null.png"),
    1: image("textures/powerup/bulletspeed.png"),
    2: image("textures/powerup/piercewalls.png"),
    3: image("textures/powerup/doublepoints.png"),
    4: image("textures/powerup/speed.png"),
    5: image("textures/powerup/tripleshot.png")
}
Example #4
0
from pygame.image import load as image

textures = {
    "player": image("textures/player.png"),
    "bullet": image("textures/bullet.png"),
    "enemy": image("textures/enemy.png"),
    "totem": image("textures/totem.png"),
    "logo": image("textures/logo.png"),
    "game_over": image("textures/game_over.png"),
    "background": image("textures/background.png"),
    "icon": image("textures/icon.png"),
}
Example #5
0
from pygame.image import load as image
import maploader

background = image(maploader.get_background_image())
car1_, car2_ = maploader.get_player_images()
car1, car2 = image(car1_), image(car2_)