-
Notifications
You must be signed in to change notification settings - Fork 1
New Gel Guide
EntranceJew edited this page Oct 12, 2014
·
4 revisions
Maurice thought it was more important to brokenly implement gravity gel than it was to implement water so here I am documenting important things while I did that.
- /game.lua:drawlevel() Your gel needs to be represented, so do some of that. Find a block like the following and make yourself at home:
elseif i == 5 then
img = gel5groundimg- /game.lua:drawforeground() Gels are in the foreground -- why they're not covered in drawlevel? I will never know. Until I refactor it. Second verse, resembles the first:
elseif i == 5 then
img = gel5groundimg- /gel.lua:init() You're going to need to define what the gels look like as they're flying.
elseif self.id == 5 then
self.graphic = gel5img- /lightbridge.lua:draw() Remarkably, gel doesn't use any sort of convenient numbering system therefore a switch case is the most efficient way to do things like this every time they're represented. Unfortunately, markdown doesn't allow me to properly express sarcasm tags large enough for the previous statement.
elseif i == 5 then
img = gel5groundimg- /main.lua:love.load():imagelist{} Just throw your gel type somewhere in this giant table.
- /entity.lua:rightclickmenues.gel{} You need to make your gel selectable in the editor. This is only necessary if your gel should be paintable on walls and such.
{t="submenu", entries={"blue", "orange", "white", "purple", "yergel"}, default=1, width=6},- /entity.lua:rightclickmenues.geldispenser{} The dispenser needs to be able to produce your gel.
{t="submenu", entries={"blue", "orange", "white", "purple", "yergel"}, default=1, width=6},- /mario.lua:movement(dt) If your gel impacts movement like blue or orange does, you should consider altering this, otherwise, you'll probably be fine.
- /game.lua:getTile() If you modify properties where your gel changes whether a portal can be shot, consider messing with this.