You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/python/2021/part-0.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
---
2
+
toc: true
2
3
---
3
4
4
5
# Part 0 - Setting Up
5
6
6
-
####Prior knowledge
7
+
## Prior knowledge
7
8
8
9
This tutorial assumes some basic familiarity with programming in general, and with Python.
9
10
If you've never used Python before, this tutorial could be a little confusing. There are many free resources online about learning programming and Python, and I'd recommend learning about objects and functions in Python at the very least before attempting to read this tutorial.
@@ -14,7 +15,7 @@ The Python documentation [includes a good tutorial to get started with Python](h
14
15
You should keep track of the [Python Documentation](https://docs.python.org/3/), the [NumPy Documentation](https://numpy.org/doc/stable/), and the [python-tcod Documentation](https://python-tcod.readthedocs.io/en/latest/).
15
16
External references to these will be made throughout the tutorial as they become relevant.
16
17
17
-
####Installation
18
+
## Installation
18
19
19
20
To do this tutorial, you'll need Python version 3.8 or higher.
20
21
The latest version of Python is recommended (currently 3.9 as of June 2021).
@@ -49,15 +50,15 @@ For example, Ubuntu can install it with the following command:
49
50
50
51
`sudo apt-get install libsdl2-dev`
51
52
52
-
####Editors
53
+
## Editors
53
54
54
55
Any text editor can work for writing Python.
55
56
You could even use Notepad if you really wanted to.
56
57
Personally, I'm a fan of [Pycharm](https://www.jetbrains.com/pycharm/) and [Visual Studio Code](https://code.visualstudio.com/).
57
58
Whatever you choose, I strongly recommend something that can help catch Python syntax errors at the very least.
58
59
I've been working with Python for over five years, and I still make these types of mistakes all the time\!
59
60
60
-
####Making sure Python works
61
+
## Making sure Python works
61
62
62
63
To verify that your installation of both Python 3 and TCOD are working, create a new file (in whatever directory you plan on using for the tutorial) called `main.py`, and enter the following text into it:
63
64
@@ -80,7 +81,7 @@ Run the file in your terminal (or alternatively in your editor, if possible):
80
81
81
82
You should see "Hello World\!" printed out to the terminal. If you receive an error, there is probably an issue with either your Python or TCOD installation.
82
83
83
-
###Downloading the Image File
84
+
## Downloading the Image File
84
85
85
86
For this tutorial, we'll need an image file. The default one is provided below.
86
87
@@ -89,13 +90,13 @@ For this tutorial, we'll need an image file. The default one is provided below.
89
90
Right click the image and save it to `/data/dejavu16x16_gs_tc.png` in your project directory.
90
91
Other options for fonts [are available here](https://github.com/libtcod/libtcod/tree/master/data/fonts), but you'll need a font ending in `_tc.png` for this tutorial.
91
92
92
-
###Getting help
93
+
## Getting help
93
94
94
95
Be sure to check out the [Roguelike Development Subreddit](https://www.reddit.com/r/roguelikedev) for help.
95
96
There's a link there to the Discord channel as well.
96
97
97
98
-----
98
99
99
-
###Ready to go?
100
+
## Ready to go?
100
101
101
102
Once you're set up and ready to go, you can proceed to [Part 1](part-1).
0 commit comments