-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquickstart.html
More file actions
133 lines (104 loc) · 6.18 KB
/
Copy pathquickstart.html
File metadata and controls
133 lines (104 loc) · 6.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="styleSyntax.css">
<link rel="stylesheet" href="styleRainbow.css">
<link rel="icon" href="cassete.png">
<title>Breez documentation</title>
<body>
<div id="mainMenu">
<div id="mainMenuButton">
<a href="index.html" style="text-decoration: none;">
<div id="mainMenuButtonText">
<span style="color: #e0e0e0da;">Breez<span class="blinkingLine">_</span></span>
</div>
</a>
<div id="mainMenuSearch">
<form name="searchContent">
<input type="text" id="mainMenuSearchText" style="
background-color: #15110e;
outline: none;
border-color: transparent;
-webkit-box-shadow: none;
box-shadow: none;
font-size: 1.5em;
color: #e0e0e0da;
font-family: 'Source Code Pro', monospace;
display: flex;
justify-content: center;
align-items: center;
overflow: auto;
white-space: nowrap;">
</form>
</div>
<button id="DarkLightSwitch"><img src="darklightSwitch.png" width="22" height="22"></button>
<script type="text/javascript">
// Taken from https://www.pullrequest.com/blog/how-to-implement-dark-mode-with-css-js/#the-switch
// Wait for document to load
document.addEventListener("DOMContentLoaded", function(event) {
document.documentElement.setAttribute("data-theme", "light");
// Get our button switcher
var themeSwitcher = document.getElementById("DarkLightSwitch");
// When our button gets clicked
themeSwitcher.onclick = function() {
// Get the current selected theme, on the first run
// it should be `light`
var currentTheme = document.documentElement.getAttribute("data-theme");
// Switch between `dark` and `light`
var switchToTheme = currentTheme === "dark" ? "light" : "dark";
// Set our currenet theme to the new one
document.documentElement.setAttribute("data-theme", switchToTheme);
}
});
</script>
</div>
<div id="mainMenuFileList"><pre>
<a href="index.html" style="text-decoration: none;">Home</a>
<a href="quickstart.html" style="text-decoration: none;">Quickstart guide</a>
</pre></div>
</div>
<div id="mainText">
<h1><p>Quickstart guide</p></h1>
<p>Welcome to the Breez quickstart guide, this guide is aimed to get new users familiar with the basic concepts of Breez
Continue down below to get started.</p>
<h1><p>What Is Breez Anyway?</p></h1>
<p>Breez is a compiler / transpiler for the Kerbal Space Program mod called kOS. It is used for programming various things like rockets, planes and more.
Since kOS is somewhat overly verbose (as it's meant for newer programmers) we decided to create a much more compact and true to life language.</p>
<p>You can do a lot in Breez, and our current list of "Tokens" is always growing to cover everything in the kOS language.</p>
<b><p>If you haven't already, please visit the <a href="download.html">Download and installation</a> guide</p></b>
<h1><p>First Breez Program</p></h1>
<p>Your first program in a language you've never used is usually a <i>"Hello World"</i> program, however we're going to make a countdown script (because we're talking about rockets science).</p>
<p>To get started, open up a text editor and feel free to follow along.</p>
<div class="code"><pre><p>
<span class="keyword">global</span> unusedVariable <span class="STR_LIT_DEC">=></span> <span class="number">1</span>;
<span class="keyword">for local</span> terminalCount <span class="STR_LIT_DEC">=></span> <span class="number">10</span>, terminalCount != <span class="number">0</span>, --terminalCount {
<span class="comment"># until the variable = 0, take away 1 each time the loop finishes.</span>
<span class="builtInFunction">clear</span>(); <span class="comment"># This clears the terminal each time, so you dont have a list of numbers.</span>
<span class="builtInFunction">print</span>(terminalCount) <span class="comment"># This outputs the variable onto your terminal so you can see how close you are to T-0.</span>
<span class="builtInFunction">hold</span>(<span class="number">1</span>); <span class="comment"># Similar to how we use Wait in kOS, this waits 1 second.</span>
};
</p></pre></div>
<p>Now, try to compile the code above with <span class="codeInline"> breez <Filename>.briz </span> (or if you have installed Breez manually, run <span class="codeInline"> python3 Yamal.py <Filename>.briz </span>), and then run it in your game, and then come back to the guide!
What are your results, did you get the annoying error sound? Good.</p>
<p>As you can probably tell, we have missed a semicolon (which is a common mistake amongst programmers) so always check your code for bugs!
To fix it, just simply put a semicolon at the end of line 5, now try again!</p>
<p>Now, you should see something like this (don't be scared if your output isn't colored, Windows just doesn't support ANSI color codes):</p>
<img src="YamalOutput.png" width="542" height="80">
<p>You also probably see a warning that says that variable <span class="codeInline"> unusedVariable </span> isn't used, it's completely normal and will also show up
if you have an unused functions. This was implemented to minimize space taken up by the program on kOS CPU<p>
</div>
<!--This section is responsible for the rainbow lines that you see in the background-->
<div class="redR"></div>
<div class="orangeR"></div>
<div class="yellowR"></div>
<div class="greenR"></div>
<div class="blueR"></div>
<div class="redL"></div>
<div class="orangeL"></div>
<div class="yellowL"></div>
<div class="greenL"></div>
<div class="blueL"></div>
</body>
</head>
</html>