mirror of
https://github.com/pocketpy/pocketpy
synced 2026-03-24 22:20:18 +00:00
Compare commits
3 Commits
cd81927380
...
d86475026c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d86475026c | ||
|
|
d9890968e3 | ||
|
|
0f08c1a721 |
@ -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="Featured|HelloGitHub" /></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="Featured|HelloGitHub" /></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
pkpy is a lightweight(~15K LOC) Python 3.x interpreter for game scripting, written in C11.
|
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.
|
||||||
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.
|
||||||
pkpy is extremely easy to embed via a single header file `pocketpy.h`, without external dependencies.
|
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.
|
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
|
||||||
|
|
||||||
|
|||||||
@ -4,17 +4,6 @@ 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)
|
||||||
@ -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).
|
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.
|
||||||
|
|
||||||
|
|||||||
@ -5,11 +5,10 @@ label: Welcome
|
|||||||
|
|
||||||
# Welcome to pocketpy
|
# Welcome to pocketpy
|
||||||
|
|
||||||
pkpy is a lightweight(~15K LOC) Python 3.x interpreter for game scripting, written in C11.
|
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.
|
||||||
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.
|
||||||
pkpy is extremely easy to embed via a single header file `pocketpy.h`, without external dependencies.
|
Developers are able to write Python bindings via C-API or pybind11 compatible interfaces.
|
||||||
|
|
||||||
|
|
||||||
## What it looks like
|
## What it looks like
|
||||||
|
|
||||||
|
|||||||
@ -76,7 +76,7 @@ bool ModuleDict__contains(ModuleDict* self, const char* path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ModuleDict__apply_mark(ModuleDict *self) {
|
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->left) ModuleDict__apply_mark(self->left);
|
||||||
if(self->right) ModuleDict__apply_mark(self->right);
|
if(self->right) ModuleDict__apply_mark(self->right);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user