Git Product home page Git Product logo

particlesystem's Introduction

ParticleSystem

Pygame Particle System, the source code includes the demo for the particle system but to use this particle system in any pygame game copy and paste the two classes particle system and particle, include all includes from the source code and add the update, create particle system methods to the main update method. Too add window collision add the particle collision method in the main update method. I am going to intergrate this particle system into my game engine after rewriting to c++.

v1.0.1

Added image support allowing images to be displayed instead of a circle or sqaure there is an example of this in the third screenshot

#How to create a particle system

particleSystem = ParticleSystem(X position of the particle system, Y position of the particle system ,speed of the particles, size of the particle system, Colour of the particles in RGB format (255,255,255), boolean if particles have gravity, lifetime of the particle in seconds , time.time() , the interval of time between each spawn of the particle in seconds , if the particles should spawn randomly or uniformly , if the paritcle is a circle (if false it will be a sqaure , gravity force of the particle , angle of where the particle will be spawned in degree 0-360, spread of the particle from the anlge in degree 0-360 )

Example too create a particle system shown in the second screenshot: ps = ParticleSystem(300,250,2,6,(0,0,200),False,4,time.time(),0.01,True, False,0.3,0,360)

------Screenshots of the Particle System------

screenshot

screenshot

screenshot

screenshot

screenshot

particlesystem's People

Contributors

haydend100 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.