Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

10 years ago by Rockster160

henonchesser, would you mind posting your main.js? I don't see anywhere that you established ig.input.bind to your directional movements.

Joncom, I've made a couple adjustments to the gridmovement class to include things like last direction and such to make it more useable with graphics. Anyway! I'm having an issue getting more direct collisions. I feel like I saw a comment where you mentioned something along the lines of the entity actually moving a couple pixels past the visual sprite before locking back into place. Is there a work around for that?
I'm having an issue where the player acts as though he is 'colliding' into an enemy when he moves into a space in the direction that faces the enemy.

For example, since I feel that was hard to understand. If the enemy is at [2,2] and the player is at [0,2] then moves onto [1,2] it is counted as a collision. There is no collision problem with being next to the enemy at all, only if the player moves into an adjacent block in the direction of the enemy. Any ideas? I'll post my code if requested, though I don't feel as though it changes much. Currently all entity sizes are 32x32 as well as tile sizes. Changing any of these seems to break it, although the enemy is more like 16x23.

10 years ago by Joncom

Quote from Rockster160
I feel like I saw a comment where you mentioned something along the lines of the entity actually moving a couple pixels past the visual sprite before locking back into place. Is there a work around for that?
https://github.com/Joncom/impact-grid-movement/blob/master/lib/game/entities/player.js#L27

Maybe you saw this, and if so, it's already handled. However, if you're talking specifically about entity vs entity collision, maybe there is a bug with that.

So you're saying that moving one entity to a grid position next to another entity causes a collision between the two entities, even though they should not be touching (they should just be beside each other)?

What happens if you try your test again, but you make your all your entity width/height the same size as your collision map tiles?

9 years ago by iparra

Nice plugin, thanks.
Page 2 of 2
« first ‹ previous next › last »