Search found 42 matches

by peterrust
Sat May 13, 2017 4:48 am
Forum: Support and Development
Topic: Collision response with AABBs
Replies: 9
Views: 12472

Re: Collision response with AABBs

This is called the Minkowsky Difference, and is explained in detail on this article: Collision Detection for Dummies ... they relied heavily on the fact that their frame time was fixed and they didn't have floats, but integers Wow. kikito, thank you so much for your contributions to the LOVE commun...
by peterrust
Sun May 07, 2017 4:23 am
Forum: General
Topic: Small tips for store coordinats, eg map item, buttons...
Replies: 15
Views: 13264

Re: Small tips for store coordinats, eg map item, buttons...

C struct = 0.84 sec and 62mb ||| 1 value = 0.37 sec and 33mb ||| {x, y} = 1.35 sec and 197mb Interesting! What data type did you use, uint8? uint16? uint32? I suppose the struct would require at least one pointer/address more than a simple value, which would add an additional 32-bits or 64-bits for...
by peterrust
Sun May 07, 2017 3:46 am
Forum: General
Topic: Small tips for store coordinats, eg map item, buttons...
Replies: 15
Views: 13264

Re: Small tips for store coordinats, eg map item, buttons...

I meant to include a link to the luajit docs for c data structures in FFI: http://luajit.org/ext_ffi.html#cdata
by peterrust
Sun May 07, 2017 3:44 am
Forum: General
Topic: Small tips for store coordinats, eg map item, buttons...
Replies: 15
Views: 13264

Re: Small tips for store coordinats, eg map item, buttons...

the ever-present tradeoff between space and speed is applicable here as well An alternative method that should require less of a tradeoff is using C data structures, via luajit's FFI module. Objects with x and y properties could be defined as a C struct like this: local ffi = require("ffi"...
by peterrust
Tue May 02, 2017 3:31 pm
Forum: Libraries and Tools
Topic: Error handler that asks user to report crash
Replies: 26
Views: 27130

Re: Error handler that asks user to report crash

Very cool 0x25a0! I would be interested in an error handler that automatically posts an error report to a server (say Firebase or a logging service like logEntries) and displays a screen to the user saying that it is reporting the bug and then that it successfully reported the bug when it's done... ...
by peterrust
Thu Apr 27, 2017 4:50 am
Forum: General
Topic: Metroidvania platformer advice
Replies: 3
Views: 4446

Re: Metroidvania platformer advice

Bump uses "cells" of a certain size to check for collisions between objects that exist in the same cells Ditto on that, I would be very surprised if bump was a performance bottleneck for doing it all in one level. It uses a very cool cell-based system to achieve high performance. If you'r...
by peterrust
Tue Apr 25, 2017 9:02 pm
Forum: Support and Development
Topic: Font scaling?
Replies: 7
Views: 9076

Re: Font scaling?

xNick1 wrote: Tue Apr 25, 2017 7:32 pm Are people on the forum talking about me? eheheh
No, sorry, I think it was someone else :-) I think most people do it that way by default until they learn about graphics.scale() or the way OpenGL graphics work under the hood -- that's the way I was doing thing up until very recently.
by peterrust
Tue Apr 25, 2017 3:56 pm
Forum: Support and Development
Topic: Font scaling?
Replies: 7
Views: 9076

Re: Font scaling?

xNick1: Sir_Silver's approach will work and matches the approach you have taken with the rest of your game so it may be the best for the short term. But for the long term, you really should learn about what Jasoco is talking about because it will make your game faster and your code simpler. I recent...
by peterrust
Tue Apr 11, 2017 11:26 pm
Forum: Support and Development
Topic: [SOLVED]And yet, another padawan asking for help: multiple-input issue.
Replies: 3
Views: 4227

Re: And yet, another padawan asking for help: multiple-input issue.

KingMabus, I think the more typical way to handle keyboard controlled characters in love is to check the `isDown()` inside the update function, as in the example here: https://love2d.org/wiki/love.keyboard.isDown, instead of handling the keypressed and keyreleased events. keypressed and keyreleased ...
by peterrust
Tue Apr 04, 2017 11:04 pm
Forum: Libraries and Tools
Topic: JSON based Isometric map renderer
Replies: 9
Views: 9888

Re: JSON based Isometric map renderer

Cool, thanks for sharing!