mirror of
https://github.com/Kapendev/parin.git
synced 2025-04-26 13:09:56 +03:00
Name change.
This commit is contained in:
parent
3fa7910905
commit
7e510e6367
13 changed files with 24 additions and 24 deletions
24
README.md
24
README.md
|
@ -1,10 +1,10 @@
|
||||||
# Popka
|
# Parin
|
||||||
|
|
||||||
Popka is a lightweight and beginner-friendly 2D game engine for the D programming language.
|
Parin is a lightweight and beginner-friendly 2D game engine for the D programming language.
|
||||||
It focuses on providing a simple foundation for building 2D games.
|
It focuses on providing a simple foundation for building 2D games.
|
||||||
|
|
||||||
```d
|
```d
|
||||||
import popka;
|
import parin;
|
||||||
|
|
||||||
void ready() {
|
void ready() {
|
||||||
lockResolution(320, 180);
|
lockResolution(320, 180);
|
||||||
|
@ -28,7 +28,7 @@ mixin runGame!(ready, update, finish);
|
||||||
* PC: Windows, Linux, macOS
|
* PC: Windows, Linux, macOS
|
||||||
* Web
|
* Web
|
||||||
|
|
||||||
## Games Made With Popka
|
## Games Made With Parin
|
||||||
|
|
||||||
* [Clean & Haunted](https://kapendev.itch.io/clean-haunted)
|
* [Clean & Haunted](https://kapendev.itch.io/clean-haunted)
|
||||||
* [Runani](https://kapendev.itch.io/runani)
|
* [Runani](https://kapendev.itch.io/runani)
|
||||||
|
@ -36,10 +36,10 @@ mixin runGame!(ready, update, finish);
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
This guide shows how to install Popka and its dependencies using DUB.
|
This guide shows how to install Parin and its dependencies using DUB.
|
||||||
While DUB simplifies the process, Popka itself doesn't require DUB.
|
While DUB simplifies the process, Parin itself doesn't require DUB.
|
||||||
|
|
||||||
Popka has the following dependencies:
|
Parin has the following dependencies:
|
||||||
|
|
||||||
* [Joka](https://github.com/Kapendev/joka): A simple nogc utility library.
|
* [Joka](https://github.com/Kapendev/joka): A simple nogc utility library.
|
||||||
* [raylib](https://github.com/raysan5/raylib): A simple graphics library.
|
* [raylib](https://github.com/raysan5/raylib): A simple graphics library.
|
||||||
|
@ -50,10 +50,10 @@ Create a new folder and run inside the following commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dub init -n
|
dub init -n
|
||||||
dub run popka:setup
|
dub run parin:setup
|
||||||
```
|
```
|
||||||
|
|
||||||
The final line modifies the default app.d and dub.json files, downloads raylib, and creates the necessary folders for Popka to function properly. The following folders will be created:
|
The final line modifies the default app.d and dub.json files, downloads raylib, and creates the necessary folders for Parin to function properly. The following folders will be created:
|
||||||
|
|
||||||
* assets: This folder is used to store game assets.
|
* assets: This folder is used to store game assets.
|
||||||
* web: This folder is used for exporting to the web.
|
* web: This folder is used for exporting to the web.
|
||||||
|
@ -84,12 +84,12 @@ The [web](web) folder contains a helper script to assist with the web export pro
|
||||||
It can be used with DUB by running the following command:
|
It can be used with DUB by running the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dub run popka:web
|
dub run parin:web
|
||||||
```
|
```
|
||||||
|
|
||||||
## Alternative Game Development Libraries
|
## Alternative Game Development Libraries
|
||||||
|
|
||||||
While Popka provides a good game development experience in D, it might not fit everyone's needs.
|
While Parin provides a good game development experience in D, it might not fit everyone's needs.
|
||||||
Here are some other notable alternatives to consider:
|
Here are some other notable alternatives to consider:
|
||||||
|
|
||||||
* [raylib-d](https://github.com/schveiguy/raylib-d)
|
* [raylib-d](https://github.com/schveiguy/raylib-d)
|
||||||
|
@ -99,7 +99,7 @@ Here are some other notable alternatives to consider:
|
||||||
|
|
||||||
## Note
|
## Note
|
||||||
|
|
||||||
I add things to Popka when I need them.
|
I add things to Parin when I need them.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
22
TOUR.md
22
TOUR.md
|
@ -5,7 +5,7 @@
|
||||||
To begin, open the main project file and copy-paste the following code:
|
To begin, open the main project file and copy-paste the following code:
|
||||||
|
|
||||||
```d
|
```d
|
||||||
import popka;
|
import parin;
|
||||||
|
|
||||||
void ready() {
|
void ready() {
|
||||||
lockResolution(320, 180);
|
lockResolution(320, 180);
|
||||||
|
@ -66,7 +66,7 @@ Here is a breakdown of how this code works:
|
||||||
|
|
||||||
This line sets up a main function that will run the game.
|
This line sets up a main function that will run the game.
|
||||||
|
|
||||||
In essence, a Popka game typically relies on three key functions:
|
In essence, a Parin game typically relies on three key functions:
|
||||||
|
|
||||||
* A ready function.
|
* A ready function.
|
||||||
* An update function.
|
* An update function.
|
||||||
|
@ -74,7 +74,7 @@ In essence, a Popka game typically relies on three key functions:
|
||||||
|
|
||||||
## Input
|
## Input
|
||||||
|
|
||||||
Popka provides a set of input functions inside the `popka.engine` module.
|
Parin provides a set of input functions inside the `parin.engine` module.
|
||||||
|
|
||||||
```d
|
```d
|
||||||
bool isPressed(char key);
|
bool isPressed(char key);
|
||||||
|
@ -97,7 +97,7 @@ Vec2 wasd();
|
||||||
|
|
||||||
## Sound
|
## Sound
|
||||||
|
|
||||||
Popka provides a set of sound functions inside the `popka.engine` module.
|
Parin provides a set of sound functions inside the `parin.engine` module.
|
||||||
|
|
||||||
```d
|
```d
|
||||||
void playSound(Sound sound);
|
void playSound(Sound sound);
|
||||||
|
@ -114,7 +114,7 @@ void updateSound(SoundId sound);
|
||||||
|
|
||||||
## Drawing
|
## Drawing
|
||||||
|
|
||||||
Popka provides a set of drawing functions inside the `popka.engine` module.
|
Parin provides a set of drawing functions inside the `parin.engine` module.
|
||||||
While drawing is not pixel-perfect by default, it can be by calling the `setIsPixelPerfect` function.
|
While drawing is not pixel-perfect by default, it can be by calling the `setIsPixelPerfect` function.
|
||||||
|
|
||||||
```d
|
```d
|
||||||
|
@ -135,11 +135,11 @@ void drawText(FontId font, IStr text, Vec2 position, DrawOptions options = DrawO
|
||||||
void drawDebugText(IStr text, Vec2 position, DrawOptions options = DrawOptions());
|
void drawDebugText(IStr text, Vec2 position, DrawOptions options = DrawOptions());
|
||||||
```
|
```
|
||||||
|
|
||||||
Additional drawing functions can be found in other modules, such as `popka.sprite`.
|
Additional drawing functions can be found in other modules, such as `parin.sprite`.
|
||||||
|
|
||||||
## Loading and Saving Resources
|
## Loading and Saving Resources
|
||||||
|
|
||||||
Popka provides a set of loading functions inside the `popka.engine` module.
|
Parin provides a set of loading functions inside the `parin.engine` module.
|
||||||
Functions that start with the word load/save will always try to read/write resources from/to the assets folder.
|
Functions that start with the word load/save will always try to read/write resources from/to the assets folder.
|
||||||
These functions handle both forward slashes and backslashes in file paths, ensuring compatibility across operating systems.
|
These functions handle both forward slashes and backslashes in file paths, ensuring compatibility across operating systems.
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ Result!IStr loadTempText(IStr path);
|
||||||
Fault saveText(IStr path, IStr text);
|
Fault saveText(IStr path, IStr text);
|
||||||
```
|
```
|
||||||
|
|
||||||
Additional loading functions can be found in other modules, such as `popka.tilemap`.
|
Additional loading functions can be found in other modules, such as `parin.tilemap`.
|
||||||
|
|
||||||
### Managed Resources
|
### Managed Resources
|
||||||
|
|
||||||
|
@ -180,9 +180,9 @@ They don’t need to be freed manually.
|
||||||
## Sprites and Tile Maps
|
## Sprites and Tile Maps
|
||||||
|
|
||||||
Sprites and tile maps can be implemented in various ways.
|
Sprites and tile maps can be implemented in various ways.
|
||||||
To avoid enforcing a specific approach, Popka provides optional modules for these features, allowing users to include or omit them as needed.
|
To avoid enforcing a specific approach, Parin provides optional modules for these features, allowing users to include or omit them as needed.
|
||||||
Popka provides a sprite type inside the `popka.sprite` module and a tile map type inside the `popka.tilemap` module.
|
Parin provides a sprite type inside the `parin.sprite` module and a tile map type inside the `parin.tilemap` module.
|
||||||
|
|
||||||
## Scenes
|
## Scenes
|
||||||
|
|
||||||
The `popka.scene` module provides a simple scene manager to organize game code by screens, such as the title screen or gameplay.
|
The `parin.scene` module provides a simple scene manager to organize game code by screens, such as the title screen or gameplay.
|
||||||
|
|
2
dub.json
2
dub.json
|
@ -5,7 +5,7 @@
|
||||||
"copyright": "Copyright © 2024, Alexandros F. G. Kapretsos",
|
"copyright": "Copyright © 2024, Alexandros F. G. Kapretsos",
|
||||||
"description": "A lightweight and beginner-friendly 2D game engine for the D programming language.",
|
"description": "A lightweight and beginner-friendly 2D game engine for the D programming language.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"name": "popka",
|
"name": "parin",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"joka": "*"
|
"joka": "*"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue