Log In  

BBS > Superblog
Posts: All | Following    GIFs: All | Postcarts    Off-site: Accounts

(There have been other rants on this topic, but most of the discussion seems to predate the move to token counting.)

So I'm brushing up against the compressed codesize limit with a cart that's barely halfway towards the token limit. It sounds like this is unusual, and from what I can tell it's because I'm commenting the code fairly thoroughly.

And I have to wonder, what is the intent behind the compressed size limit? What is it still meant to accomplish that the token limit doesn't already?

The token count is a rough representation of binary or bytecode size, which was an authentic historical constraint for many systems. It's measurable from within the editor: a coder can see at a glance how many tokens they have left and how they are affecting that number as they type. While it's approximate, it's directly correlated to code complexity, and this makes it fairly intuitive to reason about. The steps for reducing token count are also intuitive: simplify code, improve code sharing, generate data rather than hardcoding it, do more with less.

The token limit defines a scope for pico-8 cartridges; it encourages creative solutions and algorithmic content generation, and it plays off the other cart limits by discouraging tactics like offloading data into code.

Compressed code size, on the other hand, is a representation only of [i]how much entropy your source code exhibits

[ Continue Reading.. ]

6
18 comments


Cart #19819 | 2016-04-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
80

Old version:

Cart #19701 | 2016-04-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
80

Clean the skies of sector Q97-C with your trusty mining laser.
Keep an eye out for debris, not to mention Turrets and Tormentors.

Controls:
Arrow keys control roll and yaw.
X-key accelerates.
Z-key fires laser.

Tips:
Full 3D navigation can be tricky, so keep an eye on your radar at the bottom.
It can be easier to sweep the laser up over targets than to try to hit them dead on.
Watch out because the laser uses your ship's power, which only refills slowly over time.

Version Notes:
Added music by Robby Duguay
-www.robbyduguay.com
Added sound effects

80
22 comments


Cart #19698 | 2016-04-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
9

This was created for LOWREZJAM 2016 in 48 hours, but it's still my first "finished" cartridge I've ever made!

Controls:
Left and Right to move
Z to jump
X to attack
Up to thrust upwards
Down to block

Goal: Bash your opponent off the platform 7 times to win.

2-player only. Enjoy bashing! -Lemmo

9
2 comments


Cart #19773 | 2016-04-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
13

Cart #19696 | 2016-04-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
13

As Scathe noted over here, there's not a proper/easy-to-use Timers API built into PICO-8. Turns out it's not too hard to build one, though, so I took up the task.

The cartridge which you can play above just counts to 10. I've reproduced all the code here:

-- start timers code

local timers = {}
local last_time = nil

function init_timers ()
  last_time = time()
end

function add_timer (name,
    length, step_fn, end_fn,
    start_paused)
  local timer = {
    length=length,
    elapsed=0,
    active=not start_paused,
    step_fn=step_fn,
    end_fn=end_fn
  }
  timers[name] = timer
  return timer
end

function update_timers ()
  local t = time()
  local dt = t - last_time
  last_time = t
  for name,timer in pairs(timers) do
    if timer.active then
      timer.elapsed += dt
      local elapsed = timer.elapsed
      local length = timer.length
      if elapsed < length then
        if timer.step_fn then
          timer.step_fn(dt,elapsed,length,timer)
        end  
      else
        if timer.end_fn then
          timer.end_fn(dt,elapsed,length,timer)
        end
        timer.active = false
      end
    end
  end
end

function pause_timer (name)
  local timer = timers[name]
  if (timer) timer.active = false
end

function resume_timer (name)
  local timer = timers[name]
  if (timer) timer.active = true
end

function restart_timer (name, start_paused)
  local timer = timers[name]
  if (not timer) return
  timer.elapsed = 0
  timer.active = not start_paused
end

-- end timers code

-- start app code

function _update ()
  update_timers()
end

function _init ()
  init_timers()

  local last_int = 0
  print(last_int)
  sfx(last_int)
  add_timer(
    "timer1",
    10,
    function (dt,elapsed,length)
      local i = flr(elapsed)
      if i > last_int then
        print(i)
        sfx(i)
        last_int = i
      end
    end,
    function ()
      print("done!")
      sfx(10)
    end
  )
end

-- end app code

[ Continue Reading.. ]

13
13 comments


Cart #43559 | 2017-08-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
23

New features:

Simplified controls - just hit x to load then x again to shoot.
Choose your favourite character(including a nude one)
128x128 res and 60 fps.
2 greens with random 2X score boost.

Cart #19837 | 2016-04-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
23


New version with restart at the end.

Cart #19685 | 2016-04-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
23

Golf is all about timing right? So bring your wedge and swing it with the arrow keys.

[ Continue Reading.. ]

23
10 comments


Cart #24981 | 2016-07-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
292

P.Craft is a crafting game. You wake up on a deserted island, and you have to survive. Gather materials and build your tools. Explore the area and find a cave. Will you find a way to escape the island ?

Update : A new version, P.Craft Deluxe Edition has been released on Itch.io :
https://nusan.itch.io/pcraft

With a saving system, a boss and a few new items to discover.
This new version use the multicartridge system in a complex way that is not yet compatible with the BBS, so I can't upload it here. You can however find the source .p8 files on the Itch.io page as well as binaries for windows, linux and mac.

Controls :
Button 1 (C/Z/N) : open inventory / cancel menu
Button 2 (V/X/M) : use equiped item / valid menu

[ Continue Reading.. ]

292
54 comments


Cart #29826 | 2016-10-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
19

Hello...

Came up with this little clone/remake/adaptation/mess after about a week of playing around with Pico-8 and seeing what it can do. I'm really diggin' this little platform.

Figured since I had not seen a playable Invaders clone, I'd post up the one I was messing with. Every platform has one! I would've added some Pico-8 relation and called it "Pico Invaders" but I'm not sure how Zep might take that. Hey Zep, how would you take that?

If you're gonna look through the code, beware, it's a mental minefield right now. Have a couple of aspirins first. Was not expecting to release it so there's barely any cleaning up. Might do so in the future and update.

[ Continue Reading.. ]

19
7 comments


Cart #20068 | 2016-04-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
224

Hello,

Here's my first game for Pico-8 and it's a Pole Position/Enduro/OutRun derivative. You might have already played it on my itch.io page.

Features:

  • Day and night
  • Three landscapes
  • Obstacles and jumps
  • A strict time limit
  • See how well you did in the course map overview
  • Really messy source code
  • Terrible sound

I wrote something about it in my blog and if you have something to ask about it I will gladly answer here.

Edit: I'd like to mention I used the ord() function found here, it was a lifesaver.

[ Continue Reading.. ]

224
24 comments


Hi guys, I'm a new, but huge fan of Pico-8!

I'm also making a video game for learning how to draw, called Pixel Art Academy:
https://pixelart.academy

It's set in this futuristic looking skyscraper city and I thought it would be absolutely wonderful to have Pico-8 as a (virtual) console in my (virtual) world.

In the game you play as an art student, so for example, a game development student would come up to you and ask you to draw a spaceship for their game. You would then draw the spaceship and the other student would come back and show you the spaceship in the game. But even better, you can also test and play the game, since this would be an actual Pico-8 cartridge!

So in the background of course the game would need to be pre-made with just the art assets missing. I haven't dug too deep into cartridge memory setup, but I believe it should be easy enough to import graphics into the cartridge from code. Then I can use the html embed to show the game in-game (oh god, game inception).

Also, does anyone have any suggestions of available cartridges that would be a good start for beginners to start customizing the sprites? I only played with Jelpi so far, but I'm looking more for something like space invaders, where there're not so many sprites/tiles and someone can draw it out from start to finish. And it would need to be CC-BY-SA so derivatives are allowed.

I might quickly code some new mini-games to test the concept out, but I'm short on time, so if there's any available ones already for proof-of-concept, it could help speed things up. Or if anyone here would like to make in-game pico-8 games specifically for Pixel Art Academy, let me know.

I leave you with some mockups for the game (the main game, not the in-game game XD):

[ Continue Reading.. ]

7
10 comments


Cart #23755 | 2016-06-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

By @AshleyPringle

A fun, relaxing pet forest game made for lowrezjam, in the vein of a tamagotchi. Grow a dynamic little forest, see how long it can survive, experiment with the different algorithms, or burn it all to the ground! Whatever your heart desires.

Default resolution is 64x64, but I bent the lowrezjam rules a bit and included the option to change to 128x128. Change the "SCREENS" option to 2 :)

Button 1/Z - Settings menu/fast menu scrolling
Button 2/X - Probabilities menu/close menu

Arrow keys move the screen around or control the menu if it is open. Press left/right on a setting to decrease/increase its value. Hold Button1/Z while pressing left or right to make a setting increase/decrease faster.

Menu 1 has general settings, including the growth algorithms and the chances for trees to grow/burn next to each other.

Algorithm 1 uses the Von Neumann neighbourhood
Algorithm 2 uses the Moore neighbourhood
Algorithm 3 uses another neighbourhood I don't know the name of? Trees sprout at diagonals to each other
Algorithm 4-6 use the same neighbourhoods as 1-3 respectively, but will only sprout/burn if there is only ONE tree next to a cell.

Menu 2 has the probabilities for a cell to randomly change state, regardless of whether there is a tree in its neighbourhood.

Enjoy! :)

Updated with a bug fix to stop crashes during menu navigation Apr 25

[hidden]

Cart #19991 | 2016-04-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

Cart #19659 | 2016-04-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

[ Continue Reading.. ]

6
2 comments


For those who missed the Twitter post by Zep, he's published the official 0.1.6 changelog! He said the new version is coming this week.

Pico-8 0.1.6 changelog

1
11 comments


NEW VER: 1.2

Cart #19966 | 2016-04-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

OLD VER: 1.1

