Error: main.lua:160: attempt to index field '?' (a nil value)
stack traceback:
main.lua:160: in function 'IsCollider'
main.lua:136: in function 'update'
[string "boot.lua"]:407: in function <[string "boot.lua"]:373>
[C]: in function 'xpcall'
Warning, quality setting failed!
(Result: buffers: 6223912, samples: 1786992)
First an advice. Your cube starts game in plain air and due to machine performance oddities you dt could be affected when you land. That way there lot of chances that your player "tunneling" the ground. Half of times I start your game it fails. You can fix this putting in your love.update something like math.min(dt, 0.06). This will avoid huge dt drops. This wouldn't happen for example if your game started in a menu screen. Anyway use that dt quality check is also useful for any in-game situation that your machine is stressing.
About your problem I think you doing "wall collision" too late. You should limit movement instead in key movement because if you do it later the collider check will try meanwhile to use an offscreen position (and so nil).
coffee wrote:First an advice. Your cube starts game in plain air and due to machine performance oddities you dt could be affected when you land. That way there lot of chances that your player "tunneling" the ground. Half of times I start your game it fails. You can fix this putting in your love.update something like math.min(dt, 0.06). This will avoid huge dt drops. This wouldn't happen for example if your game started in a menu screen. Anyway use that dt quality check is also useful for any in-game situation that your machine is stressing.
About your problem I think you doing "wall collision" too late. You should limit movement instead in key movement because if you do it later the collider check will try meanwhile to use an offscreen position (and so nil).
hello failed to solve the problem.
when changing frame = dt * 30 to Math.min (dt, 0.06) does not fall. What could this be?
coffee wrote:First an advice. Your cube starts game in plain air and due to machine performance oddities you dt could be affected when you land. That way there lot of chances that your player "tunneling" the ground. Half of times I start your game it fails. You can fix this putting in your love.update something like math.min(dt, 0.06). This will avoid huge dt drops. This wouldn't happen for example if your game started in a menu screen. Anyway use that dt quality check is also useful for any in-game situation that your machine is stressing.
About your problem I think you doing "wall collision" too late. You should limit movement instead in key movement because if you do it later the collider check will try meanwhile to use an offscreen position (and so nil).
hello failed to solve the problem.
when changing frame = dt * 30 to Math.min (dt, 0.06) does not fall. What could this be?
That was not really intended to replace your internal/custom frame value but just adjust your dt to a safe value before. You can do something like this:
coffee wrote:First an advice. Your cube starts game in plain air and due to machine performance oddities you dt could be affected when you land. That way there lot of chances that your player "tunneling" the ground. Half of times I start your game it fails. You can fix this putting in your love.update something like math.min(dt, 0.06). This will avoid huge dt drops. This wouldn't happen for example if your game started in a menu screen. Anyway use that dt quality check is also useful for any in-game situation that your machine is stressing.
About your problem I think you doing "wall collision" too late. You should limit movement instead in key movement because if you do it later the collider check will try meanwhile to use an offscreen position (and so nil).
hello failed to solve the problem.
when changing frame = dt * 30 to Math.min (dt, 0.06) does not fall. What could this be?
That was not really intended to replace your internal/custom frame value but just adjust your dt to a safe value before. You can do something like this:
luislasonbra wrote:
Thanks but I still have the problem of the clash.
What do you advise me?
There isn't much to say from my first post than give you some code. Something simple as this work. Code and measures taken from "Collicion con las paredes x, y" section. I didn't check if your "width + width" is really the ground width.
luislasonbra wrote:
Thanks but I still have the problem of the clash.
What do you advise me?
There isn't much to say from my first post than give you some code. Something simple as this work. Code and measures taken from "Collicion con las paredes x, y" section. I didn't check if your "width + width" is really the ground width.
Hello I still have the problem of the collision with the ground here I leave the file with the problem but a picture of what I mean.
So, now you added floating platforms and notice that your previous code made for floor don't work now. Well but is no use do another "let's make a platform game" thread. You need first learn the basics of platform collisions. Puzzlem00n very recently helped doing one from scratch. If you read the help in those threads and check wolfninja2 "platformguy" code you get a reliable engine for learn and use. I advise you learn what you can from there and comeback later with specific thing not learned there.
Hello I still have the problem of the collision with the ground here I leave the file with the problem but a picture of what I mean.
So, now you added floating platforms and notice that your previous code made for floor don't work now. Well but is no use do another "let's make a platform game" thread. You need first learn the basics of platform collisions. Puzzlem00n very recently helped doing one from scratch. If you read the help in those threads and check wolfninja2 "platformguy" code you get a reliable engine for learn and use. I advise you learn what you can from there and comeback later with specific thing not learned there.