Search found 1524 matches

by ivan
Sun Nov 17, 2019 1:17 pm
Forum: General
Topic: Coverage reports in LOVE
Replies: 8
Views: 179

Re: Coverage reports in LOVE

I'd rather test LuaJIT since that's what I'm deploying
When profiling, you will ALWAYS be profiling the Lua code, not the underlying binaries.
by ivan
Sat Nov 16, 2019 6:26 pm
Forum: General
Topic: Pulse screen to a beat
Replies: 5
Views: 94

Re: Pulse screen to a beat

Beat detection is generally unreliable AND difficult to implement. You should make beats manually; make a simple tool that will allow you to synchronize beats with audio and export beat tracks. Then you can use these beat tracks together with audio tracks in game. Yes, you can build your game aroun...
by ivan
Sat Nov 16, 2019 6:13 pm
Forum: General
Topic: Pulse screen to a beat
Replies: 5
Views: 94

Re: Pulse screen to a beat

I'm not an expert in this area but I have dabbled a little bit with rhythm-based gameplay and audio visualizations. For starters, you need to make sure that you understand the difference between beat detection and more simple ways of analyzing the raw audio input. For example this is an oscilloscope...
by ivan
Fri Nov 15, 2019 4:52 pm
Forum: General
Topic: Coverage reports in LOVE
Replies: 8
Views: 179

Re: Coverage reports in LOVE

Love2D uses LuaJIT so you have to make sure that tool is compatible with LuaJIT. I don't see LuaJIT mentioned anywhere in the docs. Generally speaking, profiling with LuaJIT is hard because it's super optimized and some hooks are not triggered at all. I would love to see a better way to profile Love...
by ivan
Wed Nov 06, 2019 3:17 am
Forum: Support and Development
Topic: Help With Body Contact Behavior
Replies: 7
Views: 642

Re: Help With Body Contact Behavior

pgimeno wrote:
Tue Nov 05, 2019 10:05 pm
I don't think bump will return anything other than 0, 1 or -1.
Good catch there. Still I don't recommend == for non integers.
by ivan
Tue Nov 05, 2019 6:59 pm
Forum: Support and Development
Topic: Help With Body Contact Behavior
Replies: 7
Views: 642

Re: Help With Body Contact Behavior

Box2D is a very powerful library, although its API can be a little overwhelming. Also, note that you should be especially careful with checks like x == 0 or y == -1. With floating point numbers (like collision normals) this check won't work as expected. Plus, the player could be standing on a slope ...
by ivan
Mon Nov 04, 2019 4:38 pm
Forum: Support and Development
Topic: Objects should collide only with one category
Replies: 3
Views: 501

Re: Objects should collide only with one category

You don't need separate bodies, you can set the category and mask PER fixture. Also, you can solve this without using "groups". You need at least 3 categories "head", "feet" and "ball", correspondingly: 0x1, 0x2 and 0x4. The trick would be setting the collision masks correctly. The masks should be: ...
by ivan
Mon Nov 04, 2019 7:09 am
Forum: Support and Development
Topic: Help With Body Contact Behavior
Replies: 7
Views: 642

Re: Help With Body Contact Behavior

Your isGrounded check is incorrect. First off, you need to check for contact:isTouching() and it helps to check the collision normal too. The collision normal will show you if the player is actually being pushed "up":
https://2dengine.com/?p=box2d#Is_the_bo ... ng_an_axis?
by ivan
Wed Oct 30, 2019 9:04 pm
Forum: Libraries and Tools
Topic: "profile.lua" a tool for finding bottlenecks
Replies: 27
Views: 13440

Re: "profile.lua" a tool for finding bottlenecks

Just pushed a major update that verifies that the profiler works correctly with Love2D 11.3/LuaJIT 2.0.5 and Lua 5.3.
Please update your profile.lua if you are using this lib!
https://bitbucket.org/itraykov/profile.lua/src/master/