Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Bomberman's deplacement style  (Read 7607 times)

0 Members and 1 Guest are viewing this topic.

Arcade

  • Full Member
  • ***
  • Posts: 230
    • View Profile
Re: Bomberman's deplacement style
« Reply #15 on: January 28, 2015, 06:06:48 pm »
Quote
if I'm not mistaken in bomberman the movement is aligned, i.e. the player will only stop walking on multiplies of X pixels.

This is likely true. I've only ever played one bomberman game before (Mega Bomberman), but in that game x is several times smaller than the size of the blocks. Meaning the player won't necessarily be perfectly lined up with the blocks (or openings) when releasing the movement button.

Quote
I think in bomberman if you collide with a wall it also moves him a bit on the other axis to fit to the opening right?

Yeah, if I'm understanding you correctly, that's what I was getting at in my previous post. If a player is trying to move into an opening, but is slightly not lined up with the opening, it will first move the player in the other axis until lined up. As you mentioned, giving the player a "bounding circle" and allowing the circle to slide around the corners of a wall is one solution to that problem.

Anyways, I've realized these aren't really the problems cChaD is experiencing. He is more focused on getting basic collision responses working, so I won't derail this thread any longer :)

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Bomberman's deplacement style
« Reply #16 on: January 29, 2015, 01:08:45 am »
I think it's possible that we just don't understand what you mean when you say that you replace the player.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

cChaD

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: Bomberman's deplacement style
« Reply #17 on: January 29, 2015, 12:54:34 pm »
I think it's possible that we just don't understand what you mean when you say that you replace the player.

Alright, actually if the player press a RIGHT key, the collisions calcul where the Top Right Corner will be, with the player position more the "actual" movement, also the next movement can be lower and the bomberman will be not stuck on the wall, so i replace him.

Arcade

  • Full Member
  • ***
  • Posts: 230
    • View Profile
Re: Bomberman's deplacement style
« Reply #18 on: January 29, 2015, 06:24:53 pm »
I think the language barrier here might be too large for us to really help you. This is my interpretation of your last post:

"If the player presses the Right key, the collision calculation uses the top right corner of where the player will be, which is more than they can actually move because the wall is in the way. Also, the player might press Down at the same time causing the bomberman to now be stuck on the wall...."

That's all I could understand, and I'm not even sure if it's accurate. What do you mean when you say you "replace him"? What you typed doesn't give us enough information to figure out why your bomberman is getting stuck on the wall.

Basically it sounds like you want to handle the case where the user presses Right and Down at the same time. All you need to do is handle those cases separately. Ask yourself "can the player move Right without colliding? if so move Right. Can the player move Down without colliding? if so, move Down."

Have you tried to understand Silderan's post from earlier? Maybe you could start by trying to explain why it doesn't answer your question.

cChaD

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: Bomberman's deplacement style
« Reply #19 on: January 30, 2015, 11:01:26 pm »
Sorry, i have read back and arcade's post get up the solution, thank you everybody.

++

 

anything