# coderNull

Member

4

103 Neutral

• Rank
Newbie
1. ## Ladder Collision and Implementation in Platformers

Hi guys, I just have a quick question about how to implement ladders into my new platformer game that uses a tile map system. How would the collision work out? I know it has something to do with the collision class because if a ladder would negate the platform collision rules, I just don't know how to get it started. Any help would be greatly appreciated, thanks.
2. ## Problem with shooting bullets in both directions (Platformer)

Thanks alot, worked like a charm.
3. ## Problem with shooting bullets in both directions (Platformer)

I have a question about shooting bullets on to the left side of the screen. I tried implementing a bullet class and the bullets would always change direction mid air depending on which direction the player was going. For example: if i were to shoot to the right the bullets would move to the right until i move the player to the left in which case all the bullet arrays start moving left. Is there a? way to make all of my bullets keep going a certain direction? I know there's an easy way to do this and it's just going above my head. Thanks in advance. Here is my Bullet class..   #include "Bullet.h"     Bullet::Bullet(void) { }     Bullet::~Bullet(void) { }     void Bullet::Init() { bulletSpeed = 10; canShoot = 1; counter = 1; }     void Bullet::Shoot(BITMAP *buffer, Player player) { if(key[KEY_SPACE] && canShoot == 1) { for(int i = counter; i < maxBullets; ++i) { bulletX[i] = player.getX(); bulletY[i] = player.getY(); }   ++counter; canShoot = 0; }   if(!key[KEY_SPACE]) { if(canShoot == 0) { canShoot = 1; } }   for(int i = 1; i <= counter; ++i) { if(player.getHDir() == 1) // '1' means the player is facing to the right { bulletX[i] += bulletSpeed; } else { bulletX[i] -= bulletSpeed; } circlefill(buffer, bulletX[i], bulletY[i], 5, makecol(15, 50, 255)); } }
4. ## Problem with shooting bullets in both directions (Platformer)

I have a question about shooting bullets on to the left side of the screen. I tried implementing a bullet class and the bullets would always change direction mid air depending on which direction the player was going. For example: if i were to shoot to the right the bullets would move to the right until i move the player to the left in which case all the bullet arrays start moving left. Is there a? way to make all of my bullets keep going a certain direction? I know there's an easy way to do this and it's just going above my head. Thanks in advance. Here is my Bullet class..   #include "Bullet.h"     Bullet::Bullet(void) { }     Bullet::~Bullet(void) { }     void Bullet::Init() { bulletSpeed = 10; canShoot = 1; counter = 1; }     void Bullet::Shoot(BITMAP *buffer, Player player) { if(key[KEY_SPACE] && canShoot == 1) { for(int i = counter; i < maxBullets; ++i) { bulletX[i] = player.getX(); bulletY[i] = player.getY(); }   ++counter; canShoot = 0; }   if(!key[KEY_SPACE]) { if(canShoot == 0) { canShoot = 1; } }   for(int i = 1; i <= counter; ++i) { if(player.getHDir() == 1) // '1' means the player is facing to the right { bulletX[i] += bulletSpeed; } else { bulletX[i] -= bulletSpeed; } circlefill(buffer, bulletX[i], bulletY[i], 5, makecol(15, 50, 255)); } }