Log In  

SDK-Units of consoles have normally more memory.

This can be useful during developing - simple try something without care about limits. Or store additional debug information.

it would be nice, if pico-8 would emulate this.

This can be done very simple:
The project must be saved as ".p8"-utf8-file.
When the project hit the limit of characters, compressed size and token it will display the known warning with a little addition: "Ignore? (Project can't be exported!) (y/n):" - when you hit y - it will start anyway. Save as .p8 is always possible, since there are no limits.
Of course the export to bin, web, rom, png or whatever is not possible. also the cli-command "-run" should not work on this oversized p8.

This would be usfull, when you want to check, if something work. Or when you developed a tool / level editor for a game, which you don't want to share.

additional it would be nice to have an debug - enddebug - command

function test(a,b)
 debug 
   if not a or not b then
     print("this should not happen! Got nils!")
   end
 enddebug
 ...
end

this code should only start when pico-8 is in devoloping-mode.
when it saved to p8.png ( or p8.rom, bin, web), pico-8 should interpret this as comment.

function test(a,b)
 --[[ 
   if not a or not b then
     print("this should not happen! Got nils!")
   end
 --]]
 ...
end

So the token-limit should not be affect by the debug - enddebug block.

P#118304 2022-10-01 19:34

1

I Really, really wish for something like this every time I am near the end of a game and debugging everything would benefit a lot from extensive debug code yet There's always the necessity of cutting stuff out to stay within the token limit to run. I am there right now in Prince of Persia and have to juggle enabled/disabled debugging features in the last stretch of the completed game code.

I was thinking of another simple approach:

A predetermined #include such as debug.lua which content is always excluded from token/char/compression count and it is never flattened in the final saved cart both in .p8 or .png format.

It can only be executed when called from your working .p8 file with the separate includes. This might give you additional tokens, up to a limit decided by @zep.

The user needs to remove/comment out any call to functions/vars defined in this include or the saved cart will throw runtime errors, but this is easily done by commenting out the "--#include debug.lua" and seeing the effect on the working cart.

Finally, there could be a small note when saving/info/near the counters to remind you whether the debug include is enabled or not.

Both implementations would be welcome anyway and a great quality of life improvement for complex projects.

P#118364 2022-10-02 14:03
1

last time people talked about developer mode and debugging tools, we got the concept for picotron!

P#118377 2022-10-02 19:16

I too wish for something like this, particularly at the end of a project.

P#119923 2022-10-31 22:52

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 09:12:19 | 0.007s | Q:17