-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetting_started.html
More file actions
54 lines (44 loc) · 1.21 KB
/
getting_started.html
File metadata and controls
54 lines (44 loc) · 1.21 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Getting Started - PyLove2D</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body>
<header>
<h1>Getting Started</h1>
</header>
<nav>
<a href="index.html">Home</a>
<a href="getting_started.html">Getting Started</a>
<a href="api.html">API Reference</a>
<a href="examples.html">Examples</a>
</nav>
<main>
<h2>Step 1: Install PyLove2D</h2>
<pre><code>pip install pygame pylove2d</code></pre>
<p>Make sure you have Python 3.10+ installed.</p>
<h2>Step 2: Create a basic game</h2>
<pre><code>import pylove2d as love
def load():
love.window.set_title('Hello PyLove2D!')
def update(dt):
pass
def draw(g):
g.clear(0.1, 0.1, 0.2)
g.set_color(1, 1, 1)
g.print('Hello, World!', 200, 200)
if __name__ == '__main__':
love.run(width=800, height=480)</code></pre>
<h2>Step 3: Run your game</h2>
<p>Save your file as <code>mygame.py</code> and run:</p>
<pre><code>python mygame.py</code></pre>
<h2>Step 4: Explore more</h2>
<p>Check the <a href="api.html">API reference</a> and <a href="examples.html">examples</a> to learn about graphics, audio, input, and more.</p>
</main>
<footer>
© 2025 PyLove2D
</footer>
</body>
</html>