Log In  

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

A question about dialogue boxes!

I'm new to both coding and Pico so bear with me, maybe there's no right answer but would appreciate suggestions.

Say you have a standard type of RPG game with a character who moves, and you approach or talk to an NPC, triggering a dialogue box on top of what's already on the screen (just like any old pokemon or dragon quest game). What would be an efficient way to do this? Load a new scene but don't clear the screen? Disable the player character's movement and actions while a list of text cycles through?

I've made a clunky textbox function (see image) but there must be a better way.

Any ideas or links to successful examples would be great.

Thanks in advance to anyone who answers!

1
4 comments


Cart #sussy-0 | 2021-04-02 | Code ▽ | Embed ▽ | No License
8

I hope nobody presses X

8
4 comments


Cart #happy_bee_time-0 | 2021-04-03 | Code ▽ | Embed ▽ | No License
28

~Happy Bee Time~

Hi! I'm Taffy, and this is my first published Pico-8 game Happy Bee Time!
This is a randomly generated bee simulator where you just try to get as many bees as you can.
You explore by either buying tiles yourself for honey or letting the bees explore themselves.
Once you have enough honey, you can find a tree and get even more beeeeees!
I would like to add more to it in the future, though it will take some time before I do.
This was a very fun project to work with, and I am very happy with the pixel art and where
my programming skills with Pico-8 are going. I have learned a lot, and I hope you guys like it!

Controls:

  • 🔼🔽◀️▶️: movement

[ Continue Reading.. ]

28
10 comments


Cart #frlytweetningow-4 | 2021-04-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Random fireflies that procedurally syncs up in 270 Chr, not bad for a first tweetcart i guess?
Ctrl+r to start again

the code:

s,r,c=sin,rnd,pset p={}
for i=0,200 do p[i] = {}
for j=1,3 do p[i][j] = r(128)-64 end
end::_:: cls()for i=0,200 do for j=1,2 do po=p[i]
p[i][j]=(po[j]+r(2)-1)%128 end
po[3]+=(po[3]>p[flr(r(50))+1][3])and -0.1 or 0.1
c(po[1],po[2],1+s((po[3]/64)*t())%11)
end flip()goto _
1
0 comments



Cart #caroline-0 | 2021-04-02 | Code ▽ | Embed ▽ | No License
104

A Portal demake disguised as a Celeste Classic mod.

Note: This is not a demo, if anything were to make you think so. 👀

Controls

E + S + D + F - Move
Left Mouse Button - Fire Blue Portal
Right Mouse Button - Fire Orange Portal
A or Middle Mouse Button - Clear Portals

by Meep and Lord SNEK

Music by RubyRed

104
36 comments


Cart #tetrachess_ver4-0 | 2021-04-05 | Code ▽ | Embed ▽ | No License
18

Is it Tetris, or maybe chess? Kind of both, but actually neither. Nonetheless, this is a game about strategy and sacrifice, borrowing notes from both Tetris and chess.

Tetrachess is a puzzle game in which your goal is to capture the AI opponent's chess pieces using your own chess pieces, following chess rules. However, the board is not like in chess at all. You have to drop Tetris blocks (tetriminos) containing the opposing chess pieces to the playfield. After you have dropped a tetrimino, it's time to move your chess pieces. You can capture the opposing chess pieces, earning you points, or you can eat the garbage blocks, cleaning up the playfield. After your own turn, the opponent moves their own chess pieces, potentially capturing yours.

[ Continue Reading.. ]

18
5 comments


Example

Cart #coroutine_bug-6 | 2021-04-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Controls

Up/Down - change number of pixels drawn per frame by 20

Steps to reproduce

Write a program that runs nested coroutines when the frame end takes place.

Resulting and expected behavior

All coroutines except from the top one yield().

It's expected that coroutines resume normal work after frame end.

Example explanation

It's a program supposed to color the whole screen generating coordinates to color with a recursive coroutine (tab 2, "coroutine itself"). It is wrapped by a function that ensures all errors will be propagated and unwraps the output when no error is encountered (tab 1, "coroutine wrapper").

In pseudo code:

function coroutine(depth)
    if (depth == 0) yield{0,0} return

    c = cocreate(coroutine)
    x,y = wrap(c, depth - 1)  -- a wrapper around coresume

    while x do                -- this assumes that if x is nil then the coroutine
        yield{x,y}            -- has reached a return or end.
        x,y = wrap(c)
    end

    c = cocreate(coroutine)
    x,y = wrap(c, depth - 1)

    while x do
        yield shifted {x,y}
        x,y = wrap(c)
    end
end

Info written on screen:

  1. Number of pixels coloured/number of pixels on screen
  2. Number of pixels coloured per frame (adjustable with Up/Down)
  3. Number of calls to subroutines of certain depth/expected number of calls

Failed workarounds

Adding a global table to hold recursive coroutines changes nothing.

Working workarounds

Limit the number of coroutine calls per frame with flip() outside the coroutines.


A wrapper that catches the nil yield and checks if the coroutine is dead. Doesn't work on coroutines that are supposed to yeld() or yield(nil)

WARNING! Skipps some coroutine outputs if flip() is called.

old_coresume = coresume
function coresume(c, ...)
    flag, out = old_coresume(c,...)
    if not flag or out != nil or costatus(c) == 'dead' then
        return flag, out  -- coroutine raised an error, yielded a non-nil value or finished
    else
        return coresume(c) -- resume from the unexpected yield()
    end
end

The example using an equivalent wrapper:


Cart #coroutine_bug-9 | 2021-04-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1


1
15 comments


Cart #idkgame-0 | 2021-04-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

0 comments


Cart #glide-1 | 2021-05-26 | Code ▽ | Embed ▽ | No License
8

A game I made a little while back, but haven't posted here until now.

Glide through a wavy cavern with up and down. There are two gamemodes, an Endless Mode and a Sprint mode. There's also four color palettes. Enjoy!

Update (May 26, 2021)- A two-player multiplayer mode has been added.

8
1 comment




The zombies are trying to eat your brain! Grow a plant infantry to stop them!
(Warning: not very mobile-friendly!)

Cart #fsgupicozombiegarden121-0 | 2021-04-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
418

A demake of the first world of the original Plants vs. Zombies.
10 levels, 8 different plants, 5 different zombies, 3 complete songs!
I couldn't fit the two mini-games on it, sadly.

My buddy @Gimbernau and I gave ourselves 30 days to do this entire thing, and what a ride it was. Because of the token limit, I decided not to put instructions inside the game, so there's a "How to play" section down below.

I hope you enjoy! If you have some thoughts about the game or if you find any bugs, please leave a comment in the comment section :)

PS.: There is another version of PvZ here in the forum! It's an endless reinplementation made by @gfcarstensen that is super fun! Check it out here: https://www.lexaloffle.com/bbs/?pid=51588#p

How to Play and Plant Stats

[hidden]

Zombies are coming!
Don't let them get to the end of your lawn.
Stop them by planting some seeds! And if they do get there, there's a lawnmower to stop them on their first attempt.

Gather sun by left-clicking on them.
Use your sun to buy plants!

Left-click on the plant you want to buy and then left-click once again (don't drag and drop!) on a tile to drop your plant. Right-click if you want to de-select your plant.
Each plant has a different power to help you crush the zombies. And everyday you get through, you get a new plant!

If you have your shovel unlocked, you can use it to dig plants off your lawn and free up some space! Left-click on your shovel and left-click again on the tile you want to dig. Right click to de-select the shovel.

The Plants:

Peashooter

Your first plant. Shoots peas at zombies that are on its lane.
Fast recharge

Sunflower

Produces additional sun every 24 seconds.
Fast recharge

Cherry Bomb

Explodes a second after it is planted. Kills any zombies in a 3x3 area centered on it.
Very slow recharge

Wall-nut

What a team player! Serves as a living shield, absorbing an enormous amount of damage.
Slow recharge

Potato Mine

Takes 15 seconds to set up. Once ready, explodes and kills a zombie on contact.
Slow recharge

Snowpea

Shoots freezing peas that also do damage. If a zombie is frozen, its velocity and damage are halved.
Fast recharge

Chomper

Eats an incoming zombie right away, but spends 42 seconds chewing. Rotten flesh isn't a joke...
Fast recharge

Repeater

Shoots regular peas, but twice as fast!
Fast recharge

[ Continue Reading.. ]

418
56 comments


Cart #voxelspace-0 | 2021-04-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

Came across this fun little algorithm today, thought I'd try it out.

Left and right rotate the camera, up moves forward.

Some serious artifacts going on still, but I'm fairly happy with how simple it was to implement. Had some fun generating the maps as well.

5
1 comment


Hi, here's a cover of Board of Canada's Roygbiv in Pico-8 (with its new sound effects) playing over a tweetcart synced to the music. Because, well, I love BoC and Pico-8 :). Also playing in pattern mode on YouTube where you may also enjoy the original music.
You can play the tweetcart along your own Pico-8 music and it'll sync to it as well. Or it'll play at its own pace if there' no music.
Hope you'll enjoy.

Cart #boc_roygbiv-0 | 2021-04-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
78

78
13 comments


Cart #roundelieadventure2-2 | 2021-05-05 | Code ▽ | Embed ▽ | No License
16

16
11 comments


Cart #three_d_space_sim-0 | 2021-04-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

full 3d space flight simulator in PICO-8

controls

roll - x/c
pitch - up/down (not inverted)
yaw - left/right

unfortunately the area you can explore is not very big in v1.0 and you can continue to fly out of bounds. Once you reach the edge of the stars, just turn around.

go on to explore the stars!

0 comments


Is it possible to trigger a glitch reset from code, like CTRL+R looks? I know there are code snippets that do small pokes to memory, but I was wondering if there's a way to make it closer to (or exactly!) like how CTRL+R.

Thanks!

5 comments


Help Toby play "The Floor is LAVA"

Cart #the_floor_is_lava-1 | 2021-03-31 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

5
4 comments


Cart #cargobot-0 | 2021-03-30 | Code ▽ | Embed ▽ | No License
12

Here is my Pico-8 version of Cargobot. It was an iPad game from 2012 developed on an Ipad.

Cargobot is a puzzle game where the player commands a robot to sort crates.
If you stock the crates too high the robot will crash.
The robot will also crash into the side of the wall when the incorrect instructions are given.

There are 7 categories (tutorials, easy, medium, hard, crazy, impossible, bonus) with 40 levels in total.

Each level can be solved in many ways.
The goal is to earn 3 stars for each level by solving the level in as few registers as possible.

The earned stars are saved in cdata.
The progress made per level (implemented actions, conditions) is saved in cstore.

The speed of the robot can be configured in the menu. Where you also can find a hint per level.

If you find a solution with less registers as indicated in the level select screen, you can always post a screenshot here.

Have fun!

12
1 comment


I've lately been working with image compression routines which output strings, and I've been able to increase efficiency and versatility by using as wide a range of characters to store data as possible. I've grown a bit frustrated at times, though, because any strings which use Puny font characters don't show up correctly unless I go into Puny Font mode. There have been a number of times I couldn't get things to work, and spent time debugging my code, only to realize that the problem was that I forgot to press Ctrl+P.

I know it's not a big issue, and it can be worked around, but it's kind of inconsistent how strings can be created with Puny characters at any time, but you have to enter a certain mode to view the output correctly. Is it possible this could be changed without breaking some other feature? I mean, is there any way to let the program know that a string has been created by Pico-8 and therefore display it as intended?

6
6 comments




Top    Load More Posts ->