Log In  
BBS > Lexaloffle Community Superblog
This is a combined feed of all Lexaloffle user blogs. For Lexaloffle-related news, see @zep's blog.

All | Following | PICO-8 | Voxatron | General :: [Thread List]

[sfx]

All the Giant Steps I could fit in a single Pico-8 cart. Includes three choruses of Coltrane's solo :)

P#65256 2019-06-18 13:52

Cart [#corruption_race-1#] | Code | 2019-06-18 | No License | Embed

There are many carts on here that involve corruptions of existing games, but as far as I can tell this is something new: a game designed to corrupt itself from the start! Whether this makes for good gameplay is for you to decide. Spikes increase the rate of corruption, so you should probably avoid them. Go fast, and try to reach the end before the corruption takes over everything. You'll want to reset the cart if that happens. Good luck!

I haven't made this game alone, because it's my second on pico-8 and I'm a bit lazy. The biggest help came from @mhughson's Advanced Micro Platformer, which formed the base of the whole game. Without it, this game wouldn't have really been possible (or at least wouldn't have been as good), so big thanks to @mhughson for releasing it! The music is "Dimensional Gate" from @Gruber's Pico-8 Tunes Vol. 2, which fit the game very well and added one of the best consequences of corruption where the music goes all weird. I also used @qbicfeet's horizontal distortion effect, which triggers (for no good reason) when a randomly-selected byte gets corrupted. Finally, I took inspiration from Jelpi's corrupt mode, but altered its corruption code to be more like the "RANDOMTILT" mode from the Real Time Corruptor (also an inspiration for this game). RANDOMTILT has a chance of simply incrementing or decrementing ("tilting") a byte instead of setting it completely randomly, making for slightly nicer corruptions.

P#65249 2019-06-18 09:35

