Compare commits

..

3 Commits

Author SHA1 Message Date
blueloveTH
d86475026c update readme and doc 2025-02-07 16:32:03 +08:00
blueloveTH
d9890968e3 Update ideas.md 2025-02-07 14:35:56 +08:00
blueloveTH
0f08c1a721 fix a bug 2025-02-07 14:29:21 +08:00
4 changed files with 10 additions and 22 deletions

View File

@ -23,14 +23,13 @@
<a href="https://hellogithub.com/repository/dd9c509d72a64caca03d99d5b1991a33" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=dd9c509d72a64caca03d99d5b1991a33&claim_uid=jhOYmWGE75AL0Bp&theme=small" alt="FeaturedHelloGitHub" /></a>
</p>
pkpy is a lightweight(~15K LOC) Python 3.x interpreter for game scripting, written in C11.
It aims to be an alternative to lua for game scripting, with elegant syntax, powerful features and competitive performance.
pkpy is extremely easy to embed via a single header file `pocketpy.h`, without external dependencies.
pocketpy is a portable Python 3.x interpreter, written in C11.
It aims to be an alternative to Lua for game scripting, with elegant syntax, powerful features and competitive performance.
pocketpy has no dependencies other than the C standard library, which can be easily integrated into your C/C++ project.
Developers are able to write Python bindings via C-API or pybind11 compatible interfaces.
Please see https://pocketpy.dev for details and try the following resources.
+ [Live Python Demo](https://pocketpy.dev/static/web/): Run Python code in your browser
<!-- + [Live C++ Examples](https://pocketpy.github.io/examples/): Common usage of pkpy in C++ -->
## Supported Platforms

View File

@ -4,17 +4,6 @@ order: 0
label: "Project Ideas"
---
### Porting LDTK importer for python games
+ Difficulty Level: 2/5 (Easy)
+ Skill: Python; Haxe
+ Project Length: Small
[LDTK](https://ldtk.io/) is a modern 2D level editor, created by the director of Dead Cells. It is free and open-source, used by many game developers.
LDTK exports raw level data in JSON format, which can be further parsed by game frameworks. Currently, there is no convenient LDTK importer library in python (except the [QuickType](https://ldtk.io/api/#Python) loader, which has very limited functionality because it wraps the JSON schema only).
This project aims to develop a full-featured python library for importing LDTK levels, with advanced support of [Auto Tiles](https://ldtk.io/wp-content/uploads/2020/11/autoLayer-demo2.gif) for games with random map generation. The library should be written in pure python, compatible with pocketpy and cpython.
### VSCode plugin for debugging pocketpy applications
+ Difficulty Level: 3/5 (Medium)
@ -34,3 +23,4 @@ This project aims to develop a VSCode plugin like [Python Debugger](https://mark
pocketpy is planning to provide a tensor library `cTensor` for users who want to integrate neural networks into their applications. `cTensor` implements automatic differentiation and dynamic compute graph. It allows users to train and deploy neural networks on client-side devices like mobile phones and microcontrollers (e.g. ESP32-C3). We have a early prototype located at [pocketpy/cTensor](https://github.com/pocketpy/cTensor).
In this project, students will help develop and test the `cTensor` library, which is written in C11. We expect students to have a good understanding of further mathematics and C programming.

View File

@ -5,11 +5,10 @@ label: Welcome
# Welcome to pocketpy
pkpy is a lightweight(~15K LOC) Python 3.x interpreter for game scripting, written in C11.
It aims to be an alternative to lua for game scripting, with elegant syntax, powerful features and competitive performance.
pkpy is extremely easy to embed via a single header file `pocketpy.h`, without external dependencies.
pocketpy is a portable Python 3.x interpreter, written in C11.
It aims to be an alternative to Lua for game scripting, with elegant syntax, powerful features and competitive performance.
pocketpy has no dependencies other than the C standard library, which can be easily integrated into your C/C++ project.
Developers are able to write Python bindings via C-API or pybind11 compatible interfaces.
## What it looks like

View File

@ -76,7 +76,7 @@ bool ModuleDict__contains(ModuleDict* self, const char* path) {
}
void ModuleDict__apply_mark(ModuleDict *self) {
PyObject__mark(self->module._obj);
if(!self->module._obj->gc_marked) PyObject__mark(self->module._obj);
if(self->left) ModuleDict__apply_mark(self->left);
if(self->right) ModuleDict__apply_mark(self->right);
}