-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hexterminal
committed
Dec 3, 2024
1 parent
78fdab9
commit b681f27
Showing
3 changed files
with
96 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Python - 0</title> | ||
</head> | ||
<body> | ||
<h1>Lesson 0 of BGE Python</h1> | ||
<h3>Intro</h3> | ||
<p> | ||
We'll look at how else you can code with Range Engine/UPBGE. | ||
</p> | ||
<!-- <h5>Things to know before learning the API</h5> | ||
<ul> | ||
<li>Grasping the basics of python properly will improve your workflow speed.</li> | ||
<li>You can't do 100% python, ex. you need logic bricks to setup python.</li> | ||
<li>You can not learn this within a day, it takes a lot of practice.</li> | ||
</ul> --> | ||
<!-- <figure> | ||
<video src="../../img/xd.mp4" controls preload="none"></video> | ||
<img src="../../img/pls-wait.png" loading="lazy"> | ||
<figcaption>some video goes here bro</figcaption> | ||
</figure> --> | ||
<h3>Setup</h3> | ||
<h5>Ways to setup to code in python and GLSL</h5> | ||
<ul> | ||
<li>Using built-in text editor.</li> | ||
<li>Using an external text editor or an IDE.</li> | ||
</ul> | ||
<h5>Using built-in text editor</h5> | ||
<p> | ||
Open up the engine, create a new panel by dragging or switch the editor type by clicking | ||
on the editor type and clicking <b>Text Editor</b> or just press | ||
<span class="mono">Shift</span> + <span class="mono">F11</span>. | ||
Create a new text file by clicking on | ||
the "+" icon or hover your mouse on the text editor and press | ||
<span class="mono">Ctrl</span> + <span class="mono">N</span>.<br> | ||
That is where you starting writing your python code. | ||
</p> | ||
<p>Pros</p> | ||
<ul class="prosncons"> | ||
<li>Faster way to write code.</li> | ||
</ul> | ||
<p>Cons</p> | ||
<ul class="prosncons"> | ||
<li>Undoing your code globaly undoes the whole blender workflow, resulting in a crash.</li> | ||
<li> | ||
Autocompletes with exisiting keywords in your code, shows up only after writing | ||
some lines of code. | ||
</li> | ||
</ul> | ||
<h5>Using an external text editor or an IDE</h5> | ||
<p> | ||
Open up notepad, <a href="https://vscodium.com/" target="_blank">vscodium</a> | ||
(vscode if don't care about privacy), sublime-text or any other text editor or | ||
an IDE, create a new <span class="mono" title="A blank Python file">.py</span> file | ||
and save it. Open up the engine and open up the text editor, click on the | ||
folder icon and open the file which you saved using the text editor. | ||
Or you can do that with logic brick without opening your text file just | ||
by specifying your code name and module name. | ||
</p> | ||
<p>Pros</p> | ||
<ul class="prosncons"> | ||
<li> | ||
Auto-complete is available in almost every code editors. | ||
<p> | ||
For vscode and vscodium, | ||
<a href="https://marketplace.visualstudio.com/items?itemName=RangeEngine.range-engine-api">Range API autocomplete</a> | ||
is available allowing users to write code faster. | ||
</p> | ||
</li> | ||
<li> | ||
Undoing doesn't crash and text editor manages it in a smarter way. | ||
</li> | ||
</ul> | ||
<p>Cons</p> | ||
<ul class="prosncons"> | ||
<li> | ||
Opening a text file, saving it and switiing between the engine can be sligtly time consuming. | ||
</li> | ||
</ul> | ||
<script src="../../code/highlight.min.js"></script> | ||
<script>hljs.highlightAll();</script> | ||
<script type="text/javascript" src="../../code/syntax.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters