Log In  

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

Hello,

I am having trouble try to create a function that will allow me to press a button to start the music playing then press the same button to stop the same music from playing.

Thanks for any help,

Brian

1 comment


Reading or modifying any value in the frame advance debugger will cause any glyph values to reset to their defaults.

Example cart (requires editor):

Cart #fisk_glyph_bug-0 | 2020-07-07 | Code ▽ | Embed ▽ | No License
1

1
0 comments


Cart #fighty_long_legs-0 | 2020-07-07 | Code ▽ | Embed ▽ | No License
16

Introduction

In FIGHTY LONG LEGS, players take on the role of small blobs that wants to be the champion of stretching. To do that they need to knock each other out from the arena. The more damage you have taken, the easier is for you to be knocked out so be careful. Also attacking too much will send you into a fatigue state were you can't attack anymore so keep in track of your stamina is crucial to win. When no hearts are left one victor will emerge!

To make this more interesting powerups will spawn during the match. I won't spoil what happens when you pick them up though!

You can play this game both by yourself or with a friend/nemesis.

[ Continue Reading.. ]

16
4 comments


Cart #dont_shit_your_pants-4 | 2020-07-07 | Code ▽ | Embed ▽ | No License
11


A port of the classic flash game Don't Shit Your Pants! by Decade Studios, now Cellar Door Games:
https://cellardoorgames.com/our-games/dont-shit-your-pants/

I was reminded of this old game the other day, and after seeing a few demakes recently, I decided to have a go at porting it.

I'm pretty happy with the result, I tried to get everything as accurate as I can to the original, including some weird behaviours. The colours are pretty far off, because even with the extended palette, PICO-8 just doesn't have hideous enough colours to match the original.

Also while I managed to get the intro and success music pretty accurate, I haven't managed to find a nice match for the fail jingle yet, so the current version is my first simpler attempt. If anyone wants to help I'd be grateful for the help.

[ Continue Reading.. ]

11
6 comments


Here is a simple implementation of merge sort in 97 tokens. It uses less PICO-8 CPU than anything else I’ve tried (with a caveat, see below).

A small benchmark comparing CPU usage, sorting an array of 200 random numbers:

Note that non-randomised quicksort suffers from very bad performance on quasi sorted lists, so the above benchmark does not represent what you would get in real life. Always test in your own application.

function sort(t, a, b)
    local a, b = a or 1, b or #t
    if (a >= b) return
    local m = (a + b) \ 2
    local j, k = a, m + 1
    sort(t, a, m)
    sort(t, k, b)
    local v = { unpack(t) }
    for i = a, b do
        if (k > b or j <= m and v[j] <= v[k]) t[i] = v[j] j += 1 else t[i] = v[k] k += 1
    end
end

[ Continue Reading.. ]

8
8 comments


Week - 4 - Taking Damage and UI
https://www.reddit.com/r/roguelikedev/comments/hmn5tb/week_4_parts_6_7_combat_damage_and_building_the/

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

Check out that bottom orc!

Implemented Pathfinding using a fill function instead of A star like the tutorial called for. (158 tokens for fill)
Might bite me later, felt like A star would be too many tokens, will try to find an imp I can borrow.

Edit:

  • Finished part 6 & 7!
  • Can now die / kill monsters
  • fill pathfinding too slow for larger maps, capped the max cost of the fill alg to speed it up.
2
3 comments


If you export a cartridge to binary multiple times without deleting the output, the files end up duplicated in the ZIP files with the same filenames.

1
2 comments


Cart #ghoulsatemyclassmates-0 | 2020-07-06 | Code ▽ | Embed ▽ | No License
2

Hello!
just started with pico8, and played around with it.. this is (at the moment) just something to get used to the API. There's a function in there, that might be interesting for some of you, though. It prints a string with different colors per scanline.

function _draw()
 cls()
 cprint("colored text",nil,20, {7,11,3})
 cprint("pass nil for x to center",nil,30, {12,6,13})

 cprint("press ❎ to start",nil,80,{9,10,9})
end

function cprint(txt,x,y,cols)
 local len,org=#txt*4+4,clip() 
 local a
 x=x and x or 64-len/2
 for a=1,3 do
  print(txt,x,y,cols[a])	
  clip(x,y+a*2,len,2)
 end
 clip(org)
end

[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=78976#p)
2
0 comments


Holding Shift or S to select several sprites only seems to properly select them all when one starts on the top left sprite they are selecting.

While actions such as copying, flipping, and moving work properly when selecting from the top left, it appears that when starting at a different corner it instead treats the selection as if only the initial tile was selected instead. This creates particularly odd effects when at levels of zoom besides 1x:

0 comments


Noticed some presumably unintended odd behavior in the sprite editor:

It seems that any time the selected region is flipped while not over its initial position, pixels are changed underneath it. Using version 0.2.1b on a Mac.

Edit: I will note that something like this seems like it could actually be somewhat useful behavior, as it lets one duplicate an already selected area within a sprite without having to copy and deselect it, but it's pretty odd right now. For example:

Noticed another oddity with moving selected regions while testing this: if one has copied a group of pixels, then selecting a region, pasting with CTRL-V, and moving the selected region will cause the pasted pixels to disappear.

The map editor also appears to be having some similar issues:

1
0 comments


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

0 comments


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

Hello there this is my first project in Pico-8. I always thought it would be fun to attempt to make a simple calculator for myself. the '=' button performs clear screen operations for now though maybe I can update it later with a proper dedicated button. anyway I hope you all like my little project!

1
3 comments


I was testing out various PICO-8 cartridges in the new version, including my own Rain Gif cart, and I discovered that when I chose the built-in "Save Gif" option, it would report that a GIF was saved to the desktop:

...but no file would appear.

On further testing, I discovered that on manually saving an image, it throws an error:

I'm not sure why this would happen - I've already checked whitelisting PICO-8 in my virus checker and that changes nothing. (And besides, I can save files and use the audio exporter just fine.) I'm running Windows 7 (yes, I know...) and installed PICO-8 yesterday using the installer download.

1
14 comments


I'm loving PICO-8 with one exception: I'm not crazy about Lua. I've read the Lua documentation for OOP, but the table thing is so different and I can't find examples for what I'm trying to do.

I'm almost finished something I'm working on, but the larger the program gets the more I miss being able to separate the logic into objects (the way I'm used to anyway).

Long story short, I wanted to do the following:

Entity Class:

  • x, y, width, height, speed, etc
  • function update()
  • function draw()

Player Class(that inherits from the entity class):

  • score, weapon, power, etc
  • function update(overrides but calls super function from entity)
  • function draw(same)

Enemy Class(that inherits from the entity class):

  • extra variables
  • overridden functions calling super functions Entity class

SpecialEnemy Class(that inherits from Enemy/and then from Entity obviously)

  • extra variables
  • overridden functions calling super functions from Enemy class

[ Continue Reading.. ]

6 comments


In my qsort() thread:

https://www.lexaloffle.com/bbs/?tid=38679

If you click the "Code" button on the embedded cart and scroll down to qsort() or iqsort(), you'll see a line near the top of each function that says, if l then, but the line inside the cart is actually if l<r then, so if anyone grabs the code for the function, they get a corrupted version of it.

I'm guessing this, and possibly other, reserved HTML elements are not being escaped properly...?

1 comment


(recommended: use with PICO-8 0.2.1b or later)

This function can be used to convert binary strings into a format that can be pasted into source code. Binary strings contain all characters from chr(0)..chr(255) and as such include unprintable / unstorable characters. escape_binary_str() adds the needed escape codes and stores the remaining characters as-is. For example character 10 becomes \n and character 0 becomes \0, or \000 when followed by a number (to avoid ambiguity).

This is useful for storing dense binary data efficently (e.g. compressed with PX9). If you are storing structured data in code (like a raw image), it will likely be easier and almost as efficient to store them as a bunch of hexadecimal characters.

function escape_binary_str(s)
 local out=""
 for i=1,#s do
  local c  = sub(s,i,i)
  local nc = ord(s,i+1)
  local pr = (nc and nc>=48 and nc<=57) and "00" or ""
  local v=c
  if(c=="\"") v="\\\""
  if(c=="\\") v="\\\\"
  if(ord(c)==0) v="\\"..pr.."0"
  if(ord(c)==10) v="\\n"
  if(ord(c)==13) v="\\r"
  out..= v
 end
 return out
end

[ Continue Reading.. ]

56
17 comments


Cart #necromancers_tower-2 | 2020-07-09 | Code ▽ | Embed ▽ | No License
2

Alright so, the earlier "draft" of this game was pretty bland. I decided to go ahead and just do the game I had originally intended, before I chickened out. Now, you play as the necro-janitor, and it is your job to incinerate the excess undead created by the Necromancers' Guild.

It isn't done (I want to integrate two more enemy types, some items, and use vector shapes for the flames) but it's in a good place to show others now.

let me know what you think!

2
6 comments


This is perhaps a bit off topic, or maybe not.

I just deployed a rough, first version of an online pixelart drawing app: https://pixla.nu/?ps=DyIAIQESCSIBIIICIRILIoEgAg8iACENIgACNiIBAAACCyIAIAF3AHALIgAHAncAAgoihAcAcAcCCiKEBwBwBwIKIgAHAncAAgoihAdwAHcCCiKDIHAAcAsigyB4gHALIgAHAXcAcAUiBBEAEAJ3AHALEQIAAAF_EUUR

It's meant to be limited in features, a little bit like pico-8 actually. The canvas size is fixed to 32x32, and the palette is fixed to the (original) pico-8 palette. Left button draws, right button picks up the color under the mouse.

Perhaps the most special thing is that the pixels are saved in the URL, so the images can be saved by simply bookmarking the page. The links are also easily shared on social media, and the preview includes the image.

If it's not clear from the screenshot, I can't draw. So I hope some people with some pixel art skills will find the tool fun and useful. Please try it out, and let me know of any problems or feature requests you might have!

[ Continue Reading.. ]

3
1 comment


Bolygone Explorer

Cart #bolygoneexplorer-0 | 2020-07-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

Doc

Comments

Learning Pico8 here is my first cardridge.

Idea comes from an old book about computer & graphics : Graphisme Scientifique sur Micro Ordinateur by Robert DONY (1986)

5
0 comments


Hi all,

In preparation for an upcoming game jam, I've quickly recreated Cannonhead Clash, an Atari 2600 homebrew game that I first published almost a year ago. This version has quite a bit missing (no menus, no AI opponent, etc) but I hope you enjoy it regardless.

This game is a two player game where you try to hit the opponent with one of your bombs. By holding down either button, you charge your shot- the longer the charge, the further the bomb goes. Your bombs can destroy terrain, too, so keep that in mind!

Cart #yenatmusi-1 | 2020-07-05 | Code ▽ | Embed ▽ | No License
7

If you'd like to see the original 2600 version you can find it here.

Changelog:
Version 2.0:

  • Added title screen

[ Continue Reading.. ]

7
2 comments




Top    Load More Posts ->