Skip to content

aadriien/pico8-devbuddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮👾 PICO-8 DevBuddy

Description

A series of helpers and utilies designed to improve the developer experience on PICO-8!

Setup

Prerequisites

  • Python 3.x

Getting Started

To download these utils, run the following from your project directory:

# Confirm in project directory
pwd

# Clone the repository, then navigate to it
git clone https://github.com/aadriien/pico8-devbuddy.git
cd pico8-devbuddy

Features

Modular programming with separate files

Tired of searching through your lengthy .p8 file for snippets of code? Wish you could just break sections down into manageable chunks? build_game.py and modularize_game.py have you covered!

build_game.py

Assemble multiple Lua modules into single PICO-8 file

Once set up, simply run:

# Confirm .p8 file AND .lua files present at root
ls

python3 build_game.py

build_game.py will find your .p8 file, along with any / all .lua files. It will assemble the Lua code from each included module into one large block of code, which it will then inject into .p8.

Importantly, build_game.py will also preface each injected module with the PICO-8 tab marker (-->8), allowing you to carry your sections over into the native editor—something an #include statement alone can't do!

This build script will ONLY rewrite the code section, so you can rest assured that your PICO-8 graphics and map data will remain untouched. Put simply, you can update the core functionality and logical flow while still preserving game aesthetics.

build_game helper util

modularize_game.py

Disassemble single PICO-8 file into multiple Lua modules

Once set up, simply run:

# Confirm .p8 file present at root
ls

python3 modularize_game.py

modularize_game.py will find your .p8 file, parse its contents by PICO-8 tab marker (-->8), and break those sections down into separate Lua modules. This will result in individual .lua files per tab chunk.

This modularizing script will ONLY pull from the code section, ignoring your PICO-8 graphics and map data. Your original .p8 file will remain untouched.

modularize_game helper util

About

No description, website, or topics provided.

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages