Search found 343 matches
- Tue Dec 22, 2015 10:39 pm
- Forum: Support and Development
- Topic: Why does my player bounce back and forth when colliding?
- Replies: 9
- Views: 3538
Re: Why does my player bounce back and forth when colliding?
Yeah, I see what you mean, but I was already doing that. That is why the player doesn't bounce back and forth all the time, but it stills does that sometimes.
- Sat Dec 19, 2015 6:42 pm
- Forum: Support and Development
- Topic: Why does my player bounce back and forth when colliding?
- Replies: 9
- Views: 3538
Re: Why does my player bounce back and forth when colliding?
I've tried different things, and nothing worked, so I just set the player to draw at math.floor(player.x) and math.floor(player.y), so if the player teleports into a block for a frame, it won't show, because the player moves almost nothing in just one frame. Lazy, I know, but whatever
- Fri Dec 18, 2015 11:52 am
- Forum: Support and Development
- Topic: Why does my player bounce back and forth when colliding?
- Replies: 9
- Views: 3538
Re: Why does my player bounce back and forth when colliding?
I only see problems when going right. I think you've got your loops wrong. This works for me (for the right direction only): local i = math.floor(player.x / 16)+2 -- only one X coordinate to check, no need for a loop for j = math.floor(player.y / 16)+1, math.ceil(player.y / 16)+1 do When going in a...
- Fri Dec 18, 2015 11:41 am
- Forum: Support and Development
- Topic: Why does my player bounce back and forth when colliding?
- Replies: 9
- Views: 3538
Re: Why does my player bounce back and forth when colliding?
As opposed to using keypressed and keyreleased, I would use isDown within the update function. function updatePlayer(dt) local tx, ty = nil, nil if love.keyboard.isDown("up") then ty = player.y - player.speed * dt elseif love.keyboard.isDown("down") then ty = player.y + player.s...
- Thu Dec 17, 2015 5:02 pm
- Forum: Support and Development
- Topic: Why does my player bounce back and forth when colliding?
- Replies: 9
- Views: 3538
Why does my player bounce back and forth when colliding?
When the player in my game collides with either the left or top wall of a game, the player begins bouncing up and down or back and forth. Anyone know why? The player collision detection is located in player.lua, line 92 until line 155.
- Mon Dec 14, 2015 2:16 pm
- Forum: Support and Development
- Topic: Why does this simple collision detection not work?
- Replies: 2
- Views: 1457
Re: Why does this simple collision detection not work?
oh, thanks! that was a bit of a stupid mistake
- Sun Dec 13, 2015 8:03 pm
- Forum: Support and Development
- Topic: Why does this simple collision detection not work?
- Replies: 2
- Views: 1457
Why does this simple collision detection not work?
I have no idea why this doesn't work.
- Fri Nov 13, 2015 9:38 pm
- Forum: Support and Development
- Topic: How would I go about creating a Zelda clone?
- Replies: 1
- Views: 1333
How would I go about creating a Zelda clone?
I'm just interested in how the collision between the world and the player is made. I have tried and failed many times at creating a Zelda clone or a Binding of Isaac clone. I have also tried using Bump.lua, but I just got problems with my bullets collision and I eventually gave up. Is there really a...
- Tue Nov 10, 2015 3:48 pm
- Forum: Libraries and Tools
- Topic: My Adventure Game Engine - Making Way For Adventure Engine 2
- Replies: 367
- Views: 147316
Re: My Adventure Game Engine - Making Way For Adventure Engi
How does the collision detection work?
- Sat Nov 07, 2015 8:09 am
- Forum: Support and Development
- Topic: What's wrong with this puzzle game?
- Replies: 2
- Views: 1866
Re: What's wrong with this puzzle game?
God dammit, thanks! I was pulling my hair out over this bug!