Skip to content

Commit e1c0694

Browse files
committed
Fix formatting in README
1 parent 210c98c commit e1c0694

File tree

1 file changed

+20
-50
lines changed

1 file changed

+20
-50
lines changed

README.md

Lines changed: 20 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ They resemble games from 8-bit and 16-bit computers, because:
3535

3636
## Why Pi?
3737

38-
Because it's probably the easiest and most fun way to write a game in Go.
39-
No complex engine setup. No boilerplate. Just write code and see things happen.
40-
Perfect for small projects, prototypes, jams — or simply to have fun.
38+
Because it's probably the easiest and most fun way to write a game in Go. No complex engine setup. No boilerplate. Just write code and see things happen. Perfect for small projects, prototypes, jams — or simply to have fun.
4139

4240
## How to get started?
4341

@@ -112,59 +110,44 @@ func main() {
112110
}
113111
````
114112
115-
When Pi opens a window for your game, it automatically adjusts the window size to match your monitor's resolution.
116-
Since modern monitors have much higher resolutions (e.g. 1920×1080 or even 3840×2160), Pi needs to scale up the game screen.
117-
Each game pixel is multiplied an integer number of times (integer scaling).
118-
This ensures that the game screen always stays true to its original pixel-perfect look without any distortion.
113+
When Pi opens a window for your game, it automatically adjusts the window size to match your monitor's resolution. Since modern monitors have much higher resolutions (e.g. 1920×1080 or even 3840×2160), Pi needs to scale up the game screen. Each game pixel is multiplied an integer number of times (integer scaling). This ensures that the game screen always stays true to its original pixel-perfect look without any distortion.
119114
120115
---
121116
122117
### Game screen
123118
124-
Pi gives you a small, low-resolution pixel canvas to draw on.
125-
It's like an old-school screen: you can set pixels, draw lines, rectangles, sprites, and text.
126-
The limited resolution encourages you to focus on clear shapes and designs.
119+
Pi gives you a small, low-resolution pixel canvas to draw on. It's like an old-school screen: you can set pixels, draw lines, rectangles, sprites, and text. The limited resolution encourages you to focus on clear shapes and designs.
127120
128-
Each pixel on the game screen has (x, y) coordinates and a `pi.Color`.
129-
`pi.Color` is a number from 0 to 63, letting you use up to 64 colors on screen at once.
130-
Coordinate (0,0) is the top-left corner of the screen.
121+
Each pixel on the game screen has (x, y) coordinates and a `pi.Color`. `pi.Color` is a number from 0 to 63, letting you use up to 64 colors on screen at once. Coordinate (0,0) is the top-left corner of the screen.
131122
132-
Pi does not impose any fixed screen size — you can choose resolutions like 128×128 or 320×180.
133-
However, there's a limit on the total number of pixels: 128 KB (131,072 pixels).
134-
It's recommended to start with a low resolution for your first game, such as 128×128.
123+
Pi does not impose any fixed screen size — you can choose resolutions like 128×128 or 320×180. However, there's a limit on the total number of pixels: 128 KB (131,072 pixels). It's recommended to start with a low resolution for your first game, such as 128×128.
135124
136125
---
137126
138127
### Color palette
139128
140-
Pi uses a game-defined, configurable `pi.Palette` which maps each `pi.Color` to an RGB value.
141-
For example, by default color 0 is black (0x000000), and color 7 is white (0xFFF1E8).
129+
Pi uses a game-defined, configurable `pi.Palette` which maps each `pi.Color` to an RGB value. For example, by default color 0 is black (0x000000), and color 7 is white (0xFFF1E8).
142130
143-
You choose your game's palette, but you're limited to 64 colors.
144-
That may seem small, but for low-resolution pixel-art it's usually plenty.
131+
You choose your game's palette, but you're limited to 64 colors. That may seem small, but for low-resolution pixel-art it's usually plenty.
145132
The palette can be changed during the game, but changes will appear only when rendering the frame at the end of the update cycle.
146133
147134
---
148135
149136
### Canvas, sprites, and blitting
150137
151-
`pi.Canvas` is a 2D structure storing color values. The game screen itself is a Canvas.
152-
Your game can not only draw pixels on a Canvas but also read them back.
138+
`pi.Canvas` is a 2D structure storing color values. The game screen itself is a Canvas. Your game can not only draw pixels on a Canvas but also read them back.
153139
154140
This makes it possible to copy pixels from one Canvas to another — for example, you can load a PNG file into a Canvas and then copy (blit) parts of it onto the game screen.
155141
156-
These source images (PNG files with your art) are typically called **sprite sheets**.
157-
Pi can decode them into Canvases and help you define sprites that you then blit onto the screen.
142+
These source images (PNG files with your art) are typically called **sprite sheets**. Pi can decode them into Canvases and help you define sprites that you then blit onto the screen.
158143
159144
---
160145
161146
### Keyboard, mouse, and gamepad input
162147
163-
Pi lets you check the state of buttons on various input devices.
164-
To make sure games work across different hardware, Pi defines a subset of buttons that exist on most modern keyboards, mice, and gamepads.
148+
Pi lets you check the state of buttons on various input devices. To make sure games work across different hardware, Pi defines a subset of buttons that exist on most modern keyboards, mice, and gamepads.
165149
166-
Pi also tries to offer only the kinds of input that were typical in the 16-bit era.
167-
For example, mice had just two buttons, and gamepads had only simple digital (on/off) buttons — no analog sticks or triggers.
150+
Pi also tries to offer only the kinds of input that were typical in the 16-bit era. For example, mice had just two buttons, and gamepads had only simple digital (on/off) buttons — no analog sticks or triggers.
168151
169152
For handling input devices, you can use these packages: [pikey](pikey), [pimouse](pimouse), and [pipad](pipad).
170153
@@ -186,8 +169,7 @@ Pi intentionally limits:
186169
* resolution
187170
* color palette
188171
189-
These constraints force you to be creative and keep things simple.
190-
It's easier to finish a game when you don't try to do everything at once.
172+
These constraints force you to be creative and keep things simple. It's easier to finish a game when you don't try to do everything at once.
191173
The goal is to have fun, not get lost in complexity!
192174
193175
## FAQ
@@ -197,9 +179,7 @@ The goal is to have fun, not get lost in complexity!
197179
Yes — the core functionality is implemented and ready to use.
198180
Currently, the focus is on developer tools like [piscope](piscope).
199181
200-
Note: Pi does not yet include built-in APIs for sound effects or music playback.
201-
However, you can use [Ebitengine's audio API][ebitengine-audio] to play OGG or MP3 files,
202-
or the external Go module [quasilyte/xm][quasilyte-xm] to play XM tracker files.
182+
Note: Pi does not yet include built-in APIs for sound effects or music playback. However, you can use [Ebitengine's audio API][ebitengine-audio] to play OGG or MP3 files, or the external Go module [quasilyte/xm][quasilyte-xm] to play XM tracker files.
203183
204184
### What similarities does Pi have with Pico-8 on the API level?
205185
@@ -209,24 +189,19 @@ or the external Go module [quasilyte/xm][quasilyte-xm] to play XM tracker files.
209189
210190
### Can I use Pi in a game that already uses Ebitengine?
211191
212-
Yes! You can use the [piebiten](piebiten) package to integrate Pi with your existing Ebitengine project.
213-
For example, you can copy pixel data from `pi.Canvas` into an `ebiten.Image`.
192+
Yes! You can use the [piebiten](piebiten) package to integrate Pi with your existing Ebitengine project. For example, you can copy pixel data from `pi.Canvas` into an `ebiten.Image`.
214193
215194
### What platforms do Pi games run on?
216195
217-
Pi runs on all platforms supported by Ebitengine.
218-
However, it is currently tested only on Windows, Linux, and web browsers.
196+
Pi runs on all platforms supported by Ebitengine. However, it is currently tested only on Windows, Linux, and web browsers.
219197
220198
### Can I write my own backend for Pi instead of Ebitengine?
221199
222-
Yes! You can create a specialized backend that runs on unusual devices or is optimized for a specific architecture.
223-
For example, there's [piweb][piweb] — an experimental backend for web browsers.
224-
Its goal is to cut the size of the generated WASM program roughly in half, which can be important for small browser-based games.
200+
Yes! You can create a specialized backend that runs on unusual devices or is optimized for a specific architecture. For example, there's [piweb][piweb] — an experimental backend for web browsers. Its goal is to cut the size of the generated WASM program roughly in half, which can be important for small browser-based games.
225201
226202
### How can I contribute to Pi's development?
227203
228-
The best way to help Pi grow is by creating your own packages that add new or improved features.
229-
Pi is designed so that anyone can extend it without needing to contribute code directly to the main Pi repository.
204+
The best way to help Pi grow is by creating your own packages that add new or improved features. Pi is designed so that anyone can extend it without needing to contribute code directly to the main Pi repository.
230205
Examples of useful packages include:
231206
232207
* developer tools that other programmers can run directly in their games
@@ -238,22 +213,17 @@ Examples of useful packages include:
238213
239214
First of all, you'll need a good Go editor. I recommend GoLand (paid) or Visual Studio Code.
240215
241-
For creating sprites, I highly recommend [Aseprite][aseprite] — probably the best pixel-art editor ever made.
242-
It has tons of features, scripting support, and can export images with metadata.
243-
In general, try to use the same color indices in your graphics program and in your game code.
244-
It really simplifies game development. Aseprite is one of the tools that supports editing images with indexed colors.
216+
For creating sprites, I highly recommend [Aseprite][aseprite] — probably the best pixel-art editor ever made. It has tons of features, scripting support, and can export images with metadata. In general, try to use the same color indices in your graphics program and in your game code. It really simplifies game development. Aseprite is one of the tools that supports editing images with indexed colors.
245217
246218
For creating tile maps, I recommend [Tiled][tiled].
247219
248220
### How can I persist game state or settings?
249221
250-
Pi itself doesn't include built-in save/load APIs.
251-
To store your game's progress or settings, you can use the external Go module [quasilyte/gdata][quasilyte-gdata].
222+
Pi itself doesn't include built-in save/load APIs. To store your game's progress or settings, you can use the external Go module [quasilyte/gdata][quasilyte-gdata].
252223
253224
### I have more questions or found a bug. Where can I ask?
254225
255-
Please open an [Issue][issues] or start a [Discussion][discussions] on GitHub.
256-
Questions, ideas, bug reports, and contributions are all welcome!
226+
Please open an [Issue][issues] or start a [Discussion][discussions] on GitHub. Questions, ideas, bug reports, and contributions are all welcome!
257227
258228
## Attributions
259229

0 commit comments

Comments
 (0)