Log In  

BBS > Community Superblog
All | Following | GIFs | Off-site

I've just started experimenting with clipping and camera movement and it seems that when I move the camera, clipping rectangles I use on-screen don't appear to follow cleanly with the camera. I'm attaching a cart that shows what I mean. Arrow keys move the camera and Z / X reset it.

Moving the camera keeps the items I'm drawing in the correct position while failing to move the clipping rectangle.

Here is the cart:

Cart #pillspinstatic-0 | 2020-06-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

A rough fix: I got the camera coordinates:
cx, cy = %0x5f28, %0x5f2a

and used them to offset the clipping rectangle by those values:
clip (o.x - cx, o.y - cy, 11, 6)

I probably could just reuse the variables I moved the camera with for the fix, but I wanted a solution that wouldn't depend on those variables existing.

[ Continue Reading.. ]

2 comments


Here are a few token count discrepancies:

print(12)    -- 3 tokens
print(-12)   -- 3 tokens
print(~12)   -- 3 tokens
print(-~12)  -- 4 tokens
print(~-12)  -- 5 tokens
print(~~12)  -- 4 tokens

?12    -- 2 tokens
?-12   -- 3 tokens
?~12   -- 2 tokens
?-~12  -- 3 tokens
?~-12  -- 4 tokens
?~~12  -- 3 tokens

Also this inconsistent behaviour with spaces:

print(-12)   -- 3 tokens
print(- 12)  -- 4 tokens
print(~12)   -- 3 tokens
print(~ 12)  -- 3 tokens
6 comments


I recently wrote a post about storing random data as strings in carts and studying the built-in compression algorithm. It led, among other conclusions, to the following two observations:

  • PICO-8 is not very good at compressing random strings that use more than 64 different characters; those get actually expanded by about logâ‚‚(n)/6. For instance a random string of length 1000 that uses 128 different characters will use 1000*logâ‚‚(128)/6 = 1167 bytes in the cart.
  • The new compression format is redundant and allows for sequences that are not needed. For instance 011 01111 001 and 010 0000001111 001 both encode a back reference of length 4 at offset -16.

Most other compression schemes have some sort of fallback mechanism when they are unable to compress a block. For instance the DEFLATE format (for zip or gzip) has non-compressed blocks. In the above thread I

[ Continue Reading.. ]

5 comments


I would like to propose the following syntax extensions to PICO-8 for symmetry with the shorthand peek operators. Basically it means treating the peek operators result as an lvalue:

@x = y     -- short for poke(x,y)
%x = y     -- short for poke2(x,y)
$x = y     -- short for poke4(x,y)

@x += z       -- short for poke(x, @x + z)
%12 |= %42    -- short for poke2(12, %12 | %42)
$x >><= 4     -- short for poke4(x, $x >>< 4)
4
6 comments


Cart #connect4x-1 | 2020-06-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

0 comments


Posted this in the discord, but decided it was worth a repost here. If you're new to binary math, this is a decent introduction of the concepts, and how you can use them in Pico-8.

Introduction to binary numbers

Numbers in pico-8 are stored in binary as 16.16 (32 bits, half above the decimal point, half below). A good way to visualize these numbers is like this:
... 128 64 32 16 8 4 2 1 . 1/2 1/4 1/8 1/16 ...

Thus, 1001.01 is how the number 9.25 actually looks in binary. To convert whole numbers, use your fingers and count powers of two until you hit the last one less than your number, then subtract that much from the number and repeat the process (so 47 is 32+8+4+2+1 == 101111).
pico-8 lets you type numbers as binary (0b101111) or hexadecimal (0x2f), but they're all the same as 47. Use whichever conversion method makes it easiest for you.

Negative numbers are a whole other thing involving two's complement (so -1 is 0b1111111111111111 in Pico-8, because then adding 1 to it makes it zero). Probably not worth mentioning if you're just starting out, but something to keep in mind.

[ Continue Reading.. ]

29
8 comments


Cart #spirographmaker-0 | 2020-06-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
10


Ever wanted to make a spirograph style thing?
I guess this works. 8 settings in a fancy menu!
The options:

