Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ __pycache__/
*.py[cod]
*$py.class

# JSON files
*.json

# C extensions
*.so

Expand Down
Binary file added fonts/Early GameBoy.ttf
Binary file not shown.
Binary file added fonts/alagard.ttf
Binary file not shown.
Binary file added fonts/rainyhearts.ttf
Binary file not shown.
Binary file added fonts/slkscr.ttf
Binary file not shown.
Binary file added fonts/slkscrb.ttf
Binary file not shown.
Binary file added fonts/slkscre.ttf
Binary file not shown.
Binary file added fonts/slkscreb.ttf
Binary file not shown.
Binary file added fonts/upheavtt.ttf
Binary file not shown.
Binary file added images/players/player_stoped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 33 additions & 16 deletions reflexy/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,59 @@
CLOCK_TICK_REFERENCE = 30

# SCREEN
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
FONT_SIZE = 32
SCREEN_WIDTH = 1000
SCREEN_HEIGHT = 720
CAPTION = "Reflexy"

# GENETIC ALGORITM
LAYERS = [50, 50]
# FONTS
TITLE_FONT = "alagard"
TITLE_FONT_SIZE = 64
SCORE_FONT = "Early GameBoy"
SCORE_FONT_SIZE = 24
TEXT_FONT = "rainyhearts"
TEXT_FONT_SIZE = 36

# PLAYER
# ELEMENTS
BUTTOM_INCREASE_WHEN_HOVER = -5

# AI
SCREEN_WIDTH_AI = 280

# ANN
LAYERS = [150, 100, 50]

# PLAYER ANN
PLAYER_VISION_RANGE = 300
PLAYER_VISION_CHANNELS = 109
PLAYER_VISION_CHANNELS = 61
PLAYER_OUTPUTS = 5

# SPIDER AI
SPIDER_VISION_RANGE = 250
SPIDER_VISION_CHANNELS = 145
SPIDER_OUTPUTS = 6

# PLAYER
START_HP = 3
PLAYER_SPEED = 10
PLAYER_WIDTH = 87
PLAYER_HEIGHT = 70
PLAYER_ACCELERATION = 0.5 # in seconds
PLAYER_ACCELERATION_FUNC = "exp"
PLAYER_DECELERATION = 0.2 # in seconds
PLAYER_DECELERATION_FUNC = "lin"
PLAYER_OUTPUTS = 5
PLAYER_DECELERATION_FUNC = "exp"

# SPIDER
SPIDER_VISION_RANGE = 250
SPIDER_VISION_CHANNELS = 145
SPIDER_SPEED = 2.5
SPIDER_WIDTH = 70
SPIDER_HEIGHT = 40
SPIDER_EYE_X = 34
SPIDER_EYE_Y = 11
TIME_SPAWN_SPIDER = 7
MAX_SPAWN_SPIDER = 6
TIME_SPAWN_SPIDER = 5
MAX_SPAWN_SPIDER = 10
SPIDER_ACCELERATION = 1.5 # in seconds
SPIDER_ACCELERATION_FUNC = "exp"
SPIDER_DECELERATION = 0.2 # in seconds
SPIDER_DECELERATION_FUNC = "lin"
SPIDER_OUTPUTS = 6
SPIDER_DECELERATION_FUNC = "exp"

# RAY
RAY_WIDTH = 1068
Expand All @@ -49,7 +66,7 @@
RAY_ANIMATION_TIME = 2

# COOLDOWN
COOLDOWN_SPIDER_FIRE = 3.5
COOLDOWN_SPIDER_FIRE = 4.5
COOLDOWN_PLAYER_IMMUNE = 1.5
TIME_PLAYER_BLINK = 0.1
COOLDOWN_PLAYER_SWORD = 1.5
Empty file added reflexy/helpers/colision.py
Empty file.
Loading