MXVK Vulkan Framework 0.35.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
asteroids Namespace Reference

Classes

class  Asteroid
class  AsteroidsWindow
class  Particle
class  Projectile
class  Ship
class  Star

Functions

None main ()
argparse.Namespace parse_args ()

Variables

int ASTEROID_VERTICES = 8
str DATA_DIR = EXAMPLE_DIR / "data"
 EXAMPLE_DIR = Path(__file__).resolve().parent
int EXPLOSION_DURATION = 90
int FIRE_COOLDOWN = 5
int FIRE_DELAY = 3
int GAME_H = 360
int GAME_W = 640
int LARGE_ASTEROID_POINTS = 20
int MAX_ASTEROIDS = 30
int MAX_PARTICLES = 40
int MAX_PROJECTILES = 50
int MEDIUM_ASTEROID_POINTS = 50
float MIN_ASTEROID_RADIUS = 8.0
int PROJECTILE_LIFETIME = 60
float PROJECTILE_SPEED = 5.0
int SHOTS_PER_BURST = 5
int SMALL_ASTEROID_POINTS = 100
int STAR_COUNT = 800
float TARGET_FRAME_TIME = 1.0 / 60.0

Function Documentation

◆ main()

None main ( void )

Definition at line 598 of file asteroids.py.

598def main() -> None:
599 args = parse_args()
600 window = AsteroidsWindow(args.width, args.height, args.fullscreen, args.vsync)
601 try:
602 window.loop()
603 finally:
604 window.close()
605
606
Definition main.py:1

◆ parse_args()

argparse.Namespace parse_args ( )

Definition at line 589 of file asteroids.py.

589def parse_args() -> argparse.Namespace:
590 parser = argparse.ArgumentParser(description="MXVK Python SpaceRox/Asteroids example")
591 parser.add_argument("--width", type=int, default=1280)
592 parser.add_argument("--height", type=int, default=720)
593 parser.add_argument("--fullscreen", action="store_true")
594 parser.add_argument("--vsync", action="store_true")
595 return parser.parse_args()
596
597

Variable Documentation

◆ ASTEROID_VERTICES

int asteroids.ASTEROID_VERTICES = 8

Definition at line 41 of file asteroids.py.

◆ DATA_DIR

str asteroids.DATA_DIR = EXAMPLE_DIR / "data"

Definition at line 55 of file asteroids.py.

◆ EXAMPLE_DIR

asteroids.EXAMPLE_DIR = Path(__file__).resolve().parent

Definition at line 54 of file asteroids.py.

◆ EXPLOSION_DURATION

int asteroids.EXPLOSION_DURATION = 90

Definition at line 47 of file asteroids.py.

◆ FIRE_COOLDOWN

int asteroids.FIRE_COOLDOWN = 5

Definition at line 44 of file asteroids.py.

◆ FIRE_DELAY

int asteroids.FIRE_DELAY = 3

Definition at line 46 of file asteroids.py.

◆ GAME_H

int asteroids.GAME_H = 360

Definition at line 36 of file asteroids.py.

◆ GAME_W

int asteroids.GAME_W = 640

Definition at line 35 of file asteroids.py.

◆ LARGE_ASTEROID_POINTS

int asteroids.LARGE_ASTEROID_POINTS = 20

Definition at line 49 of file asteroids.py.

◆ MAX_ASTEROIDS

int asteroids.MAX_ASTEROIDS = 30

Definition at line 39 of file asteroids.py.

◆ MAX_PARTICLES

int asteroids.MAX_PARTICLES = 40

Definition at line 40 of file asteroids.py.

◆ MAX_PROJECTILES

int asteroids.MAX_PROJECTILES = 50

Definition at line 38 of file asteroids.py.

◆ MEDIUM_ASTEROID_POINTS

int asteroids.MEDIUM_ASTEROID_POINTS = 50

Definition at line 50 of file asteroids.py.

◆ MIN_ASTEROID_RADIUS

float asteroids.MIN_ASTEROID_RADIUS = 8.0

Definition at line 48 of file asteroids.py.

◆ PROJECTILE_LIFETIME

int asteroids.PROJECTILE_LIFETIME = 60

Definition at line 43 of file asteroids.py.

◆ PROJECTILE_SPEED

float asteroids.PROJECTILE_SPEED = 5.0

Definition at line 42 of file asteroids.py.

◆ SHOTS_PER_BURST

int asteroids.SHOTS_PER_BURST = 5

Definition at line 45 of file asteroids.py.

◆ SMALL_ASTEROID_POINTS

int asteroids.SMALL_ASTEROID_POINTS = 100

Definition at line 51 of file asteroids.py.

◆ STAR_COUNT

int asteroids.STAR_COUNT = 800

Definition at line 37 of file asteroids.py.

◆ TARGET_FRAME_TIME

float asteroids.TARGET_FRAME_TIME = 1.0 / 60.0

Definition at line 52 of file asteroids.py.