Re: i made this thing
Posted: Wed Nov 23, 2016 11:46 am
it was either IrfanView or Paint.NET, both have the option to save an uncompressed pngpgimeno wrote: childonline, I'm curious about what tool you used to save this png.
great feedback, thanks! i will definitely start using strict.lua more often. Could you please be more specific regarding what i'm doing wrong with the metatables/self-references (examples of best practices /bad practices would be most helpful)ivan wrote: - Don't use a huge bitmap when the background is an array of dots
- The current way you're using 'setmetatable' doesn't look correct -
sometimes you're using metabales and sometimes you're passing the 'self' reference manually.
Generally you need 1 table for the interface, one for the metatable and one for each instance,
You don't need metatables unless there is inheritance involved
- Don't clamp vectors along the x/y axis separately, clamp them based on length
- math.atan2 accepts Y as the first parameter
- use locals for temporary variables (ex: "vehicle.lua:232") - "strict.lua" can help you pinpoint these
- I didn't know the demo was interactive without looking at the code,
Either way you want to use abstraction for your 'vehicle' class so that it's not dependent on love2d's mouse
to be fair i wrote this demo after reading this excellent post: http://natureofcode.com/book/chapter-6- ... us-agents/, i assume the article is strongly based on Reynolds/Bucklands original codeivan wrote: - mention Reynolds or Buckland in the comments
this url will provide all the answers: http://natureofcode.com/book/chapter-6- ... us-agents/Sir_Silver wrote: Very cool, it would be nice though if you talked a little bit about exactly whats goin' on here