Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

106 Neutral

About jamesl22

  • Rank
  1. jamesl22

    How to send data for an RTS?

    Ok great, that works fine and dandy. Now let's say I needed to send an array this time (ie an array of projectiles), is there a way I could send the whole array at once?
  2. jamesl22

    How to send data for an RTS?

    Thanks for the reply. My data comes through in the form "void*" and yours "char**" by the looks of it, how can I make your code work in that case?
  3. Hi, I'm making an RTS in C++ and I'm using enet for the multiplayer networking. I am currently sending each individual units' details in text format and I don't think this is the best option. So my question is this: how should I be sending data? Each unit is part of an array; can I send the whole array? And how would I decode that array at the other end? Thanks, James
  4. Hi, I am writing a simple 2D sidescroller in C++. I have AABB collision detection all working great. Unfortunately it's just a simple "two boxes intersecting, move back to where we were before". This means that there are no ramps and the player can get stuck on things if they hold down the arrow keys. What method would I use to stop this and to implement ramps etc. Preferably with examples please. I have tried the following: if (isColliding(object[0], object)) { BoundingBox test; test.x = prevX, test.y = currentY, test.width = object[0].width, test.height = object[0].height; if(!isColliding(test, object)) { currentX = prevX; return true; } else { currentY = prevY; return true; } } However, collisions on the Y axis work but only sometimes on the X. E.g one side of the square but not the other... Thanks, James
  5. Hi, When I get a collision with a bounding box, given the point of collision, size and position of the cube, what is the best way to find the colliding face and then return an array of vectors (the points of the face) in C++? Thanks, James
  6. jamesl22

    Best solution for camera to world collisions

    Is there a collision detection library that i can give a list of vertices, give it your position and have it return the plane normal? It needs to be in c or c++ and cross-platform.
  7. jamesl22

    Best solution for camera to world collisions

    Thanks for the reply. I was thinking of using a premade physics engine in my game. I was thinking of using tokamak (http://www.tokamakphysics.com/). I was going to make the camera a rigidbody and all of the cubes in my world animatedbodies. Would this work? How would I handle input from the user and give it to the physics engine?
  8. Hi, I'm making a very simple jumping game in C++ and OpenGL. It is in first person view and my whole world is made only of cubes of uniform size. I have all the graphics sorted but I now need to work on physics between you and the rest of the environment. My question is: what is the best solution for detecting and acting upon collisions between you and the world. I don't need a full blown physics engine as im not going to be using joints and such. Plus the only thing that will be moving is the camera. I really only need to handle gravity. Thanks, James
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!