Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 03 Aug 2008
Offline Last Active Jun 22 2015 09:11 AM

Topics I've Started

Continuous 3d Level what is the best way to handle it ?

21 June 2015 - 01:57 AM

Hello all

 this is not specific programming language question but more 3d label construction on some kind of endless game 
something like "temple run" , how do i create those Continuous  level so it will be optimize well for low end PC and mobiles 
what is the method that those game's uselly are using ? 
is it predefined huge levels that are pre loading into the level ?

or it is created on run time by level configuration code ?

Recommendation for web hosting , to start GameDev Blog

18 June 2015 - 12:19 AM

Hello all 
im searching for good web hosting solution to start GameDev Blog .

searching via google i read only horror story's about the standard web hosting solution .
so im asking here , can you recommend ?

Box2d joints still attached after Explosion simulation

10 May 2015 - 05:36 AM

I ported simple Box2d Explosion simulation the function is called once when there is some event with the "Truck Car"
the problem is that the Explosion working fine but it looks like when the explosion done the "parts" of the car Returning to 
the initial car position instead of bean scatter on the floor.
what am i doing wrong here ?
here is the code for the Explosion 
class MyQueryCallback : public b2QueryCallback {
std::vector<b2Body*> foundBodies;

bool ReportFixture(b2Fixture* fixture) {
return true;//keep going to find all fixtures in the query area
void BackgroundSprite::explode()
  float m_blastRadius = 40.0f;
float m_blastPower = 50.5f;
MyQueryCallback queryCallback;
b2Vec2 locationPnt = _truck->truckBody->GetPosition();
b2AABB aabb;
aabb.lowerBound.Set((locationPnt.x - m_blastRadius), (locationPnt.y - m_blastRadius));
aabb.upperBound.Set((locationPnt.x + m_blastRadius), (locationPnt.y + m_blastRadius));
m_world->QueryAABB(&queryCallback, aabb);

for (int i = 0; i < queryCallback.foundBodies.size(); i++) {
b2Body* pBody = queryCallback.foundBodies.at(i);
b2Vec2 pBodyPos = pBody->GetWorldCenter();
b2Vec2 pHitVector(pBodyPos.x - locationPnt.x, pBodyPos.y - locationPnt.y);
float radDist = pHitVector.Normalize();
radDist = (radDist * PTM_RATIO);
if ((pBody->GetType() == b2_dynamicBody) == (radDist <= m_blastRadius)){

float nHitForce = ((m_blastRadius - radDist) / m_blastRadius) * m_blastPower;
b2Vec2 appForce(pHitVector.x*nHitForce, pHitVector.y*nHitForce);
pBody->ApplyLinearImpulse(appForce, pBody->GetWorldCenter(),true);


What is the trick in box2d to build slalom track for car?

06 May 2015 - 06:39 AM

Hello all

im making simple car box2d game in part of the track i like to make it slalom , but if i using box2d b2EdgeShape for my track .
how can slalom can be be implemented without the car colliding 

this is the problematic slalom , how does it done in box2d

Box2d car accelerator doing wrong , car doesn't accelerate Right

04 May 2015 - 07:05 AM

i have simple car using box2d ( currently done in c++ but it really doesn't matter ).
any way when i try to make the car accelerate when right key is pressed 
the car moves very slowly and doesn't accelerate 
this is the function called from the main loop 
   void MonsterTruck::upArrowPressed (float dt)
      float acceleration = 280.0f;
      //frontMotor->SetMotorSpeed(280 * M_PI * -1);
      speed += acceleration*dt;
      frontMotor->SetMotorSpeed(speed *-1);
      // truckBody->ApplyTorque(280.0,true);
the speed value do rise up :
   MonsterTruck::upArrowPressed : speed:249.185455
    MonsterTruck::upArrowPressed : speed:251.992737
    MonsterTruck::upArrowPressed : speed:257.576508
    MonsterTruck::upArrowPressed : speed:263.172882
    MonsterTruck::upArrowPressed : speed:265.998932
    MonsterTruck::upArrowPressed : speed:271.586060
    MonsterTruck::upArrowPressed : speed:277.187744
    MonsterTruck::upArrowPressed : speed:279.983826
    MonsterTruck::upArrowPressed : speed:285.598389
    MonsterTruck::upArrowPressed : speed:291.187469
    MonsterTruck::upArrowPressed : speed:293.986359
    MonsterTruck::upArrowPressed : speed:299.573486
    MonsterTruck::upArrowPressed : speed:305.186096
    MonsterTruck::upArrowPressed : speed:307.961182
    MonsterTruck::upArrowPressed : speed:313.589447
    MonsterTruck::upArrowPressed : speed:319.181335
    MonsterTruck::upArrowPressed : speed:321.974060
    MonsterTruck::upArrowPressed : speed:327.586945
    MonsterTruck::upArrowPressed : speed:333.176025
    MonsterTruck::upArrowPressed : speed:335.967896
but the car move slowly