Page 2 of 5
Re: Zoetrope, a starter kit for LOVE
Posted: Mon Jun 25, 2012 4:41 pm
by josefnpat
It's Fancy to see I'm `internet famous`. I always knew I'd be famous for my
.
I'm glad to finally see this out in the "open"!
Re: Zoetrope, a starter kit for LOVE
Posted: Tue Jun 26, 2012 4:26 am
by klembot
Here's
version 1.0.1, which should solve the arrow key bug along with a couple extra ones I noticed while testing on a Mac tonight. Updated demo is
here, too!
Re: Zoetrope, a starter kit for LOVE
Posted: Tue Jun 26, 2012 3:46 pm
by coffee
klembot wrote:Here's
version 1.0.1, which should solve the arrow key bug along with a couple extra ones I noticed while testing on a Mac tonight. Updated demo is
here, too!
Thanks, arrow keys no longer failing. I also have the tilde problem. I have it in keyboard but pressing it does nothing. Tried to find it elsewhere but I haven't Nixola luck. Even that configurable another key choice for the demo could be more safe.
Re: Zoetrope, a starter kit for LOVE
Posted: Wed Jun 27, 2012 8:43 pm
by opticq
Could you post a snippet that will successfully show a static sprite on screen? For some reason, just a static sprite isn't working for me but the tiles and animated sprites are.
Re: Zoetrope, a starter kit for LOVE
Posted: Thu Jun 28, 2012 6:23 pm
by klembot
See the first source code example on
this page. Guessing without any information, you haven't set one of the needed properties. The bare minimum properties you need for a fill are: x, y, width, height, and either a fill or border. I should add some checks for this in strict mode...
Re: Zoetrope, a starter kit for LOVE
Posted: Sat Jun 30, 2012 12:47 pm
by Kingdaro
Isn't there a way to use "__index" so that you don't have to put "self" as an argument in almost every function?
Also, when a fill is missing a property of acceleration, it should just default to 0.
Re: Zoetrope, a starter kit for LOVE
Posted: Sat Jun 30, 2012 2:55 pm
by Xgoff
Kingdaro wrote:Isn't there a way to use "__index" so that you don't have to put "self" as an argument in almost every function?
Code: Select all
local methods = { }
function methods:foo ()
return self.bar
end
o = setmetatable({ bar = "wat" }, { __index = methods })
however, that definition syntax isn't available inside table constructors so you have to use an explicit self inside those
Re: Zoetrope, a starter kit for LOVE
Posted: Wed Jul 18, 2012 10:04 pm
by klembot
Wanted to let you know I just put out version 1.1, which fixes a lot of annoyances (e.g. you no longer need to specify a x, y, and rotation velocity if you just want one) and also adds much more efficient collision detection. I went with a grid based method similar to bump.lua in favor of quadtrees. btw, if you make something with Zoetrope, please let me know! I am happy to link to it from the project page.
I like the idea of getting rid of self in method definitions a lot, but I also really want people to be able to specify methods in an object right as they extend a class. e.g.
Code: Select all
myObject = Sprite:extend{ bounce = function (self) print('bounce!') end }
Re: Zoetrope, a starter kit for LOVE
Posted: Fri Sep 28, 2012 4:33 am
by klembot
Resuscitating this thread to let everybody know I've posted
version 1.2, which brings:
- Pixel effects per group, e.g. apply a pixel effect to a specific layer of sprites, or the entire screen
- A new Subview class to handle temporary views like pause overlays and inventory screens
- Views have a panTo() method that scrolls the view so that a certain point is centered onscreen
- You no longer need to write a love.load() function; you only have to create the.app in main.lua and Zoetrope sets it running for you
- Some debugging niceties, e.g. you can write =2 + 2 instead of print(2 + 2), and objects now print their useful properties instead of just Table <xxxxx>
Re: Zoetrope, a starter kit for LOVE
Posted: Mon Oct 08, 2012 6:46 pm
by Compost
Thanks for putting this together. I'm just learning LOVE and Lua, and finding this quite helpful to get things up and running quickly. It's appreciated.
(e.g. you no longer need to specify a x, y, and rotation velocity if you just want one
This is true for "drag", but for "acceleration", I get errors if I don't include all three.