Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine building tutorial #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# WIP

## 01 - single cylinder engine

#### Intoduction

In this tutorial you will learn how to make a simple single cylinder engine completly from scratch.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*completely


When you're actually making engines, it's generally preferable to simply modify other engines (LTSP created by Archangel Motors is a good example of engine templates made to be modified by users), however I belive it's important to understand the syntax of Piranha to be decent at making ES engines. Due to that this tutorial will cover every step necessary to get a simple 1 cylinder engine running in Engine Simulator.

In further tutorials you'll learn how to add other fetures, such as more cylinders, the vehicle model, and much more.

#### Creating the file

Engine Simulator engines are saved in a special file with the extention of .mr. We need to have that file to actually have a place to write code in, so let's make one.

Firstly you need to be able to edit file extentions, for that we need to see these extentions, so let's enable that.

In file explorer go into the view tab:

![alt text](assets/file_explorer_file_extentions.png)

In that tab you want to make sure "File name extentions" is checked

![](assets/file_explorer_checkboxes.png)

Once you have that, you want to create a text file by right clicking in the destination folder, and navigating to new -> text document

Then right click on the file, click rename, and change the last three letters (.txt) to .mr

#### Getting an editor

Now that we have the file, we need to be able to edit it. Technically it's possible to edit .mr files in the Windows notepad, however it's preferable to use an actual editor. Visual Studio Code is recomended, as it has syntax highlight for Piranha.

To install VS Code, you'll want to download the installer from [this webside](https://code.visualstudio.com/)

Once you have that installed, you also want to download the Piranha extention from [here](https://marketplace.visualstudio.com/items?itemName=EktoromSoftwareInc.piranha-extension)
149 changes: 0 additions & 149 deletions tutorial/03_building_engines/03_building_engines.md

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.