Skip to content

New Gel Guide

EntranceJew edited this page Mar 17, 2015 · 4 revisions

Overview

These are all the codepoints you need to touch in order to make your gel usable with everything in the game.

Important Codepoints

  • /variables.lua:numgeltypes If you don't increment this, then your new gel won't get drawn. That would be terrible!
  • /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.
  • /game.lua:shootportal() The above will test if you can even begin to fire your portal gun, this will check if a portal will deploy on a block.
Clone this wiki locally