1. Chris Klimas
  2. zoetrope
  3. Issues
Issue #7 on hold

Integration with other LÖVE libraries

Trevor Kaufman
created an issue

Zoetrope seem to take over the entire love processing.

I'd like to use the LoveFrames (https://love2d.org/wiki/L%C3%B6ve_Frames) library to create the interface around the game, and zoetrope to control the game action itself.

However, the LoveFrames code wants to be called inside each of the love callbacks. And zoetrope redefines the callbacks regardless of what I have in them. Would it be possible for zoetrope to call the originally defined callback methods inside its redefinition?

I have done this is a very basic (and probably wrong) way. I am not very familiar with Lua, so this probably isn't the best option. For example, below is my change to app.lua for the love.draw callback. {{{


self.loveDraw = love.draw love.draw = function() self:draw() self.loveDraw() end


Comments (1)

  1. Chris Klimas repo owner

    This is a tricky one because I haven't seen other libraries play nicely with each other beyond making you write your own callback hooks. I'll think about how to do this the right way... I imagine it might be something along the lines of jQuery's compatibility mode, e.g. something you'd opt into.

    For now, I'd just recommend putting your modifications into your app's onRun handler. It runs after Zoetrope finishes initializing, so you don't need to modify the Zoetrope code directly.

  2. Log in to comment