Log In  
Follow
jozanza
[ :: Read More :: ]

Cart #27232 | 2016-08-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

A few months back, I started this cart and then basically abandoned it after I realized I was quickly approaching the token limit (~1500 left). There are a lot of ideas in this WIP, and it was a pretty good learning experience. I almost made a proper game in the process.

If anyone thinks completion is worthwhile, I'd welcome suggestions for a purpose behind the gameplay. That was one thing I never really got around to! :3

P#27233 2016-08-23 00:52 ( Edited 2016-08-24 23:49)

[ :: Read More :: ]

The more projects I start, i've been finding it harder and harder to keep track of all my little copy-paste pico-8 code snippets. I've had a burning desire to use require(), so I could organize and reuse my code in modules, but there's no mechanism in pico-8 that let's you do this.

It's also a bit manual and tedious to browse through and repurpose code in other people's carts since there's several steps involved.

To try and solve these issues, I just published a tool called p8. It manages dependencies and makes it easy to share code across projects. It does so by injecting external dependencies into a cartridge and polyfilling a global require(), which allows you to import these modules from your project's entry point.

Does anyone else have major problems with managing their code as their projects grow? How do you keep track of your snippets? What's your process for using code other people wrote?

P#27069 2016-08-19 02:40 ( Edited 2016-08-28 04:44)

[ :: Read More :: ]

Cart #22079 | 2016-06-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
12

Recently, I got really tired of writing buggy code with prinths scattered everywhere to try and figure out what the hell was going on. So, I created a way to test your carts while they run. It gives you output on the command line that looks something like this:

Hopefully, it's not too difficult to install/use. I mimicked mocha's API at a high-level.

I'd love to hear what you think if anyone decides to try it out. You can also download the cart and take a look at the code for more info. There's fairly detailed documentation on Github:

https://github.com/jozanza/pico-test

Also, feel free to comment on this thread with questions or hmu on twitter. Cheers!

P#22080 2016-06-02 02:05 ( Edited 2016-06-02 22:59)

[ :: Read More :: ]

I just came across moonscript the other day. It's a sort of coffeescript-esque language that compiles to Lua. It has a lot of nifty features -- including arrow functions, which is what sold me.

So I wrote a tool that allows you to watch a .moon file and pipe it into the lua part of a .p8 cartridge. It's not thoroughly test and probably only works on OS X, but I've been personally enjoying writing moonscript in Sublime Text 3 and watching PICO-8 automatically reload on save :)

I'll drop the link here in case anyone finds it useful or intriguing: PICOMOON

Cheers!

P#19218 2016-03-14 03:26 ( Edited 2016-07-08 22:55)

[ :: Read More :: ]

Hey guys, I'm just starting with PICO-8. So far it's very fun. Although I'm a frontend web developer by profession, Lua was very easy to pick up due to its similarities to Javascript. The development experience is generally pretty awesome apart from poor debugging tools. But overall, the simplicity is welcomed since it lets you bang out proof-of-concepts really quickly.

Alas, the simplicity really does set me back in one category -- persisting data.

It seems like looking at the manual and some carts, the main method is to write binary data to a memory address with peek/poke/memcpy/memset. As a JS guy, I've worked with plenty network protocols and IO between filesystems, databases, and APIs, but when it comes to working directly with binary data and using memory addresses, I'm kind of lost. I've rarely encountered a situation that required me to use bitwise operators or manipulate binary values directly.

That being said, I have looked around the BBS and attempted to find something to guide me on this quest to save the game state. I've seen a couple of threads (like this one) and downloaded a few carts like Shodo and Picodachi to see how it's done. Despite my best attempts to grok the concept, it's very difficult to understand the following:

1) Which memory addresses to use and how to prevent writing over previously written addresses. 0x5fc0-0x6000 seems like the sort of default range. But what are the intermediary addresses?

2) Determining the proper number of bytes required to save an arbitrary number/string/boolean and determining how many to read back.

3) How you'd go about using converting variables into binary before write and back again upon read.

4) If there's a feasible way to convert and store functions or tables as well.

I'd really appreciate any advice, tutorials, carts or code snippets that could help me wrap my head around how all this works in Picoland. Thanks! :)

P#18723 2016-02-08 02:26 ( Edited 2016-02-13 08:53)

Follow Lexaloffle:          
Generated 2024-04-20 12:42:18 | 0.074s | Q:14