babkamen

Members
  • Content count

    3
  • Joined

  • Last visited

About babkamen

  • Rank
    Newbie

Recent Profile Visitors

227 profile views
  1. Drag racing fps issue

    Thank you b10b for your answer. Yes you are right, I didn't think about that as compound interest formula. Thank you for suggestion on possible solutions: 1) I totally Inderstund.And as I have seen Phaser doesn't have mechanism to set FPS. 2) In worst case if there is 30 fps(mobile devices)- 33ms, 2 frames -66ms(Maybe other number better choice for most of cases). I think this is the best possible solution. And again thank you for advice=) 3) I think I don't understand you on this case. Eg if I have formula speed+=a*dt it means for(int i=0;i<dt*1000;i++){speed+=a*0.001;} But I know that I am wrong and this doesn't make difference. For everyone that having same issue: http://gafferongames.com/game-physics/fix-your-timestep/
  2. Drag racing fps issue

    We are making drag racing game. I need to make race time stay the same if parameters(car characteristics, road length and air density) stay the same. So what's the problem? When fps is 60 race time is always the same. But when fps is lower than 60 race time is always bigger. You can pay it here http://propshaft.bitballoon.com/ - program automatically shifts gear on red line. Relevant code from update function: now = this.game.time.now;//convert spped from km/h to m/sspeedInMS = this.speed / 3.6;//calculate drag,rolling and net forces drag = this.dragCoef * this.frontalArea * this.airDensity * speedInMS * speedInMS / 2;rollingResistance = -this.rollingResistanceCoefficient * speedInMS;f = (this.getTorqueByRPM(rpm) * this.finalDriveRatio * this.getCurrentGearRatio()) / this.tireRadius - drag - rollingResistance;//if gear shift f=0if (this.isShiftingGear) { if (now - this.startGearShiftTime <= this.gearChangeDelay) { f = 0; } else { this.isShiftingGear = false; this.startGearShiftTime = undefined; }}//calculate accelerationvar a = f / this.mass * 2.2;//calculate speed this.speed += a * (now - this.oldTime) / 1000;//calculate rpm this.rpm = this.speed * 60 * this.finalDriveRatio * this.getCurrentGearRatio() / 2 / Math.PI / 3.6 / this.tireRadius;//calculate distancethis.distanceTraveled += this.speed * (now - this.oldTime) / 1000 / 60 / 60; Two points:- From one side program timer label gets time from game.time.totalElapsedSeconds(). Program restarts game timer when countdown finishes(game.time.reset); - From other side program increments speed based on delta time and distance based on delta time. This is two places that are affected by fps. So the question are: 1) What is the cause of problem? If I am right lower fps means less acuracy in calculations 2) What are the possible solutions to this(will apreciate links to material that describes your point)?
  3. MightyEditor Challenge!

    Is it possible to do such game -http://coolmath-games.com/0-cloudy/index.html in a month using MightyEditor and Phaser? Because friend says that this kind of game can be done in flash in a week. So I want to argue with him but I am new to HTML5, Phaser and MightyEditor. Thanks for help, Roman