Search found 15 matches

by dezoitodemaio
Fri Dec 25, 2020 3:55 am
Forum: Support and Development
Topic: Do memory pools actually work in love2D
Replies: 10
Views: 10295

Re: Do memory pools actually work in love2D

As far as i know memory pooling is a good choice if youre creating and deleting objects during the gameplay, outside the load/initialize part of your game. Allocating/deallocating memory is a expensive operation, thats why object pooling is good. You can reuse the memory previously allocated by anot...
by dezoitodemaio
Tue Dec 22, 2020 1:53 am
Forum: Support and Development
Topic: Is it possible to replay a box2d world?
Replies: 3
Views: 2692

Re: Is it possible to replay a box2d world?

For the same input, and same binary, Box2D will reproduce any simulation
That means i will get the same result as long as i run the game and the replay on the same platform, right?

The docs says about the floating point problem but only when you mix platforms, like windows and unix
by dezoitodemaio
Mon Dec 21, 2020 11:08 pm
Forum: Support and Development
Topic: Is it possible to replay a box2d world?
Replies: 3
Views: 2692

Is it possible to replay a box2d world?

I'm developing a game and i want to store the keys pressed by the player to use later on some replay system and validation.

Is passing a fixed dt to world:update enough?
by dezoitodemaio
Sat Oct 31, 2020 4:04 pm
Forum: Support and Development
Topic: Creating and drawing polygons
Replies: 4
Views: 5435

Re: Creating and drawing polygons

1) you can use https://www.mapeditor.org/, it has a geometry editor with rectangles, circles and polygons. You can also natively export the map to a .lua file.
by dezoitodemaio
Mon Oct 26, 2020 2:06 pm
Forum: Support and Development
Topic: 2d collision with rotated pictures
Replies: 12
Views: 11845

Re: 2d collision with rotated pictures

Since rectangles are made of lines you could check line to line collision, something like https://github.com/processing/processin ... -Detection. If any line of Rectangle A intersects any line of Rectangle B then there are colliding.