Skip to content

Repository files navigation

2D video Game Effect - cluster bomb

Add explosions effect to your video game using the source code provided into this git page

Please have also a look at the cython version to explore the same algorithm improved with cython (FPS > 300)

New release

click to the new version to download the demo 
Install the program using Setup_ClusterBomb.exe

KEYS

spacebar : drop cluster bomb 
up       : spaceship move up 
down     : spaceship move down 
right    : spaceship move right
left     : move left
esc      : quit

Python version

Run the program ClusterBomb.py in your favorite python IDE 
Requirement: 
- Numpy
- Python 3
- Pygame

C:\>pip install pygame==2.0, numpy==1.19.3

Cython version x10 faster

Two tests version :

  1. ClusterMain_Collision.py This version include lines of code to detect collision with background layer (or object(s) belonging to a specific layer). The cluster bomb will explose only if it touch a solid ground (specific layer collision detection).

  2. ClusterMain_NoCollision.py Version without background collision detection, bombs explose regardless of the background image (fastest version). Bombs and background can be converted for fast blit (FPS over 100FPS).

Requirment :

C:\>pip install cython, matplotlib, pygame==2.0, numpy==1.19.3 

- python > 3.0
- numpy==1.19.3
- pygame
- Cython
- A C compiler for windows (Visual Studio, MinGW etc) install on your system 
  and linked to your windows environment.
  Note that some adjustment might be needed once a compiler is install on your system, 
  refer to external documentation or tutorial in order to setup this process.
  e.g https://devblogs.microsoft.com/python/unable-to-find-vcvarsall-bat/

Compilation :

In a command prompt and under the directory containing the source files
C:\>python setup_Project.py build_ext --inplace

If the compilation fail, refers to the requirement section and make sure cython 
and a C-compiler are correctly install on your system. 

alt text alt text alt text

About

cluster bomb

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages