Log In  
Follow
seleb
SHOW MORE

Cart #super_snow_shoveler-0 | 2018-12-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

Day 11 of the Pico-8 Advent Calendar 2018!

a battle between efficiency & exhaustion
~a winter classic~

Hey there folks, it's mid-December, and you know what that means: time to shovel the driveway! The snow's packed pretty heavy though - if it piles up too much, you'll have a hard time pushing it and probably just make a mess!

Make sure to check back on the calendar each day for a new gift!

P#59894 2018-12-11 13:10

SHOW MORE

Cart #51913 | 2018-04-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Hey folks! Been awhile since I've posted something on the BBS, but thought I'd share my LD41 entry.
It's local multiplayer only unfortunately (I'd hoped to get a decent AI opponent in but didn't have time). If you manage to get someone to play with you though, let me know how it goes!

HOW TO PLAY

  • drop pieces in empty slots
  • swap pieces in filled slots
  • match 3+ to earn swaps
  • connect exactly 4 to win

LD entry page
itch.io page

P#51914 2018-04-22 20:45 ( Edited 2018-04-23 00:45)

SHOW MORE

Cart #36419 | 2017-01-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

I'm a bit bummed because work and GGJ being this weekend meant I didn't get a chance to take this past a prototype stage, but it's still kinda neat!

Controls:
TAB: turn on TV
ARROWS: hatch egg
Z: feed
X: love

P#36420 2017-01-22 18:55 ( Edited 2017-01-29 17:18)

SHOW MORE

Hey there! I made a little twitterbot recently that generates 8x8 sprites for PICO-8:

@SpritesByPico

It tweets both a GFX tag ready for copy-pasting into PICO-8 or the BBS and an image preview of the sprite. Currently it has 3 colour modes (1, 2, or 3 colours on a black background) and 3 layout modes (top-bottom symmetry, left-right symmetry, and 4-corners).

Here are some examples of sprites it's generated so far:

[0x0]
[0x0]
[0x0]
[0x0]
[0x0]

If you're interested in how it works, I made it with CheapBotsDoneQuick and the source is available here. It's actually a pretty simple idea, but generating both the GFX tag and the image preview made it a lot more complicated (and more interesting IMO) than doing either one separately.

P#32644 2016-11-20 04:07 ( Edited 2016-11-20 21:47)

SHOW MORE

Cart #31061 | 2016-10-16 | Code ▽ | Embed ▽ | No License
9

Inspired by @pippinbarr's tweet:

░ ░ ░ ░ GAME IDEA
░ ░ ░
░ ░ YOU ARE AN ELEVATOR
░ ░ ░ JUDGING
░ ░
░ ░ ░ ░ ELEVATOR PITCHES
░ ░ ░
░ ░ BUT NO ONE
░ ░ ░ ASKED FOR YOUR OPINION

Made for The Pippin Barr 'GAME IDEA' Game Jam.

play on itch.io

P#31062 2016-10-16 16:00 ( Edited 2016-10-24 00:30)

SHOW MORE

Forgot to post this here the other day: PICO-8-Token-Optimizations

Lots of people working on larger projects (or more topically, the collab16 games) end up hitting the token limit, and people in the PICO-8 community have come up with plenty of handy tricks to deal with that. Some of them are common knowledge or pretty easy to figure out on your own, but others are a bit obscure, so I figured it'd be useful to compile a list of general purpose tricks and techniques for cutting down your tokens.

If you know of any handy tips that aren't listed or have any corrections/improvements, feel free to let me know or contribute to the repository!

P#29581 2016-09-28 11:08 ( Edited 2016-09-30 20:56)

SHOW MORE

Uh oh, a flock of ducklings has gone missing, and it's up to Duck Duck to save the day! Can you help them find all seven?

I mean... it's not really your responsibility. I'm sure they'll be fine on their own. Why don't you just take some time to wander around and enjoy yourself? And hey, if you happened to find some ducklings along the way, that's cool too.

play it on itch.io

note: the web version on the BBS won't work because the module's TOTAL_MEMORY is too low, but I've included the cart here so you can still download it if you want. If you want to play it online I recommend the itch.io version.

Cart #29009 | 2016-09-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
59

Cart #28944 | 2016-09-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
59

updates: fixed bottom-right corner crash

P#28945 2016-09-21 12:10 ( Edited 2016-09-22 16:33)

SHOW MORE

This is a one button dueling game.

Hold to run, let go before passing to attack.

Whoever hits hardest wins.

Rules:
If neither player let go before passing, it's a tie.
If one player let go before passing, that player wins.
If both players let go before passing, the winner is decided by speed. If speeds are the same, it's a tie.

Made for #OneButtonJam.

Cart #26820 | 2016-08-13 | Code ▽ | Embed ▽ | No License
21

Play it on itch.io!

One of the main things I wanted to try out with this game is an online multiplayer mode using the webplayer + GPIO stuff I experimented with in my PICO-8 twitter feed. You can try that out on the itch.io version of the game, which lets you connect to another player for peer-to-peer matches (using the Peerjs library and a heroku server to broker connections).

All in all it's a pretty simple game, but I hope it's interesting anyway!

P#26821 2016-08-12 20:24 ( Edited 2016-08-13 17:18)

SHOW MORE

Hey there, this is a game made by Ian and I for the "A Game By It's Cover" jam.

Play it on itch.io

Cart #27185 | 2016-08-22 | Code ▽ | Embed ▽ | No License
18

Changelog
2016-08-21: fixed PocketCHIP crash (with help from @morningtoast)
2016-08-15: updated menu navigation
2016-08-12: fixed random palette bugs

P#25988 2016-07-27 20:49 ( Edited 2016-07-28 00:49)

SHOW MORE

Hey there! Over the past couple days I've been playing around with PICO-8's GPIO stuff and put together a simple Twitter client. There seemed to be a decent amount of interest in how I got this to work, so I thought I'd share a quick write-up to give others a potential starting point for using GPIO.

Check out P8T over on itch.io or grab the source on GitHub.

This is more of a proof-of-concept than an actual attempt at making a good Twitter client, but hopefully it's good enough for educational purposes!

GPIO
I only discovered PICO-8's GPIO support yesterday. As near as I can tell, the GPIO is meant to represent pins on physical hardware so that PICO-8 apps could use accelerometers, LEDs, etc. on a Raspberry PI or PocketCHIP. I don't know how far along the development is on the hardware side, but in v0.1.7 JavaScript support was added to GPIO in the web player, which essentially gives us 128 bytes of browser/cart shared memory! Using this memory is super easy too:

// JavaScript
// initialize the pico8_gpio array before the cart loads (this is the only necessary step)
var pico8_gpio = new Array(128);
// alert the value of the first pin and set the fourth pin's value to 10
alert(pico8_gpio[0]);
pico8_gpio[3] = 10;
// PICO-8
// print the value of the third pin and set the first pin's value to 2
print(peek(0x5f80+2))
poke(0x5f80, 2);

That's it!

Communication
128 bytes is a pretty big chunk of data for a PICO-8 app, so we could probably get by using GPIO as-is without issues in a simple app. However, I wanted Twitter integration: even if I only used one-way communication and stripped out all the metadata, 128 bytes isn't enough to fit a 140 character tweet! To get around this, I had to come up with a more formalized structure for communications. (I've never been much of a networking guy, so feel free to point out better or easier ways to handle this stuff.)

My communication structure uses a simple frame-packet analogy. We start with a frame: a single big block of data (e.g. a tweet) which we then convert into smaller, more manageable chunks of data (packets). Each packet is split into two sections: a header which describes the packet content (length, id, etc.) and a body which contains a portion of the original data.

On the browser's side, this means taking the result of a Twitter search, parsing it into a single string of text, splitting the string into an array of strings where each item has at most X characters, where X is the length of a packet body, and then sending this one-by-one through the GPIO.

On the cart's side, this means reading the header pins and using the values to help us parse and interpret the body pins. It also means concatenating data from multiple packets in order to form a full frame.

The trick to getting this working is to make sure that the browser and the cart are always in agreement on who's doing what. If both were just arbitrarily accessing the GPIO, we'd have no idea what was actually in the shared memory at any point. My solution for this was fairly simple:
-the first header pin always stores either a 1 or a 0
-if the browser sees a 1, it updates and sets the pin to 0
-if the browser sees a 0, it skips the update
-if the cart sees a 1, it skips the update
-if the cart sees a 0, it updates and sets the pin to 1

Initially, I had the browser updating on a setInterval with a fairly large delay, but after some experimentation I found that there wasn't really much benefit to this and put it on a requestAnimationFrame loop instead. Writing/reading to the GPIO doesn't seem to be a particularly expensive operation, so this allows for near real-time communication.

Once we've got a reliable order for our operations set up, concatenating the packet data into a frame is pretty easy too: we use one of the header pins to tell us how many packets are in the current data transfer, and another to tell us what the current packet's ID is. We create a new buffer for frame data when we receive the first packet, and append packet data until the packet ID matches the number of packets in the frame.

My focus was on sending data from the browser to PICO-8, but this system also supports limited two-way communication: after we've read the current packet data in PICO-8, we can replace it with a new packet, and the browser can similarly read it back before it sends the next one. In P8T, the state of the buttons are sent from PICO-8 to the browser in this way. If you've looked at the code for an exported PICO-8 app you'll probably notice that this is a bit redundant: the web player already has some separate variables you can use to query button state, but if you were to use GPIO to create a multiplayer game in PICO-8, you're probably going to need to send more than just button presses and the principle is the same regardless of the data.

Sending text
One of the hurdles in developing P8T was that I was originally sending text data to PICO-8 in ASCII, but PICO-8 has no built-in functionality for converting an ASCII character code into the character string. My workaround for this was to create a string with all the characters I needed and use sub() to grab individual characters based on their position:

// JavaScript
// converts characters to a format which the cart can read
    // case is reversed, characters are offset, and newline is a special character
    charToPico: function (c){
        if(c == '\n'){
            return 0;
        }else{
            // swap case
            c = (c == c.toLowerCase() ? c.toUpperCase() : c.toLowerCase());
            // convert to ASCII
            c = c.charCodeAt();
            // offset
            c -= this.char_offset;
            return c;
        }
    }
// PICO-8
//ignores control characters except \n
//includes symbols (128-153)
 chars="\n\32\33\34\35...\153"

function char(k)
 return sub(chars,k+1,k+1)
end

What could've been done better
-Currently, only one frame can be sent from the browser at a time. A fairly simple extension would be to place "send" commands in a queue for a more asynchronous experience.
-The browser can send an arbitrary amount of data, but the cart implementation is limited to a single packet. It wouldn't be too hard to recycle the frame/packet structure used on the browser's end to allow for unlimited communication in both directions, but the order of operations would get a bit more complicated (do you send packets in both directions at the same time knowing the frames won't be in sync, or do you wait for full frames knowing that they take multiple frames to send?)
-The twitter integration in general is pretty sloppy since I focused on just getting simple functionality working. Tweets are pulled one at a time and only on user-request; it would make a lot more sense to grab a dozen or so all at once, and then pull in new batches as the user browses through the ones you've stored locally. With a bit more work, you could even add a login and let the user interact with the tweets!

P#25751 2016-07-22 20:33 ( Edited 2016-09-03 19:33)

SHOW MORE

PICO-8 Styler

Current feature list:
-Page colours can be customized (background, button background/hover, text)
-Canvas scale can be customized, has no border, and defaults to 512x512
-Canvas is centered horizontally and vertically
-Canvas and buttons use image-rendering CSS for sharper fullscreen viewing
-First script tag includes "var require = null;" in order to address a node.js issue which prevents PICO-8 games from running in things like NW.js
-Buttons are "text-align:center" instead of "float:left"
-Buttons are slightly smaller to better fit default canvas size
-Button text can't be selected
-Buttons can be excluded
-Link button label/target can be customized
-Page can be autofocused for more accessible iframe embeds (without this, sometimes PICO-8 games won't receive input until you click on a button)
-HTML5 Gamepad API support can be included for singleplayer or multiplayer

If you have ideas for more useful features, feel free to contribute on GitHub or send me suggestions!

P#25348 2016-07-15 13:53 ( Edited 2017-01-07 18:27)

SHOW MORE

Cart #23122 | 2016-06-18 | Code ▽ | Embed ▽ | No License
10

try to fight it

Controls:
-Arrows to move
-Z to attack
-X to sneak

itch.io page

P#23123 2016-06-18 12:45 ( Edited 2016-06-22 13:22)

SHOW MORE

Cart #22591 | 2016-06-10 | Code ▽ | Embed ▽ | No License
13

Oh no! There's been a disaster, and your crew has gotten lost at sea. Luckily, you've got a supremely buoyant sailboat: it's up to you to pick them up and tow them back to safety!

Controls:
-Arrows for movement
-Z to toggle UI
-X to swap palettes

I went with some extra self-imposed challenges on this one:
-1-bit colour
-No text
-No assets (i.e. sprites, tiles, sounds, or music)

Made for #simplejam.

P#22592 2016-06-10 05:10 ( Edited 2016-06-11 20:03)

SHOW MORE

The finished game:

Cart #21359 | 2016-05-26 | Code ▽ | Embed ▽ | No License
13

It turned out pretty good for a first attempt at making a game with PICO-8 in my opinion. The gameplay itself is a little uninspired, but I had a lot of fun playing with the visuals and learning about the system.

Older versions:


Cart #21270 | 2016-05-25 | Code ▽ | Embed ▽ | No License
13

-Fixed x-overflow/underflow bug
-Changed default palette
-Rough menus
-Points/Combos/Lives
-Generally more stylish

Cart #21212 | 2016-05-24 | Code ▽ | Embed ▽ | No License
13

Cart #21188 | 2016-05-23 | Code ▽ | Embed ▽ | No License
13

Still needs a lot of work, but it's turning out ok!

P#21189 2016-05-23 17:12 ( Edited 2017-06-15 21:48)

Follow Lexaloffle:          
Generated 2024-03-19 05:45:43 | 0.136s | Q:51