Cart [#rocket_rivals-0#] | Code | 2019-06-17 | License: CC4-BY-NC-SA | Embed
1

Rocket Rivals, a one-button multiplayer game of brinkmanship.

Your button controls your thrust. You earn points for being higher than the other players, but you lose everything if you hit the top of the screen.

Each match lasts one minute.

Players 1 and 2 use different buttons on the same controller, as do players three and four.

You can choose the player characters on the title screen (at the moment only controller 1 navigates the menu).

There is still a lot of polish to do: graphical effects, background scenery, music, sound effects, help screen, control config, etc. But the core game is playable.

P#65247 2019-06-17 23:08 ( Edited 2019-06-18 07:25)

Cart [#slimeyjump-1#] | Code | 2019-06-17 | License: CC4-BY-NC-SA | Embed
5

Slimey, Jump! Is a tiny one-button platformer game with 28 levels and 4 bosses.
It's meant to be a simple but challenging game that everyone can enjoy, regardless of their skill level!

I hope you have fun and thank you for playing!

FEATURING:
28 handcrafted levels
4 bosses with unique dialogue
10 optional coins for those who like a challenge
Story about buying a cake
Short (~35 min)

Music & SFX by @Bibiki (he helped me a lot! thank you so much!)

P#65244 2019-06-17 15:07

Cart [#dooart_pathfinding-0#] | Code | 2019-06-16 | License: CC4-BY-NC-SA | Embed

I couldn't find any pathfinding example for pico-8 that could be used for non-grid movement, so I took this one and built on top it.

The necessity came when I started writing a game that had fluid movement inside a grid map (so rather than moving one tile at a time, the characters move one pixel at a time). Even with a tile-based map system, the collisions still had to be checked again for every pixel.

This cart visually shows how the pathfinding works:

  • Yellow squares: path found with the grid pathfinding.
  • White line: path to the next grid tile, found with the pixel pathfinding.

You can move one of the characters using the arrows. By pressing X, you can enable/disable the visualization.

Tiles: https://thkaspar.itch.io/micro-tileset-overworld-dungeon


The strategy is:

  1. Use A* at a tile grid level for long-distance pathfinding to find the shortest path to the target.
  2. Get the closest tile to the character from the shortest path.
  3. Use A* again at a pixel level to find the pixel path to that tile.

Of course it'd be possible to use A* at a pixel level for the whole path, but pico-8 limitations would be hit pretty quickly on a large map with many characters.

I thought I'd post it here to help the next person who needs something similar.

P#65235 2019-06-16 22:26 ( Edited 2019-06-17 00:07)

Cart [#stereogram-0#] | Code | 2019-06-16 | License: CC4-BY-NC-SA | Embed

This cart allows you to create simple "Magic Eye"-style stereograms: 3D images hidden inside a field of seemingly random dots.

Create stereograms by drawing a depth map. This is a picture where different colours signify different distances from the object to the camera. When you're finished, select "make stereogram" to turn your depth map into a stereogram.

These stereograms are designed for parallel viewing. Relax your eyes and allow them to diverge, as if looking through the screen at something much farther away. The two black dots at the bottom of the picture should become three dots, with the middle one in focus. Then the hidden 3d image will emerge. If you're having trouble seeing the pictures, you can search online for "how to view stereograms" for lots of detailed explanations.

The algorithm for creating the stereograms comes from Inglis, S., Thimbleby, H., Witten, I.H. (1994) Displaying 3D Images: Algorithms for Single-Image Random-Dot Stereograms, IEEE Computer, 27(10), pp.38-48.

P#65233 2019-06-16 22:05

Cart [#menojumagu-1#] | Code | 2019-06-16 | License: CC4-BY-NC-SA | Embed
2

Scaled text without any lost cartridge/screen data? At last we have it, and to that I say:

[sfx]

Everything you need to start scaling your text is in tab 0 of this cart. If you don't feel like looking at the cart, just copy-paste these fully-commented, fully-optimized routines you see here:

function mcpy(dest,src)
 --because poke4() is so
 --relatively fast, it actually
 --outperforms memcpy(). the
 --print_big() function abuses
 --this very much.
 for i=0,319,4 do
  poke4(dest+i,peek4(src+i))
 end
end

function print_big(text,x,y,col,factor)
 --set aside the palette values
 --of black and "col" for later
 --somewhere in user ram
 poke(0x4580,peek(0x5f00+col))
 poke2(0x4581,peek2(0x5f00))
 --oh yeah, same with camera
 poke4(0x4583,peek4(0x5f28))
 --and fillp
 poke2(0x4587,peek2(0x5f31))
 poke(0x4589,peek(0x5f33))
 --set "col" color to "col"
 --& "col" transparency to off
 poke(0x5f00+col,col)
 --if "col" is black, then we
 --will instead draw black text
 --on a dark blue background.
 --so if "col" is black, then
 --dark blue is transparent and
 --black is not transparent.
 --but if "col" is not black,
 --vice versa.
 poke2(0x5f00,col==0 and 0x1100 or 0x0110)
 --copy the first 5 scanlines
 --of the spritesheet to yet
 --another place in user ram
 mcpy(0x4440,0x0)
 --copy the first 5 scanlines
 --of the screen to that part
 --of the spritesheet we just
 --backed up
 mcpy(0x0,0x6000)
 --print the text normally over
 --the background of the right
 --color (black or dark blue)
 camera()
 fillp(0)
 rectfill(0,0,127,4,(16-peek(0x5f00))*0x0.1)
 print(text,0,0,col)
 --copy the first 5 scanlines
 --of this text to still
 --another place in user ram
 mcpy(0x4300,0x6000)
 --copy the spritesheet screen
 --backup back to the screen
 mcpy(0x6000,0x0)
 --now the screen is intact.
 --copy the text to the first 5
 --scanlines of the spritesheet
 mcpy(0x0,0x4300)
 --display the text at the
 --desired scale
 camera(peek2(0x4583),peek2(0x4585))
 sspr(0,0,128,5,x,y,128*factor,5*factor)
 --copy the userram spritesheet
 --backup back to the sheet
 mcpy(0x0,0x4440)
 --restore our backups of the
 --previous palette values
 poke(0x5f00+col,peek(0x4580))
 poke2(0x5f00,peek2(0x4581))
 fillp(peek2(0x4587)+peek(0x4589)*0x.8)
end
P#65232 2019-06-16 17:02 ( Edited 2019-06-16 23:35)

Cart [#gdiahaze-3#] | Code | 2019-06-18 | No License | Embed

Hi!

Greyknurl Diahaze is a tile-based puzzle and treasure-collecting game with nine large levels. There's stuff to read and experiment with and a mysterious little story that unfolds along the way. It doesn't really entirely make sense, but that's part of the point! Don't get discouraged - most of the levels have multiple angles of approach, depending on the clothes you pick before the first level begins!

Cursor keys to move, (O) to reset the level. (O) is assumed to be Z.

Thanks for checking this out! If you liked the game, share your high score!

(three fixes:
1.3

  • unbroke the digging tool stats

1.2

  • stat bonuses are now retained
  • resetting the score counter on start, too!

1.1

  • removing "Demo Version" from the label
  • resetting the level counter on start)
P#65227 2019-06-16 03:01 ( Edited 2019-06-18 11:11)

Cart [#road_rex-0#] | Code | 2019-06-15 | No License | Embed
2

ROAD REX
After a day's work Road Rex just wants to get home like everyone else. Road Rex is a giant dinosaur with laser eye beams.

Get home as fast as you can! Beat your arch-rival, the quick and messy Blue Dinosaur (tm). Stop tv traffic choppers from getting footage of the mayhem you cause. Try not to get a speeding ticket from a speed camera (speed limit is 70mph in the UK) - but if you do, make sure you do it in style for extra points. Shove cars out the way and spill delicious lorry loads of kebabs, shoes and beans. Try to exit the motorway in the left lane and don't get lost!

Controls

Arrow keys right and left - accelerate and decelerate
Arrow keys up and down - switch lanes, aim lasers
X - LASERS
Z/C - charge jump (release to jump)
Credits

By Ben Jones (Powersaurus on Twitter)

P#65223 2019-06-15 21:54

Cart [#atributetomule-0#] | Code | 2019-06-15 | License: CC4-BY-NC-SA | Embed

I converted an older LowRes Coder program to PICO-8.

It's a tribute to one of the most clever 8 bit games ever made: M.U.L.E.

P#65221 2019-06-15 18:34 ( Edited 2019-06-15 18:35)

If you are on linux you can use firejail to launch PICO-8 sandboxed. That way PICO-8 cannot access all your files, only those in its directory and its configuration directory.

I assume that you have the PICO-8 binaries in ~/pico-8 and that you are using the default config directory ~/.lexaloffle

I also assume that you are saving screenshots in the ~/pico-8 directory and not on your Desktop. To do that you need to edit the "desktop_path" line in your ~/.lexaloffle/pico-8/config.txt to be like this:

desktop_path /home/username/pico-8/screenshots/

Replace "username" with your actual Linux username for the rest of this post.

Now, install firejail from your repositories (sudo apt install firejail) or download a newer version from their website (up to you)

Create a file called pico8.profile in ~/.config/firejail

Put the following in this file:

include default.local

include globals.local

noblacklist ${HOME}/.lexaloffle
noblacklist ${HOME}/pico-8

include disable-common.inc
include disable-devel.inc
include disable-interpreters.inc
include disable-programs.inc

whitelist ${HOME}/.lexaloffle
whitelist ${HOME}/pico-8

include whitelist-common.inc
include whitelist-var-common.inc

apparmor
caps.keep sys_chroot,sys_admin
netfilter
nodbus
nodvd
nogroups
notv
?BROWSER_DISABLE_U2F: nou2f
shell none

disable-mnt
private-dev
private-tmp

#noexec ${HOME}
noexec /tmp

Then you can lunch pico like this from its directory:

firejail pico8

Or, assuming you use MATE, you can create a file in /home/username/.local/share/applications/ with any filename (as long as the extension is ".desktop" I suppose) and these contents:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon=/home/username/pico-8/lexaloffle-pico8.png
Icon[en_US]=/home/username/pico-8/lexaloffle-pico8.png
Name[en_US]=PICO-8
Exec=firejail /home/username/pico-8/pico8
Name=PICO-8

and now you will have a menu shortcut to start

The desktop file may work with other desktop environments. If not you can always use the menu editor that comes with your distro. The important part is making sure that you are executing firejail with the full path to pico8 as an argument.

To verify that you are running pico8 in the proper sandbox you can open a console and try to start it up by running

firejail /home/username/pico-8/pico8

You should see something like:

Reading profile /home/username/.config/firejail/pico8.profile

I will try to make the sandbox even tighter in the future.

P#65219 2019-06-15 11:53 ( Edited 2019-06-15 11:53)

Cart [#last_exit_brexit-0#] | Code | 2019-06-15 | No License | Embed

P#65218 2019-06-15 10:58

Cart [#torchance-0#] | Code | 2019-06-15 | License: CC4-BY-NC-SA | Embed

P#65217 2019-06-15 10:53 ( Edited 2019-06-15 11:00)

Cart [#colour_illusion-1#] | Code | 2019-06-15 | License: CC4-BY-NC-SA | Embed
1

Each ball is drawn in the same colour (brown) but it appears red, green or blue depending on which colour stripes are drawn over it.

Inspired by an image shared on twitter. (See https://twitter.com/testingham/status/1139558284631789568)

I thought i'd see if pico-8 can create the illusion even with its limited palette. The answer is: yes it can! :-)

And unlike an image, in pico-8 you can read the source code to confirm the illusion acts as stated.

P#65215 2019-06-15 08:52 ( Edited 2019-06-17 07:05)

Put PICO-8 directory at /home/pi/ either via SSH then unzip, or manually by putting MicroSD in a computer and copying the files over.

RetroPi Pico8 Tutorial

Scroll down to the part about Launching PICO-8 from EmulationStation (about halfway down)

Follow these instructions through terminal (quit EmulationStation) and a Bluetooth Keyboard. Should work through SSH if that is your thing.

THEN, you need to run:

sudo apt-get install wiringpi

Start EmulationStation back up and you should have a launch option for PICO-8. Sound and Controls and Everything worked for me after that :)

P#65209 2019-06-15 05:25

Cart [#mb_arcademechanics-0#] | Code | 2019-06-14 | License: CC4-BY-NC-SA | Embed
1

This was a slide deck I made for a mini workshop I gave on arcade mechanics at a PIGSquad Summer Slow Jams event last night. (Following in the footsteps of @nextlevelbanana, I used a Nintendo controller as a clicker. 😄) Feel free to use the code for your own presentations.

P#65201 2019-06-14 19:01

Cart [#hypno-0#] | Code | 2019-06-14 | No License | Embed

IT DOESN'T WORK YET ON PURPOSE, BUT WILL BE FIXED SOON!

Today, while playing with the default settings on the CLI on Windows, I found a series of colors that I started to really like. So, what does that have to do with this?

Basically, when this cartridge is done, it's going to be a lot of things: but PICO-8 is going to serve as the first star, and from then on, sadly, I believe I will have to write a program of my own. Unless I find a way to display more than the 16 colors - and that's the only reason why.

I have written a program in python that allows one to select any color they see, from anywhere at any time, or simply play around with them til the find one on their own. Then I pipe that on over to a modified form of lua - the Aseprite variety actually.

(I'M ALSO WRITING A SYNTAX HIGHLIGHTER FOR THE ASEPRITE API AND I WOULD LOVE SOME ASSISTANCE IF ANYONE OUT THERE WANTS TO HELP OUT! Its for ST3!)

The aseprite script I have allows one to load a palette from existing .gpl or .pal (which aren't technically supported anymore) files and make use of them in a project, or export them in a wizard-like manner for easy sharing and storage. (IE, it will ask how large you want each square to be, then the max width and length and try its best to make it work within your parameters, if it can't it will suggest the next best thing.) The script can also make a single sprite strip from nothing, and it can be initialized from many places in many ways. Aseprite, Python, Lua, and even Pico-8 with some AHK in there.

In any case, I would love to work on this with a single partner, 2 at the most. If interested, please get back to me! You can reach me here or at my home in Merveilles.

[email protected]

P#65195 2019-06-14 16:16 ( Edited 2019-06-14 16:17)

I’m trying to print text centred around a point.

At the moment my code offsets the x coordinate by half the width
of a string in pixels, calculated as (4* #s)-1.

This works fine for
alphanumeric text but is wrong when the text contains glyphs.

Is there a built in function to help achieve this?

Or do I need to examine every character when computing the pixel width of the text?

P#65194 2019-06-14 15:12 ( Edited 2019-06-14 15:12)

Is there a way to make a hi hat sound in pico 8?

P#65183 2019-06-14 00:59 ( Edited 2019-06-14 01:00)

Cart [#fruitdrop-0#] | Code | 2019-06-13 | No License | Embed

I followed a Nerdy Teachers tutorial and make this! https://nerdyteachers.com/Explain/FruitDrop/
Catch all of the fruit but not the unhealthy stuff!
Have fun!

P#65181 2019-06-13 16:52 ( Edited 2019-06-13 18:59)
View Older Posts
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-06-18 16:32 | 0.219s | 4194k | Q:198