The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5308 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5308 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1429 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Forums
2D simple car game using VDrift physics engine - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3)
+--- Forum: Help (https://www.vdrift.net/Forum/forumdisplay.php?fid=5)
+--- Thread: 2D simple car game using VDrift physics engine (/showthread.php?tid=1740)



2D simple car game using VDrift physics engine - mike_p - 09-01-2013

Hi guys,

I hope I will not offend anyone here, but I have a question that is not about Vdrift itself, but somehow related it. I am working on a personal open source project trying to create a small 2D car game (viewed from lateral). I want the car to act like a real car: processing the gas, brake and clutch inputs from the user, change gears up/down, maintain speed due to inertia of the car even though throttle is no longer applied, slowing down when going over hills or speeding up when going over valleys, slowing down due to friction and air resistance. The output that I need is the wheel speed so I can move the car. I make some assumptions that simplify a lot the physics engine: the wheel cannot slip, there is no differential (as there is only one driven wheel, not 2), there is no suspension, there is no tire and rim, just a wheel with the needed properties (radius, mass, inertia). The program is written in C and developped using Visual C++. I have managed to port the code put in the engine, clutch, brake, transmission and driveshaft files because this is code working with scalars and it’s easy to understand. Can someone help me with porting the code in car and cardynamics ? It needs to be cleared from all the parts that I don’t need and I suppose that all the vectors should be transformed into scalars.

Thank you for any thought you might want to share with me,
Mike