[0x0]
Thickness:
Controls how thick the line is, from 0-10, with 0 being a single pixel dot.
[0x0]
Scale:
Controls how large the finished spirograph is, from 1-64.
[0x0]
Trail:
Controls the number of frames back that the trail extends (not effected by speed), ranging from 0-128.
[0x0]
Spread:
Controls how many points are drawn in the line, and ranges from 1-40.
[0x0]
Wiggle:
Controls how much the image is shifted by from 0-8.
[0x0]
Speed:
Makes everything faster, but otherwise doesnt do anything, Multiplying frames per second by -32 to 32.
[0x0]
Lines:
Increases amount of lines in range 1-16.
[0x0]
Pallete:
Changes colour of the lines to any one of 13 palletes.

10
2 comments


Cart #hasobibeko-1 | 2020-06-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

first game with pico8

Done during 8-bit to inifinity challenge,
kicked out in the end because i missed the theme.

It was my third and last gamejam on itch.io!

Any idea for a friendly gamejam are welcome...

4
2 comments


Cart #witchescape3-5 | 2021-09-26 | Code ▽ | Embed ▽ | No License
39

This game is finally done--enjoy!! I have a long list of ideas, including some good ones from player feedback, which I decided to discard. The game works, and the significant bugs are relatively rare. I decided to resist my addiction to refactoring code in the interest of, you know--actually finishing a project for once!

Here's some stuff I did NOT get to:

  • fixing a game-breaking bug where you will occasionally get stuck in the air after jumping on a pig. I couldn't consistently replicate the error or find the cause.
  • not a game-breaking bug, but it doesn't really make sense for the guards to whip you through doors or while you are standing behind them. oh well--it turned out to be too difficult to refactor this code.
  • additional spells, like flying horizontally on a broom or turning yourself into something.
  • various performance and code-cleaning optimizations

Thank you to everyone who played this game while it was in development and gave me feedback and encouragement!!

--

Revision 4 (final) released 9/26/21

  • added victory screen!!

Revision 3 released 9/12/21

  • swapped order of frog and pig spells
  • adjusted jump height of frog and pig spells; it should now be impossible to skip either spell
  • revised the map to accommodate these changes
  • minor bug fixes

Revision 2 released 8/1/20

  • Added title screen
  • Lots of refactoring that mostly doesn't affect gameplay
  • Gave it an actual name!

Revision 1 released 6/19/20

  • Added music and sound

--

