Search found 1903 matches

by pgimeno
Wed Dec 04, 2019 11:21 pm
Forum: Games and Creations
Topic: Sliding maze puzzle
Replies: 6
Views: 757

Re: Sliding maze puzzle

Thanks for the comments. I've updated the first post with instructions. I may return to it to add some bells and whistles, but not in the next few days.
by pgimeno
Tue Dec 03, 2019 9:15 pm
Forum: Support and Development
Topic: Problem with collision (AABB)
Replies: 6
Views: 277

Re: Problem with collision (AABB)

I've looked into your program a bit, and it's now clear why you need to do platform.y + player.h. It's because the player position is given as the bottom left corner of the player. So, technically the proper thing to do would be to use checkCollision(player.x, player.y - player.h, player.w, player.h...
by pgimeno
Tue Dec 03, 2019 11:50 am
Forum: Support and Development
Topic: How does one debug silent crashes?
Replies: 5
Views: 269

Re: How does one debug silent crashes?

You can run any executable in a debugger, but the stacktrace you're getting from a crash in LuaJIT is ususally not very helpful; at least it was never helpful to me. Been in that situation a couple times myself. No, a stack trace won't help, unfortunately. Examining the disassembly is the best bet,...
by pgimeno
Tue Dec 03, 2019 11:29 am
Forum: Support and Development
Topic: Problem with collision (AABB)
Replies: 6
Views: 277

Re: Problem with collision (AABB)

Hard to tell without having the rest of the code. Maybe you can attach a .love file? All I can say is that generally, setting the vertical speed to 0 is not enough to guarantee that the entity will be on the platform, because the Y coordinate will already be wrong by the time a collision is detected...
by pgimeno
Tue Dec 03, 2019 2:45 am
Forum: Support and Development
Topic: Problem with collision (AABB)
Replies: 6
Views: 277

Re: Problem with collision (AABB)

Tilur wrote:
Mon Dec 02, 2019 8:35 pm

Code: Select all

    if checkCollision(player.x, player.y, player.w, player.h, platform.x, platform.y + player.h, platform.w, platform.h) then
Why platform.y + player.h?
by pgimeno
Mon Dec 02, 2019 3:09 pm
Forum: Support and Development
Topic: How does one debug silent crashes?
Replies: 5
Views: 269

Re: How does one debug silent crashes?

These are the worst. I don't think you can do much more than take a look at the disassembly around the generated code that causes the crash, to try to match it to the real code, but that's hard work. I know how to do that with gdb, though, not with VS. FFI issues can be subtle. See https://github.co...
by pgimeno
Mon Nov 25, 2019 3:07 pm
Forum: General
Topic: Suggections about wiki content about LuaJIT, bitwise operators, etc.
Replies: 4
Views: 218

Re: Suggections about wiki content about LuaJIT, bitwise operators, etc.

"when do love not come with luajit?" - Löve is built with luaJIT (and the bitops library) by default , but since it has source distributions, people are free to build Löve with other lua backends; 5.1, 5.2, 5.3 or LuaJIT. (but if it's not luaJIT, they'll sacrifice speed a lot) Not only that , but t...
by pgimeno
Fri Nov 22, 2019 6:52 am
Forum: Support and Development
Topic: How to calculate physical stats for a platformer game
Replies: 10
Views: 749

Re: How to calculate physical stats for a platformer game

I'll defer that to others. I have always used love.physics directly, but I haven't written any game that uses it. Thrust II Reloaded uses custom physics.
by pgimeno
Thu Nov 21, 2019 12:03 pm
Forum: Libraries and Tools
Topic: Gspöt - retained GUI lib
Replies: 153
Views: 62686

Re: Gspöt - retained GUI lib

Ah, well, same idea, just set the label of the gui:text element.

Code: Select all

function love.load()
	number=0
	text=gui:text(tostring(number))
	
	button=gui:button('Click me')
	function button.click(this,x,y)
		number=number+1
                text.label = tostring(number)
	end
end
by pgimeno
Thu Nov 21, 2019 11:52 am
Forum: Support and Development
Topic: How to calculate physical stats for a platformer game
Replies: 10
Views: 749

Re: How to calculate physical stats for a platformer game

In short, I need to find a way to limit the speed or disable the acceleration of x, hope you can solve it for me. Thank you so much for all. Just ceasing to apply force or impulse is not a good idea, because then the character is subject to friction and the velocity can decrease. There are several ...