- Car Forums, Automotive News and Community
Home Gallery Register Calendar Members List

Go Back - Car Forums, Automotive News and Community > General Car Discussion > General Automotive Discussion

LinkBack Thread Tools
Unread 01-08-2016, 03:53 PM   #1
New Member
Join Date: Jan 2016
Posts: 1
Rep: 10 Zarkopafilis is on a distinguished road
Lightbulb Simplified calculations for a game

Hey guys!

So I am trying to enhance the game I am making (I'm a programmer! ).
by adding some extra mechanics to the vehicles, especially the simple cars.
I do drive by the way and have some understanding of how the internals work (I sometimes revmatch).

First part would be to enhance the current game by adding some turbo , nitrous and automatic transmissions (correctly).

This is not real-life calculations though, I am trying to come up with a simpler model that neither needs many resources nor is too complex to implement.

Here's what I am thinking to do: Calculate how much power does the engine provide with parameters: current gear,(in some kind of unit - nevermind that), boosts from turbo , vtec , nitrous (im a multiplier function that stacks). Then , calculate the RPMs that the engine is already running on based on gear and current speed (with a minimum RPM of 700-1000?). After these 2 steps , calculate new RPMs based on ΔS (seconds passed since the last frame).

After this calculative algorithm , gear changing (provide some multiplier as well - shifting will be instant on the first place) , rev limiter and sound logic takes place.

This way seems correct and straightforward and rather simple-to-implement to me.

I would like to ask you if this would be a proper way of calculating these stuff (no losses or other complex physics stuff). Also , I would like you to tell me what could be improved.

Upon getting some answers, I will update this post in order to ask/add more stuff as well as post updates on the project! Thank you very much in advance!

Zarkopafilis is offline  
Reply With Quote
Unread 01-12-2016, 02:32 PM   #2
Jack of all Trades
tofunater's Avatar
Join Date: Feb 2010
Location: Batavia, IL
Posts: 1,398
Rep: 77 tofunater will become famous soon enough

Basic guidelines would be to add hp at specific time intervals based upon the throttle position. It would really depend on the sophistication of the current game though and what you are trying to accomplish. A mobile game vs web vs pc will all have very different expectations.
My rides:
--2012 Chevy Sonic LT hatch back w/1.4 liter turbo w/100k
--2005 Chrysler Pacifica w/175k - SOLD!
--1987 Chevy R10 Pickup w/80k
--1997 4.3L Chevy Blazer w/193k- SOLD!
--1998 Oldsmobile Aurora w/190k - SOLD!

tofunater is offline tofunater's Gallery  
Reply With Quote

calculations, engine, math, turbo, vtec

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -5. The time now is 05:17 PM.

Shogun Interactive Development Copyright 2015 Shogun Interactive Development. All rights reserved.