Car simulator initial plan.
Sharon Xiao Liu.
2024/03/19.
Contents.
1. General plan.
2. First version of the simulator.
3. Possible JavaScript functions required.
4. Mathematical equations.
General plan.
• The car simulator, will be programmed in JavaScript.
• It will have a windscreen view, side window views, and rear window view.
• It will have mirror views:
oSide mirror views.
oWindscreen mirror view.
• It will have indicator light switches.
• It will have a gearstick, steering wheel, and foot pedals.
• It can be turn-based, like an Interactive Fiction game. Or, it can be played at
different speeds. It could respond to a script, which programs the drive.
• The purpose of this simulator, is to teach people how to drive. (You can make
one, too.)
Features of the first version of the simulator.
• There is going to be, a road with a left turn.
• There is going to be a turn-based simulation.
• There will be a bird's eye view, of the road
with the left turn.
• There will be a clutch pedal, gearstick and
steering wheel.
• The car is going to go along in units, along the
road, and it is going to be steered.
• The simulator will crash, if you get an
instruction wrong.
Possible JavaScript functions (or web
programming functions) required.
• Use Scalable Vector Graphics, with JavaScript, for
the bird's eye view.
o Draw a rectangle, with <rect>.
o Use the rotate() and translate()
transformations, with <rect>.
o Use document.getElementById() , to
access SVG tags.
o Use .setAttribute() method, to change the
SVG tags.
• With a turn-based simulation, there is no need
to smoothly animate, the path of the car.
• Use a HTML form, for the car controls.
o The clutch pedal is a toggle button.
o The gearstick is a form control, which has a
dropdown menu.
o The steering wheel has a 12:1 steering ratio.
(Wikipedia says, this is a common ratio.)
• The car wheel turn, is inputted, and the
steering wheel angle, is calculated.
• Dashboard.
o The speed of the car, is displayed. (This affects
the translations.)
Equations, for the first version of the car
simulator.
• Speed = distance/time.
• Steering wheel angle = 12*car
wheel angle.

20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.

  • 1.
    Car simulator initialplan. Sharon Xiao Liu. 2024/03/19.
  • 2.
    Contents. 1. General plan. 2.First version of the simulator. 3. Possible JavaScript functions required. 4. Mathematical equations.
  • 3.
    General plan. • Thecar simulator, will be programmed in JavaScript. • It will have a windscreen view, side window views, and rear window view. • It will have mirror views: oSide mirror views. oWindscreen mirror view. • It will have indicator light switches. • It will have a gearstick, steering wheel, and foot pedals. • It can be turn-based, like an Interactive Fiction game. Or, it can be played at different speeds. It could respond to a script, which programs the drive. • The purpose of this simulator, is to teach people how to drive. (You can make one, too.)
  • 4.
    Features of thefirst version of the simulator. • There is going to be, a road with a left turn. • There is going to be a turn-based simulation. • There will be a bird's eye view, of the road with the left turn. • There will be a clutch pedal, gearstick and steering wheel. • The car is going to go along in units, along the road, and it is going to be steered. • The simulator will crash, if you get an instruction wrong.
  • 5.
    Possible JavaScript functions(or web programming functions) required. • Use Scalable Vector Graphics, with JavaScript, for the bird's eye view. o Draw a rectangle, with <rect>. o Use the rotate() and translate() transformations, with <rect>. o Use document.getElementById() , to access SVG tags. o Use .setAttribute() method, to change the SVG tags. • With a turn-based simulation, there is no need to smoothly animate, the path of the car. • Use a HTML form, for the car controls. o The clutch pedal is a toggle button. o The gearstick is a form control, which has a dropdown menu. o The steering wheel has a 12:1 steering ratio. (Wikipedia says, this is a common ratio.) • The car wheel turn, is inputted, and the steering wheel angle, is calculated. • Dashboard. o The speed of the car, is displayed. (This affects the translations.)
  • 6.
    Equations, for thefirst version of the car simulator. • Speed = distance/time. • Steering wheel angle = 12*car wheel angle.