Cart #19661 | 2016-04-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

OLD VER: 1.0

Cart #19651 | 2016-04-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

[b]CONTROLS:

[ Continue Reading.. ]

8
4 comments


I'm trying to build a charge attack that would activate on the release of a button, however, it seems that there isn't a microscript that would allow me to use ammon on a button release, thus, I tried building a system of modifiers to work around that problem (by using the button NOT pressed microscript) but I hit another wall, such a set of modifiers would require me to use a modifier on the item, so the ammo doesn't keep getting used while holding the button, yet, it seems there is no such a thing as a modifier for the inventory item.

So I ask for help: @zep, is there a way to work around this issue or a possible update to help?

8 comments


Cart #28747 | 2016-09-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
163

A procedurally generated hack-n-slash action adventure for the Pico-8 fantasy console!

Controls:

Up/Down/Left/Right - Move
X - Attack
Z - Strafe

Hey! Here's my first cart. The code is ugly and cryptic as all heck. Enjoy!

Play on itch.io

163
24 comments


Would it be possible to make a RESTful api for accessing carts uploaded to the BBS? Requests could return JSON data. This would allow for people to make their own game browsers and things.
The returned JSON could look something like this:

GET: https://www.lexaloffle.com/api/carts/list
{
    ...
    {"id": 10025, "title": "Temple Pop"},
    {"id": 10022, "title": "Hug Arena"},
    {"id": 10010, "title": "Just hold on we\"re going home"},
    {"id": 9997, "title": "NOBLINKY SUPER ULTRA BINGO WORLD QUEST"}
    ...
}
GET: https://www.lexaloffle.com/api/carts/id/10022
{
    "id": 10022,
    "thumbnail": "https://www.lexaloffle.com/bbs/thumbs/pico10022.png",
    "title": "Hug Arena",
    "author": {
        "id": 9308,
        "name": "Benjamin Soulé"
    },
    "file": "https://www.lexaloffle.com/bbs/cposts/1/10022.p8.png"
}
GET: https://www.lexaloffle.com/api/users/id/9308
{
    "id": 9308,
    "name": "Benjamin Soulé"
}
GET: https://www.lexaloffle.com/api/users/id/9380/list
{
    ...
    {"id": xxxxx, "title": "xxxxxxxx"},
    {"id": xxxxx, "title": "xxxxxxxx"}
    ...
}
4
3 comments


Cart #19732 | 2016-04-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

It's my first pico-8 game and I made a really basic version of Pong with double sided rocket. Use the right side for green balls and left for the red ones. Game starts with one ball and each level adds another one.

Controls:
player 1: up/down;
player 2: S/F;
x: select mode/back to menu

Changelog:
11.04.16 - added menu and 2 new modes including 2 player co-op thing!

8
7 comments


I was discussing with a friend how to deal with complex music arrangements (all 4 channels) alongside sound effects. He alleged that the GameBoy used all its channels for music at times but would cancel one of its channels (perhaps the percussive one) to play sound effects, then resume when sound effects had elapsed.

Current PICO-8 configuration, as far as I understand, is to have music channel masks take precedence over sound effects. This is good in theory but can be bad if you want to do something like the above. A possible solution could be to allow music channel mask modification mid-playback - is this doable? It would require some way to save or lookup a currently playing track (not yet in the API as far as I know), and then we pass that track's value to a function that could reset the channel mask to fewer channels, before playing a sound effect. Then we would do it again with the previous channel mask and expect the muted track component to come back.

I'm not familiar with the tech powering sound playback for PICO-8 and I don't know if this is the sort of thing that could have a simple implementation, or if trying to be able to modify variables for already-playing songs is totally out of the question. I can begin to imagine why it would be complicated or non-performant, but I'm not sure, so I thought I'd ask.

Thanks!

3 comments


Is there a way to change the demos and carts folder location? I would prefer it in my home folder. It's much easier to access the users home folder than the support folder.

Something like this...
"/Users/jbaker/PICO-8/Carts/"
"/Users/jbaker/PICO-8/Demos/"
"/Users/jbaker/PICO-8/HTML/" <--For exported html projects.

That's two clicks compared to the current five, in order to get to that folder.

I'm new to PICO-8, so if I've missed something about this, I apologize. ;)

6 comments


I want to write a song that's in 4, but has swinging notes - so I'm just writing tracks that fill up 24 of the slots instead of all 32. But in order to make it work in sequence I need the track to stop playing after the 24th slot and move on to the next segment in the song immediately. Is there a way to tell PICO-8 to do that? Of course I could just use all 32 slots and changing the measure's starting place depending on where I am, but I'd rather be more organized.

1
3 comments


Seems that while copying a full line in the editor, including the [LF] ending, when later pasting, the line ending of the pasted line is replaced with a [CR][LF].

Not that big a deal really, except.. the [CR][LF] gets counted as a token

--

Thanks Zep for making such a cool toy. Just got this 24 hours ago and it isn't letting me get any work done.

3 comments




Top    Load More Posts ->