Page 1 of 2
i made this thing
Posted: Tue Nov 22, 2016 11:02 am
by childonline
I made this thing, I have no future plans for it, decided to post it here.
Enjoy!
Re: i made this thing
Posted: Tue Nov 22, 2016 1:53 pm
by D0NM
what is it?
Re: i made this thing
Posted: Tue Nov 22, 2016 2:38 pm
by s-ol
D0NM wrote:what is it?
steering beaviours / flocking simulation it seems. I think the color of each particle is based on it's movement angle too. It shouldn't be too hard to add mouse input deflecting them, I think that would be pretty cool?
Re: i made this thing
Posted: Tue Nov 22, 2016 6:18 pm
by Pyuu
Looks beautiful.
Re: i made this thing
Posted: Tue Nov 22, 2016 6:53 pm
by steVeRoll
I don't really know what this is, but it's beautiful.
Re: i made this thing
Posted: Tue Nov 22, 2016 10:18 pm
by easy82
It's somehow relaxing to watch. I really like it!
Re: i made this thing
Posted: Wed Nov 23, 2016 12:13 am
by Sir_Silver
Very cool, it would be nice though if you talked a little bit about exactly whats goin' on here
Re: i made this thing
Posted: Wed Nov 23, 2016 3:24 am
by Nuthen224
Cool!
Re: i made this thing
Posted: Wed Nov 23, 2016 5:53 am
by ivan
Good job. It looks cool which is a good start,
but I do have some suggestions:
- 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
- mention Reynolds or Buckland in the comments
Good luck!
Re: i made this thing
Posted: Wed Nov 23, 2016 11:10 am
by pgimeno
ivan wrote:
- Don't use a huge bitmap when the background is an array of dots
^ This. Plus I'm still wondering how he managed to create an
uncompressed PNG. (It compresses well when zipped, so it doesn't matter too much, but it's 17K in normal compressed PNG format, compared to the 33K it uses when zipped, i.e. 50% the size).
childonline, I'm curious about what tool you used to save this png.
- math.atan2 accepts Y as the first parameter
Sometimes it may be convenient to swap them. In particular, when you use an angle convention where north is 0° and angle increases clockwise, which is a convention used in navigation (except that in LÖVE, due to positive Y pointing down instead of up, 0° is south and the angle increases counter-clockwise).