Edit: Because people seemed to enjoy this game, I'm moving it to "work in progress" and now plan to actually finish it! I'm also adding some references to the end of this post for where I got some of the programming ideas from. (Unfortunately I haven't kept good records of everything, but I will update as I find sources.)

--

Hi everyone!

This is my first game. I made it a couple summers ago while I was funemployed. I had plans to make it more polished, but, well... I got a (non-programming) job lol. I finally decided to upload it as-is.

A couple programming highlights (which may actually be terrible; I'm not exactly a programmer):

  • pixel-by-pixel collisions checks (starting at line 847)
  • class inheritance system (starting at line 145)
  • algorithmically generated whip graphics, which tbh are a mess but were interesting to try and figure out (starting at line 1114)
  • map initiation: maps are drawn with a single brick tile, which is then replaced with the proper side and corner sprites as appropriate (starting at line 1221)

Let me know what you think!

--

[ Continue Reading.. ]

39
34 comments


The following operators cost 2 tokens instead of the usual 1 for compound assignment operators:

\=
^=
>><=
<<>=
..=

edit: I confused >>>= and ^= in my initial post.

1
0 comments


[sfx]

Something I noticed today while experimenting with PICO-8 sound effects: in 0.2.0i, if a silent (volume=0) row immediately before a non-silent row with an SFX instrument has the same SFX instrument as its instrument (e.g. if the user shift-clicked the SFX instrument to set the entire SFX to that instrument), even though the UI shows no difference, the program sometimes plays the SFX differently. (It looks like the effect lasts as long as the nominal length of the SFX instrument - 32 times its SPD.)

I assume this is a bug in how SFX instruments are implemented; if it's not, it strikes me as a bug in how the information is displayed.

4
1 comment


A basic implementation of the 15 puzzle game.

Cart #fifteen_puzzle-0 | 2020-06-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

5
0 comments


Cart #dinkyking-9 | 2021-01-12 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
26

CONTROLS:
X - start the game, or jump
Z - swing the scepter if you have it
Arrows - walk left and right, or climb up and down ladders

This is Dinky King, my homage to the original Donkey Kong arcade. You are the Dinky King! You must save the Queen from the Jealous Jester. Walk and climb with the arrow keys, and jump with X (x)! If you find the King's magic scepter, press O (z) to whack the Jester's balls right back at him! Or, just jump over the balls. The Queen dropped her stuff! Make sure to grab it for her on the way. Arrest that Jester! And if you can...topple him to his doom in the last level. Difficulty increases slightly each time you complete all four levels.

Nothin' fancy, just a cute little homage.

[ Continue Reading.. ]

26
7 comments


If you copy any text from outside of PICO-8 and paste it into PICO-8, it will show up as uppercase (or non-puny font) regardless of capitalization. I can see that being both a positive and negative in some instances, and in my case it wasn't. I propose that if puny font mode is ON then pasting will respect capitalization (which would actually be reverse capitalization because printh("@clip") and .p8 files store the puny font as capitals).

EDIT: Okay actually this problem also exists when you copy puny font characters using printh() too. This is breaking a few things with my system of saving level data using characters (and parsing them with ord().)
@zep I kindly ask you do something about this.

3
7 comments


I’m writing a minifier and I still can’t really wrap my head around the parser.

Here are two similar snippets that differ only in whitespace and do not do the same thing:

> for i=1,2 do
>  if(i)print(i) end
> print(3)
1
2
3
> for i=1,2 do
>  if(i)print(i) end print(3)
1
3
2
3
5 comments


Cart #mowupipafe-0 | 2020-06-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1


This is a simple angular physics program I used to get a grip on the trig functions in Pico8.

You can use the up and down arrow keys to increase/decrease the angular velocity of the red planet.

You can use the left and right arrow keys to change the physics variable being displayed.

If you have any questions feel free to ask, I'm not a physics expert but I'll help if I can.

1
0 comments


Cart #hemegayezo-0 | 2020-06-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

PICO-8 games are getting so hard these days...

This is a demo of an upcoming port of a Flash game called You Have To Burn The Rope. (I say "demo", but it's only missing the ending cinematic.) The game, according to its original creator, was made "to make fun of other games that limit the player's interaction by being easy, linear, or heavily controlled and jokingly ask at which point these games also cease to be games."

It's a really hard game. You have to burn the rope there.

2
1 comment


I'm making a force scrolling platformer as my first PICO-8 project.
TO DO:

  • Enemies
  • Attack with fish
  • Some stages
  • Title and stage start and finish screen
    Cart #penguin_run-0 | 2020-06-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
    2

2
1 comment


Cart #rabbictuary-1 | 2020-06-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
11


Hi all,
Firstly, i apologize for my weird english.
Secondly, i present myself, i am Lost In Code, i'm trying to learn game dev following online courses since March 2020.
I just wanted to share with you guys my latest tiny game, as i 've chosen to dev it on the awesome pico 8 !
This is my first post here, so please be kind if i did something wrong.

Rabbictuary ( short name for Rabbit Raiser in the Rabbictuary ) is a sequel to my last game : Rabbit Raiser.
You can learn more about me and my stuff on my itch.io account.

I did it as an exercise being a milestone in my learning, this one was about platformer.

It is a slightly difficult die and retry platformer, i've chosen to use half the screen to keep possibility to add up to 64 levels if desired ( there are 24 for now, feel free to add some, or maybe i will if the entire world claim for it ! ).

[ Continue Reading.. ]

11
11 comments


Since Pico-8 will import a graphic and adapt it to the default palette, seems like if someone has done poke(0x5f2e,1), it could simply adapt to the current palette? An external tool could be made, but it seems like it would be replicating what Pico-8 could probably do with little effort?

Hidden Palette people would really appreciate it!

Also, pretty please with sugar on top.

9
3 comments




Top    Load More Posts ->