Skip to content

Software that generates pixel style light cookie textures for 2D games.

License

Notifications You must be signed in to change notification settings

mkwozniak/PixelLightCookieGenerator

Repository files navigation

PixelLightCookieGenerator

PLCG is a quick and customizable way to generate pixel style light cookie textures for your 2D games.

I couldn't find anything that could generate pixel light cookies easily, so I decided to write one for fun (crazy right?).

It uses Pillow to generate the images and Tkinter for the user interface.

image

I'm not exactly an expert in UX. Forgive me.

Default Output Sample

image

The white border and extra padding is not visible when exporting.

Usage

Enter your desired values into each entry and click Generate. You can view your generated image by clicking the Preview button. This will open the preview window. Once you're satifisfied with your generated image, click the Save button to export it as a PNG image.

Note that generating with a Clear background won't be easily visible in the preview window.

To prevent this, generate with a Black background first.

Falloff

Falloff Power subtracts from each color channel for every N pixels (Falloff Spread). This begins at the radius Falloff Start.

Use the RGB values to control the initial brightness.

Half Point Mode

When calculating points inside the unit circle, Half Point Mode (enabled by default) will add 0.5 to each point. This is usually preferred as it tends to result in better looking circles.

Building

  • Use the command 'pyinstaller plcg.spec' to build the distributable.

Light and Web Builds

  • PLCG Light will be the barebones Python console version. Not yet available.
  • PLCG Web will be the browser based Javascript version. Not yet available.

Notes

  • The executable was packaged with pyinstaller. Therefore it may trigger Windows Defender warnings.
  • PLCG isn't dreadfully slow, but it is not efficient at generating very large images. You have been warned.

Sins

  • A few magic numbers need to move to config
  • Tkinter layout is a bit messy
  • Algorithm to generate falloff could use some optimization

Future Improvements

  • Saving/loading templates
  • Support for angled cone shapes and sectors
  • Support for noise generation
  • Support for image masking
  • Halo/border effects

About

Software that generates pixel style light cookie textures for 2D games.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages