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 | Off-site
[ :: Read More :: ]
  • My own mandelbrot implementation
  • Half-finished
  • Working OK, but in a weird way
  • Nice color palette though
  • Arrows + z/x for zoom/dezoom

Cart #mepowatusu-0 | 2021-10-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

P#98521 2021-10-11 20:51
[ :: Read More :: ]

Hello all.
Can any of you clever folk make this code shorter?
It's bugging the life out of me but I don't know how to make it shorter though it looks like it can be.
Cheers.

    --p.c= n / 2 + 0.5 ?
    if (p.t/p.die<7/#p.c_table) p.c=4
    if (p.t/p.die<5/#p.c_table) p.c=3
    if (p.t/p.die<3/#p.c_table) p.c=2
    if (p.t/p.die<1/#p.c_table) p.c=1
P#98516 2021-10-11 18:13
[ :: Read More :: ]

Cart #lassehonnens_pwp_beta-8 | 2021-10-14 | Code ▽ | Embed ▽ | No License
5


The work is coming to an end. So is the world.
You awaken in a hospital infested with zombies.
Someone has left a pumpgun for you to try and make your way out alive.

Controls

Left and right: Move
Up and down: Enter and exit doors.
Z: Throw grenade
X: Shoot / melee attack when grabbed by a zombie.

P#98513 2021-10-11 17:27 ( Edited 2021-10-14 07:12)
[ :: Read More :: ]

KATAMAR1K

An homage to KATAMARI DAMACY for Pico8 in 1021 bytes for the #PICO1k jam

Cart #katamar1k-0 | 2021-10-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
11

Story

The King of all Cosmos was naughty again. He broke all the stars and sent you, the 5cm Prince, to earth with a Katamari ball to collect things of increasing size to build up a star and fix his mess

Controls

Use the LEFT and RIGHT arrows to steer the little Prince

Watch out! Things will fall off your Katamari ball if your try to collect something that is too big

Goal

Collect enough things with your Katamari ball to reach 64cm as fast as possible to please the King of all Cosmos.

Post a screenshot of your time on Twitter with the #PICO1k hash tag. Who knows, the King of all Cosmos might like it.

PICO1k jam and technical limits

This game was made for PICO1k jam where the goal is to make a cool game, tool or demo for the PICO8 fantasy console in 1024 bytes maximum without any music or sprites. Everything must be done with 1024 bytes of code.

🐄
🌏

P#98507 2021-10-11 16:01 ( Edited 2021-10-11 16:05)
[ :: Read More :: ]

Cart #boatbuoys-0 | 2021-10-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Simple boat game where you try to make it through all of the buoys to gain more points. You only can mess up 3 times before you've got to call it quits. Really easy at the beginning, but gets near impossible as the buoys start to appear closer and closer together. Good luck!

P#98504 2021-10-11 15:35
[ :: Read More :: ]

Hello again. I saw that someone was able to display Pico 8 on a CRT monitor, so I wanted to do the same. If you have any questions or want help getting Pico 8 to display on a CRT monitor, post down below and I can try to help. I was able to do this on a Pi Zero and a Pi 3b+. The hardest part of this project for me wasn't getting the display to work with my Pi 3b+, but USB audio not wanting to cooperate. I tried using the audio jack on my Pi, but it was interfering with the soldered wires I had. It all works now. This is officially my favorite way to play. Yes, playing on a handheld is cool and all, but Pico 8 looks amazing on a CRT.

P#98484 2021-10-11 01:34
[ :: Read More :: ]

Hi there, fellow PICO-8 lovers. Today I want to share something I've been working on a little bit here and there throughout the year, and ask for a little feedback.

Cart #tojenanoja-0 | 2021-10-10 | Code ▽ | Embed ▽ | No License
1

My endgoal for this text box is to be able to make decisions (2- or 3- options at most) and to add extra features, such as Zelda-like highlighting, chaining to another textbox (for conversation), and a page-break like feature to pace which lines get scrolled in. So far, I have a custom inset and outset animation with sound, per-letter sfx, a throbbing button indicator to advance, and clean removal from the objlist.

It's taken me quite a bit of trial and error to pull this off. If you know of ways to simplify my code while supporting all of the same features, please let me know!

The textbox is implemented in coroutines that run in parallel until certain conditions are met. This allows one to think of the phases of the textbox in terms of a Gannt chart.

This is the first time I've gotten something together that feels almost ready for production, so any tips or feedback are appreciated!

P#98479 2021-10-10 23:04
[ :: Read More :: ]

Cart #makhganu-0 | 2021-10-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

P#98463 2021-10-10 13:20
[ :: Read More :: ]

Cart #yofutitede-0 | 2021-10-10 | Code ▽ | Embed ▽ | No License
3

Extremely unfinished atm but I'd love some feedback. Right now it's endless but I'd like to integrate some sort of ending, originally I wanted a really elaborate final boss but I don't think I can do that within the token limit. If anyone has any ideas, I'd love to hear them!

Instructions:

Z to use subweapons when you get them
X to attack with whip

arrows to move

Get upgrades to your hearts (ammo for subweapons), your maximum life and the power/length of your whip, and then get to the exit!

I realize most sound effects etc. aren't there, but they will be if I ever finish the game.

P#98448 2021-10-10 00:16
[ :: Read More :: ]

Cart #enkrdn_defuse_001-0 | 2021-10-09 | Code ▽ | Embed ▽ | No License
8

Hello all, this is my first cart post but I've been enjoying PICO-8 for a couple years now.

I've been wanting to get this defusal game idea out of my head for a while now and I finally did it. Every game is a totally unique randomly generated scenario (my favorite kind!)

However, I think the game mechanics need some polishing because, while luck must be a crucial element, the game seems to be mostly luck regardless of any hints or deduction. I say this because after 100 games my win ratio was a solid 50%.

On the left side you have the 6 types of wires: disarm, decoy, time penalty, clock speed-up, clock freeze, and detonate. You occasionally receive random hints as to what type of wires are in the current device, and when you cut a wire it reveals the type of wire you cut as well.

On the right side you have the simplified interface for cutting wires, as the wires in the device in the middle can be difficult to see.

This game is playable but definitely not complete. There are a lot of things I could do with it, such as:

  • give the wires in the device meaning based on placement?
  • create levels of difficulty that affect what wire-type hints you get.
  • tune the algorithm to create more specific disarming scenarios.
  • find that balance between luck and logic

Enjoy! All feedback is welcome!

  • Enchiridion
P#98446 2021-10-09 22:24
[ :: Read More :: ]

Building on my previous ray casting toy I've been playing around with shadow casting.

Cart #difepoduko-1 | 2021-10-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Old (30fps):

New (60fps):

Most examples of this I've come across work with tiles/on a grid. This works with arbitrary line segments with the following caveat: the more line segments, the worse the performance. This example runs okay at 30fps but not so much at 60fps.

Most of my time seems to be lost in the actual casting of rays.

Things I plan to do but haven't done yet:

  1. Currently I'm casting two rays, slightly offset, towards every line segment's end-points (after removing duplicates so I'm not casting at the same point more than once.) I figure it shouldn't be too terribly difficult to modify it so a ray which hits a line's end-point is extended to the next wall instead of stopping. Then I'd only need one ray per end-point cutting my total number of rays in half.
  2. Culling the geometry before casting so instead of casting at everything, I only cast at everything within a visible radius. Bonus, that'll also make it easy to only cast in the direction the character is facing instead of casting in all directions.

I do sort things a few times and I'm using bubble sort because it was easy to implement but I'm sorting pretty short lists so I don't think it's a huge time sink.

Suggestions on how to optimize further are very welcome!

Edit:
Optimized a couple things:

  1. Made casting rays more efficient by in-lining the wall/ray intersection calculations.
  2. Made removing duplicates more efficient by using a set-like data structure.
  3. There are enough line segments/end-points that a more efficient search makes sense so threw together a (probably pretty bad) merge sort.

The new version has approximately the same CPU usage at 60fps that the old version had at 30fps. I'm sure some optimization wizards out there can help me squeeze some more out of this.

P#98442 2021-10-09 20:41 ( Edited 2021-10-10 20:30)
[ :: Read More :: ]

Cart #vomvomcastle-1 | 2021-10-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
25

The castle is yours - but first you must puke all over it!

Controls

Player 1
Left / Right: arrow keys
Jump: Z, N, C
Puke: X, V, M

Player 2
Left / Right: S, F
Jump: Left Shift, Tab
Puke: A, Q

Player 2 can join at any time by pressing the 2nd player jump or puke button.
2 players are not necessary to complete the game.

A dev-log for the game is here: https://twitter.com/st33d/status/1436396564046614529

P#98433 2021-10-09 13:45 ( Edited 2021-10-09 23:05)
[ :: Read More :: ]

Cart #standgame-6 | 2021-10-15 | Code ▽ | Embed ▽ | No License
14

Enjoy The Game. Share your High Score.

Another antigame/deconstruction, I guess.

P#98419 2021-10-09 03:46 ( Edited 2021-10-15 01:08)
[ :: Read More :: ]

Cart #tinyrogue-6 | 2021-11-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
16

Decided to use Pico8 to lay down the initial design work for an RPG designed for the Thumby which runs using the RP2040 chip. This means I have 264kb (actually probably 232kb) RAM to work with, about 1.5mb of disk space, and a 72x40 screen. So I restricted the display area and made use of poking in an 8x8 font to simulate a lot of the final look of the game.

Version 0.1a is just about pre-alpha, as you have an endless dungeon to explore (max size 10x10) but no victory condition quite yet. There is still a few bits and pieces to finish off, code to tidy up but it's coming along.

Version 0.2a is now pre-alpha. Added in graphical updates, hooked in most abilities, added in some more user feedback, balancing is faaaar from done yet. There are likely still be be some bugs floating around as I haven't gone through a complete bug test yet.

Version 0.3b is now beta. Should be feature complete (and down to about 120kb), win/loss conditions, all abilities in and coded. Slowly starting to work on balancing the game now and completing the last tweaks.

Version 0.4b is getting close to final build. Fixes up some more bugs, added new "dodge" passive ability, tweaked some things for balancing, added in list of enemies at the start of a fight.

Version 0.5b is pretty much the final build. Balancing is basically complete, audio (a single beep) has been added, finished off modding support (for Pico8 requires editing load_data section). All that's really left to do is refactoring the code to improve the structure of it rather than any other major changes.

Version 0.6b added might passive ability and tweaked a player to go with that. Found a few bugs which I've fixed (such as monster movement, monsters not casting spells etc). Last big change was refactoring the code to streamline some things. Code is still a bit messy but way better than it was before overall. Now on final testing before porting.

Version 1.0 made last few tweaks to the game before release

==Controls==

  • Arrow keys for menus or movement
  • Z/X to interact with menu (flashing element is current option to use)
  • Hold down Z/X for 1+ second to bring up item menu when outside of a fight

==Active ability==
These abilities can only be used during combat.

ID NAME         EFFECT
1. Fury         attacks number of times equal to level but decreases accuracy by 25%
2. Pray         random effect: cast known spells, heal 1hp/level, flee, nothing
3. Flee         allows user to escape to nearby cell without damage
4. Cast         allows user to cast known spells (!!not suitable spell effect!!)
5. Burn         damages all enemies for 1hp/level, *2 if single enemy
6. Drain        damages 1 enemy for 0.5hp/level (min. 1) and restores hp equal to damage to user
7. Void         damages all enemies for 0.5hp/level (min. 1), *2 if single enemy, and restores hp equal to damage to user
8. Shift        gain abilities/passives of random monster <= level until end of next fight
9. Heal         heals user for 2hp/level
10.Aura         attack that automatically hits for 0.75hp/level (min. 1)
11.Slay         damages 1 enemy for 9999hp

==Passive ability==
These abilities are used automatically when appropriate.

ID NAME         EFFECT
1. Resist       reduces all damage by 1 point
2. Regen        regenerate HP over time (automatic outside of combat)
3. Disarm       disarms any encountered traps
4. Learn        learn unknown spells from scrolls
5. Strike       increases accuracy of any attack by 50%
6. Immune       takes minimum damage (max. 1)
7. Dodge        decrease attackers accuracy by 33%
8. Might    increases all damage by 1 point

==Items==
Scrolls can only be used in combat, with no cost to hp, except if the player has the learn passive in which case the spell added to the players known spells. All items are consumed after use

ID NAME         EFFECT
1. Potion       heals user 2hp/level
2. Map          reveals map
3. Tools        disarms any traps
4. *xxxxx       scroll of the spell of the same name

==Spells==
All spells cost the caster 1hp to cast.

ID NAME         EFFECT  
1. Missile      same effect as the ability "smite"
2. Bless        same effect as the ability "pray"
3. Blink        same effect as the ability "flee"
4. Fireball     same effect as the ability "burn"
5. Siphon       same effect as the ability "drain"
6. Vortex       same effect as the ability "void"
7. Reshape      same effect as the ability "shift"
8. Heal         same effect as the ability "heal"
9. Holy         same effect as the ability "fury"
10.Slay         same effect as the ability "slay"
P#98405 2021-10-08 21:11 ( Edited 2021-11-22 22:01)
[ :: Read More :: ]

Cart #defenderexample-0 | 2021-10-08 | Code ▽ | Embed ▽ | No License
7

This is a tutorial cartridge for making a defender clone in pico8.

Features :

  • Seamless wrapping.

  • Player's controls and camera movements.

  • Enemy's shooting AI on the seamlessly wrapped area.

  • Pixel perfect sprite-based collision.

  • Checking if the object is within the screen or not.

  • Scanner.
P#98377 2021-10-08 10:25
[ :: Read More :: ]

Cart #rhythmfrog-1 | 2021-10-08 | Code ▽ | Embed ▽ | No License
21


This is a one-button rhythm game made as a present to our teammate Kyle (@kylelabriola on twitter) for his birthday.
It was done on around ~14 hours, including learning how to use PICO-8, which by the way, it's really good.

Enjoy!

Credits:

  • Hafiz Azman: Design + Music
  • Giacomo Preciado: Programming + Art

We are all part of 7th Beat Games

P#98375 2021-10-08 07:21 ( Edited 2021-12-21 18:58)
[ :: Read More :: ]

I just found out that you can turn a specific sprite into the icon for the binary export: https://www.lexaloffle.com/dl/docs/pico-8_manual.html#Binary_Applications_ and whoa, this is really great! But afaict it's restricted to the standard palette. Is there some way to set a custom palette for the icon in the export? If not, adding some sort of palette flag might be a nice feature:

EXPORT -I 32 -C 12 -Z 0,132,4,140,134,6,135,7,8,137,139,11,138,130,13,131 MYGAME.BIN

or maybe reuse the -C flag, and a -1 entry means transparent?

EXPORT -I 32 -C 0,132,4,140,134,6,135,7,8,137,139,11,-1,130,13,131 MYGAME.BIN

(although that might be a bit awkward because using pal(12,-1,1) ingame means to map 12->0x8F, not 12->transparent...)

P#98352 2021-10-07 20:06
[ :: Read More :: ]

I have a couple of token count reducer functions:

function poke_map(loopx,loopy,offsetx,offsety)
    poke(0x5f38,loopx)
    poke(0x5f39,loopy)
    poke(0x5f3a,offsetx)
    poke(0x5f3b,offsety)
end

function unpack_split(s)
    return unpack(split(s))
end

As of 0.2.3, the latter one of these, especially when combined with the former, as in

poke_map(unpack_split"4,4,64,32")

has started to cause some weird behaviour in cases where cpu usage is high (around 80% or 90%).

The most obvious symptom is that actions triggered by a simple global timer (i.e. t += 1 in _update60()) start to occur prematurely when the unpack_split() function is called repeatedly in successive _draw() calls.

P#98347 2021-10-07 18:19 ( Edited 2021-10-07 18:25)
[ :: Read More :: ]

Cart #deep_impact-4 | 2021-10-09 | Code ▽ | Embed ▽ | No License
2

0.12

first game created
i am a newbie coder.

it s a simple arcade game where you have to shoot some kind of meteor to survive
hope you ll have some fun

thanks

Pouranat

update 9/10/21:
correct some bugs
update 8/10/21:
change button to shoot

P#98345 2021-10-07 18:13 ( Edited 2021-10-09 05:49)
[ :: Read More :: ]

Cart #name_dialog_snippet-0 | 2021-10-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

This is my attempt to implement an RPG-style name entry dialog, which should be helpful for others as well.

It doesn't use any sprites or map elements, so its code should be easily usable in other cartridges.

You can use this code according to the CC-BY-SA-NC 4.0 license, as is default, or according to the MIT license below:

Copyright © 2021 /dev/urandom

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

P#98326 2021-10-07 12:36
View Older Posts