Jump to content
  • Advertisement
  • entries
    23
  • comments
    21
  • views
    21101

BOATMATH 3.5: The Cube Moves The Boat Now

nerdboy64

1654 views

Just a mini-update this time, nothing too major. The biggest change is that in simulation mode the test cube will act as an engine, pushing the boat forward. In addition to this, there are a bunch of small changes made to the editor:

  • Machinery will appear in a translucent "preview" mode before being placed.
  • Scroll wheel now rotates machinery.
  • Machinery snaps to the horizontal grid by default, making it easier to line it up with the center of the ship. This can be toggled by pressing G.
  • Machinery will only be highlighted when you're looking at it instead of all the time (eventually, you'll click to select machinery and be able to change options for them, for example the caliber and barrel length of a cannon).
  • Right click deletes a surface or machine depending on which mode the editor is in.

Also I got a new video editing program so now I can fast forward through building the exact same boat again.



0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By hmcdev
      I want to learn to code games in C++ but I have no idea where to start, can someone teach me?
    • By phil67rpg
      I am made a lot of progress in my game but I have hit a small snag. in my code I am using an AABB collision detection. I have also used exit(0) to debug my code.it tells  me where in my code where it is getting access to. I have put exit(0) in the AABB collision detection and it accesses it just fine. but when I put only drawcollision_one function in the AABB collision routine it does not draw my collision sprite  animation. when I put drawcollision_one in the display function it works just fine. when the planes collide nothing happens but the exit(0) is accessed when the planes collide. here is the code I am working on.
      void drawcollision_one() { glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture[3]); glBegin(GL_POLYGON); glTexCoord3f(0.0f + screen, 0.0f, 0.0f); glVertex3f(0.5f, -0.5f, 0.0f); glTexCoord3f(0.167f + screen, 0.0f, 0.0f); glVertex3f(0.5f, 0.5f, 0.0f); glTexCoord3f(0.167f + screen, 1.0f, 0.0f); glVertex3f(-0.5f, 0.5f, 0.0f); glTexCoord3f(0.0f + screen, 1.0f, 0.0f); glVertex3f(-0.5f, -0.5f, 0.0f); glEnd(); glDisable(GL_TEXTURE_2D); } void timer(int val) { screen += 0.1667f; if (screen >= 1.0f) { screen = 1.0f; } glutPostRedisplay(); glutTimerFunc(500, timer, 0); } void coll_plane_one() { //draw bullet float x = -5.0f + horizontal; float y = 0.0f + vertical; float oWidth = 1.0f; float oHeight = 1.0f; //draw plane float xTwo = 5.0f + horizontal_one; float yTwo = 0.0f + vertical_one; float oTwoWidth = 1.0f; float oTwoHeight = 1.0f; if (checkCollide(x, y, oWidth, oHeight, xTwo, yTwo, oTwoWidth, oTwoHeight) == 1) { drawcollision_one(); } }  
    • By sidbhati32
      Hey,
      So I have got this asteroid type game and today I encountered a new issue while testing this game.
      What happened was that two asteroids were close to each other and I shot a bullet at them. The asteroids were so close to each other that a single bullet could collide to both of them.
      It collided and my game crashed there itself. I figured out it happened because two asteroids and one bullet collided in the same frame.
      This is the code -
      ```void Collision::DoCollisions(Game *game) const
      {
          for (ColliderList::const_iterator colliderAIt = colliders_.begin(), end = colliders_.end();
              colliderAIt != end;
              ++colliderAIt)
          {
              ColliderList::const_iterator colliderBIt = colliderAIt;
              for (++colliderBIt; colliderBIt != end; ++colliderBIt)
              {
                  Collider *colliderA = *colliderAIt;
                  Collider *colliderB = *colliderBIt;
                  if (CollisionTest(colliderA, colliderB))
                  {
                      game->DoCollision(colliderA->entity, colliderB->entity);
                  }
              }
          }
      }```
       
      ```
      void Game::DoCollision(GameEntity *a, GameEntity *b)
      {
          Ship *player = static_cast<Ship *>(a == player_ ? a : (b == player_ ? b : 0));
          Bullet *bullet = static_cast<Bullet *>(IsBullet(a) ? a : (IsBullet(b) ? b : 0));
          Asteroid *asteroid = static_cast<Asteroid *>(IsAsteroid(a) ? a : (IsAsteroid(b) ? b : 0));
          Bullet *bulletMode = static_cast<Bullet *>(IsBulletMode(a) ? a : (IsBulletMode(b) ? b : 0));
          if (player && asteroid)
          {
              player->playerCollided = true;
              //AsteroidHit(asteroid);
              //DeletePlayer();
          }
          if (bullet && asteroid)
          {
              collidedBullets.push_back(bullet);
              collidedAsteroid.push_back(asteroid);
              //AsteroidHit(asteroid);
              //DeleteBullet();
          }
          if(bulletMode && asteroid)
          {
              collidedBulletMode.push_back(bulletMode);
              collidedAsteroid.push_back(asteroid);
          }
      }```
       
      ```
      void Game::CollisionResponse()
      {
          if(player_->playerCollided == true)
          {
              DeletePlayer();
          }
          else
          {
          if(!collidedAsteroid.empty())
          {
              for(AsteroidList::const_iterator collidedAsteroidIt = collidedAsteroid.begin(), end = collidedAsteroid.end(); collidedAsteroidIt != end ; ++collidedAsteroidIt )
              {
                  AsteroidHit(*collidedAsteroidIt);
              }
              collidedAsteroid.clear();
          }
          
          if(!collidedBullets.empty())
          {
          for (BulletList::const_iterator bulletIt = collidedBullets.begin(), end = collidedBullets.end() ; bulletIt!=end; ++bulletIt)
          {
              DeleteBullet(*bulletIt);
          }
          
              collidedBullets.clear();
          }
          if(!collidedBulletMode.empty())
          {
              for (BulletList::const_iterator bulletIt = collidedBulletMode.begin(), end = collidedBulletMode.end() ; bulletIt!=end; ++bulletIt)
              {
                  DeleteBulletMode(*bulletIt);
              }
              collidedBulletMode.clear();
          }
      }
          }```
       
       
      in my game->docollision() -
      whenever an asteroid and a bullet used to collide, the collided objects get collected in collidedasteroids and collidedbullets respectively. When two asteroids collided with the same bullet, the two asteroids got collected safely in collidedAsteroid but the single bullet got collected in collidedBullets twice, so when the deletion was happening, the second time iteration of the bullet couldn't find the respective bullet and it got crashed.
       
      How am I supposed to approach this problem now?
       
      Thanks
    • By sidbhati32
      How to calculate angle between two points from a third point with the help of D3DXMATH library?
    • By ryt
      I recently started to explore how operator new and malloc() really work. If I understood correctly they get implemented using linked-list or forward-list when an array is used. This is probably because free (dynamic, heap) memory gets allocated all over (within its bounds) the memory and so something like std::vector isn't used, something that has continuous allocation.
      If this is true than accessing such memory (through []) would not have access time of O(1) but some other, more complex.
      Is this true or I misplaced something?  
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!