Log In  


Cart #particle_system2d-1 | 2024-06-04 | Embed ▽ | License: CC4-BY-NC-SA
2

A simple library for spawning and simulating particles for 2D games.

First time using Lua and Picotron. I wanted to publish it despite being unfinished to get feedback.

How does it work

Particles

Container for components. Keeps track of:

  • position
  • speed
  • age

Particles are assigned to different layers. Each layer can be drawn to screen seperatly.

Components

There are two types of components: renderer and logic components.
They all derive from a base renderer/logic component and each has its own implementation of the update
and draw function.

Currently implemented Logic components:

  • Gravity
  • Drag

Currently implemented Renderer components:

  • Point
  • Circle
  • Sprite

TO DO

  • Improve animation system
  • Add a flag to each layer to prevent drawing it multiple times in a frame
  • Improve the SpriteRenderer component (allow different sized sprites)
  • Improve the CircleRenderer component
  • Allow for saving and loading presets using pods
  • Collision component (?)
  • RibbonRenderer component (?)
2


that's dope man! I'll follow the upgrades

xforza



[Please log in to post a comment]