Search found 1520 matches

by ivan
Wed Nov 06, 2019 3:17 am
Forum: Support and Development
Topic: Help With Body Contact Behavior
Replies: 7
Views: 355

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: 355

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: 256

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: 355

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: 13095

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/
by ivan
Sun Oct 27, 2019 4:25 pm
Forum: General
Topic: LÖVE 11.3 released!
Replies: 27
Views: 6796

Re: LÖVE 11.3 released!

Well done Slime and congratulations on the new version!
by ivan
Wed Oct 23, 2019 7:45 pm
Forum: Libraries and Tools
Topic: "profile.lua" a tool for finding bottlenecks
Replies: 27
Views: 13095

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

Found a few problems with the profiler under LuaJIT (JIT doesn't trigger the "return" event when recursion is involved). I have just released a patch to account for that, but it's not perfect. Note that C-functions are not supported at all. https://bitbucket.org/itraykov/profile.lua/src Use at your ...
by ivan
Mon Oct 21, 2019 5:16 pm
Forum: General
Topic: Are all the wiki tutorials supposed to work?
Replies: 3
Views: 379

Re: Are all the wiki tutorials supposed to work?

Depends on your networking setup/configuration. You can't blame the wiki, it's more about understanding what's going on.
I did write a similar tutorial:
https://2dengine.com/?p=networking
It's definitely possible to get it working over LAN but running it over the internet is more complicated.
by ivan
Sun Oct 06, 2019 6:24 pm
Forum: Libraries and Tools
Topic: [Notepad++] Launch Project From Any File
Replies: 2
Views: 3786

Re: [Notepad++] Launch Project From Any File

This is a great idea! Here is my version using just Lua/Love2d (without NppExec): 1.) Download "ezload.love" and save it somewhere 2.) Install Notepad++ 3.) Press F5 and enter the command: C:\path\to\love.exe C:\path\to\ezload.love -console -fused "$(FULL_CURRENT_PATH)" Note that "-console" and "-fu...