Code Monkey home page Code Monkey logo

p8coder's Introduction

P8Coder

P8Coder is a handy little tool that replaces the lua code in pico-8 cartridges (p8) with the code you write in P8Coder (Windows only, untested with Mono).

Author release blog post

It allows to group functions (any code actually) that belong to the same entity/unit in your game and lets you have functions (any kind of code sections) as tabs.

P8Coder dark editor mode

When writing to the cartridge it concatenates all code to one large lua code block as you would have when writing the cart directly in the p8 file or in pico-8.

In its functionality it serves the same way as a project explorer (multiple "files") and a code outline (functions list) but in P8Coder that's all just virtual (no files, just entries in a list). The structure of your projects is up to you.

It stores projects as p8c (P8Coder) files containing the code along with the path to the selected cartridge.

You can use upper-case characters in P8Coder for better readability. Everything will be converted to lower-case on build.

P8Coder has pico-8 lua syntax highlighting and API code hints and can be used entirely with keyboard (F1/F2 to switch entity, ALT+F1/F2 to switch tab, see tooltips for more):

codehints

Internal pico-8 spritesheet viewer with zoom and location helper:

spritesheet viewer

Since version 1.2 there's a button in the top-right corner to save the spritesheet as png.

Internal pico-8 map viewer with zoom and location helper:

map viewer

Pico-8 color table, API cheatsheet and P8Coder GitHub page are just one click away:

pico-8 colors

Since v1.2 you can configure the way pico-8 launches when running your cartridge:

pico-8 launch parameters

P8Coder watches changes made to sprites or map data of the loaded cartridge and updates its views automatically.

P8Coder project files (p8c) can be opened with P8Coder from Windows Explorer ("Open with..." and associate the file extension by choosing P8Coder.exe).

If you're looking for other tools for pico-8, check the awesome-PICO-8 collection.

WARNING

P8Coder overwrites all lua code of the cartridge you select! Everything else (gfx/map/sfx/music) remains untouched.

Download

Source code

Change Log

  • 1.8 - 2020-07-07

    • fixed: comment formatting thanks to nosnibor28
  • 1.7 - 2020-06-23

    • fixed: syntax highlighter
    • added: new pico-8 keywords
  • 1.6 - 2018-10-20

    • fixed: cart loading (label section)
  • 1.5 - 2018-09-02

    • fixed: map preview (second half was scrambled)
  • 1.4 - 2018-05-07

    • added: doubleclick on cart text field opens explorer and selects the cart
    • fixed: cart loading for new file format version (p8 sections are optional since pico-8 v0.1.11e)
  • 1.3 - 2017-10-20

    • minor bugfixes
    • dark editor mode and toggle button
  • 1.2 - 2017-10-02

    • pico-8 launch parameters dialog
    • button to save spritesheet to png
    • new instances of pico-8 instead of re-using
  • 1.1 - 2016-11-01

    • fix for changed cartridge format
  • 1.0 - 2016-05-13: public release

p8coder's People

Contributors

movax13h avatar pw-ffx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

p8coder's Issues

Function name not updating

Whenever we are creating new functions the name of the function is showing the default text "newFunctiongame" instead of our choosen name.

Eg: if we created a function test then it should appear as
function test()
end

but instead of that its appearing as

function newFunctiongame()
end

Error after selecting cart

Just tried a simple print hello world and the following error occurred & got a dialog box appeared after the below error "No cart is selected code copied to clipboard

just-in-time (JIT) debugging instead of this dialog box.

************ Exception Text ************
System.NullReferenceException: Object reference not set to an instance of an object.
at P8Coder.CoderForm.updateProject()
at P8Coder.CoderForm.cartSelBtn_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************ Loaded Assemblies ************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1098.0 built by: NETFXREL4STAGE
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

P8Coder
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/raghu/AppData/Local/Temp/Rar$EXa0.067/P8Coder.exe

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1098.0 built by: NETFXREL4STAGE
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1098.0 built by: NETFXREL4STAGE
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1098.0 built by: NETFXREL4STAGE
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1098.0 built by: NETFXREL4STAGE
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1098.0 built by: NETFXREL4STAGE
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1098.0 built by: NETFXREL4STAGE
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

System.Xml.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1098.0 built by: NETFXREL4STAGE
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll

************ JIT Debugging ************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
pat.zip

Error when trying to load cartridge

Hi movAX13h,

and thanks for coding the P8Coder! At the moment I'm trying to get back into the coding world (last time I was coding it was on the C64 25 years ago) so P8Coder will surely be of help.

Anyways, when I'm trying to load a cartridge to my project, a "Failed to load the cartridge!" error appears. Any guess what it is I'm doing wrong?

Thanks in advance,
fiedldi

Enhancement: Default Cart

If there was any cart available the program is throwing error as
"No cartridge selected. Code copied to clipboard"

Instead of this if its '"New then create a default cart template and select it automatically, because if we selected any existing cartridge its getting overwritten by this new code.

Mono-GNU/Linux

is anyone testing P8Coder on Mono, on GNU/Linux? please let us know, i’m really curious (it’s actually the only possibility i have for running P8Coder!)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.