Compare commits

..

No commits in common. "d86475026c2fe067b3138e840dbf14e37e4b8c18" and "cd8192738018577c1b13b2d7b39854a083a4aafc" have entirely different histories.

4 changed files with 22 additions and 10 deletions

View File

@ -23,13 +23,14 @@
<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> <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> </p>
pocketpy is a portable Python 3.x interpreter, written in C11. 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.
pocketpy has no dependencies other than the C standard library, which can be easily integrated into your C/C++ project. It aims to be an alternative to lua for game scripting, with elegant syntax, powerful features and competitive performance.
Developers are able to write Python bindings via C-API or pybind11 compatible interfaces. pkpy is extremely easy to embed via a single header file `pocketpy.h`, without external dependencies.
Please see https://pocketpy.dev for details and try the following resources. 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 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 ## Supported Platforms

View File

@ -4,6 +4,17 @@ order: 0
label: "Project Ideas" 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 ### VSCode plugin for debugging pocketpy applications
+ Difficulty Level: 3/5 (Medium) + Difficulty Level: 3/5 (Medium)
@ -23,4 +34,3 @@ 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). 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. 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,10 +5,11 @@ label: Welcome
# Welcome to pocketpy # Welcome to pocketpy
pocketpy is a portable Python 3.x interpreter, written in C11. 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.
pocketpy has no dependencies other than the C standard library, which can be easily integrated into your C/C++ project. It aims to be an alternative to lua for game scripting, with elegant syntax, powerful features and competitive performance.
Developers are able to write Python bindings via C-API or pybind11 compatible interfaces. pkpy is extremely easy to embed via a single header file `pocketpy.h`, without external dependencies.
## What it looks like ## What it looks like

View File

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