Giter Site home page Giter Site logo

lagamestudio / gml_starfield_generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pixelprophecy/gml_starfield_generator

1.0 2.0 0.0 8 KB

šŸŒŒ A script to generate starfields in GameMakerā€™s GML language

License: MIT License

Game Maker Language 100.00%

gml_starfield_generator's Introduction

gml_starfield_generator

A script to generate starfields in GameMakerā€™s GML language.

ScreenShot

Overview

Since I found drawing starfields in Photoshop and importing them into GM a waste of texture-page space, I created this little script that creates starfields from scratch onto a transparent surface which can be drawn onto any background. The script is highly customizable and extensively commented so it should be fairly easy to use and modify.

Usage

  1. Download the two provided GML files
  2. Import the two files as scripts into your Game Maker project
  3. Create a new object
  4. Add a Creation event with an "Execute Script" action and select scr_fx_starfield_init
  5. Add a Draw event, also with an "Execute Script" action and select scr_fx_starfield_draw
  6. Modify the values in scr_fx_starfield_init to your needs.

To create a new starfield, just create an instance of the object at any coordinates.

Notes

Since the starfield is drawn onto a surface that is inherently volatile, itā€™s good practice to check whether it still exists and re-draw it, if necessary. Surfaces get destroyed when switching to/from full screen, for example.

gml_starfield_generator's People

Contributors

pixelprophecy avatar

Stargazers

 avatar

Watchers

 avatar  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.