Git Product home page Git Product logo

prettylight's Introduction

๐Ÿ’ก prettylight GitHub release GitHub stars Marketplace download

A powerful lighting engine for use with GameMaker: Studio. It makes use of surfaces and shaders to give you a simple to use yet optimal solution to your problems in need of lighting up!

โš ๏ธ GameMaker Studio 2 Notice

These scripts are currently untested and unprepared for GameMaker Studio 2. You may import them into your project and use but they may not work. We are working on it though!

Usage

Prerequisites

Registration

You should make use of a game control object to register settings and such for the framework.

  • Initialise the system in the create event with pl_init()
  • Process the system in the step/begin step event with pl_update()
  • Render the lights in the draw end event with pl_draw()
  • Clear the system in the room end/game end event with pl_end()

Adding Lights

Initialise a light in the create event of a light object with pl_light_init(). Make sure that the light object you specify has been registered via pl_add().

Tip: Make use of a parent light object to prevent you from having to register every single light object.

API

Global Methods

You can customise certain aspects of the framework with the following methods:

pl_option_set_ambience(color, brightness)

Set the ambience colour and brightness.

pl_option_set_blur(amount, alpha)

Set the blurring amount and transparency.

pl_set_blurring(active?)

Set whether blurring should be active.

pl_set_vivid(active?)

Set whether vivid lighting should be active.

Light Methods

You can customise each individual light with the following methods:

pl_light_init(radius, colour, alpha)

Initialise a new light.

pl_light_destroy()

Destroy the current light.

pl_light_get_alpha()

Get the transparency of the light.

pl_light_get_color()

Get the colour of the light.

pl_light_get_radius()

Get the radius of the light.

pl_light_set_alpha(value)

Set the transparency of the light.

pl_light_set_color(value)

Set the colour of the light.

pl_light_set_radius(value)

Set the radius of the light.

Credits

  • Nik Sudan - Scripts and project maintenance
  • FatalSleep - Scripts
  • xygthop3 - Shaders

prettylight's People

Contributors

niksudan avatar yaazarai avatar nailujx86 avatar

Watchers

Lars Andersson 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.