Skip to content

trubblegum/Gscrooter

Repository files navigation

Gscrooter is a super awesome platform shooter engine for LÖVE (a SCREWformer?), inpired by Gewter (a demo of Gspot, see below), but rebuilt from the ground up.

Kill the stuff! Count the hoppers! Protect your tree! Blow yourself up! Make your own levels! And more!

ToDo :
- sounds and sound loading
- your idea here

Editing :
Levels in /map can be loaded directly
map/mapname/map.lvl defines a map, which links to levels defnied within map/mapname/
map/mapname/map.png defines a background image for the map
map/mapname/backdrop.png defines a backdrop for levels in map mapname
map/levelname.png defines a backdrop for orphan level levelname
map/backdrop.png is the default level backdrop
if portal.level (as mapdir/level) then load map else return to menu

object defs will be loaded from (in this order) :
- classesdefault.lua - automatically at startup
- path specified in classes:load(path) - if forced
- map/mapname/<objectname>.lua - if map loaded and no defs.lua found
- map/mapname/defs.lua - if map loaded
- map/<objectname>.lua - if no map loaded
- map/defs.lua - if no map loaded and no defs.lua

Note that all object class defs in a file are cached, and an object with an orphan def will not be loaded again if a matching def exists in cache. Use precedence to determine which def will load if multiple defs exist for the same class.

The first line in a .lvl is the floor, which defines the level's bounds (entity level objects wrap to level bounds)

Objects are divided into object and effect level tables.
Collision methods only check against the object table.
See map/snortal.lua for examples and notes.

Object prototype can override any of an individual object's attributes or functions, including update(this, dt) and draw(this) functions. It is generally wise to call a lower order's update and draw at the end of an override function.
Note that only object level objects are placed in a level file. Effects are generated on the fly and added using world:addeffect(classes.<objectname>(proto))
Object instances can also be created at runtime using world:addobject(classes.<objectname>(proto))

Some included objects :
in classesdefault.lua :
- platform {p = {x, y, w, h}, img = 'platform1.png'}
- scenery {p = {x, y}, bg = 'treetop1.png'} -- behaves like a platform, but renders bg behind, centered and aligned to bottom
- healtree {p = {x, y}, healing  = (HPS)} -- it spawns an AOE heal effect
- chest {p = {}, contents = {'(itemclass)', '(itemclass)', ...}}
- itemheal
- itemgrenade

in map/Gplace/defs.lua :
- hopper {{p = {x, y}, hp, damage = (DPS)} -- you know what this does
- hopperspawn {} -- just because this is how I did it, doesn't mean you have to
- bommer {} -- ...
- bommerspawn {}
- buzzer {}
- buzzerspawn {}
- slither {}
- slitherspawn {}

Includes an implementation of HUMP camera and vector from https://github.com/vrld/hump
Includes a modified implementation of Tserial from https://love2d.org/wiki/TLTools
Includes an implementation of Gspot from https://github.com/trubblegum/Gspot

About

a super awesome platform shooter engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages