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.
Example
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:
- Number of pixels coloured/number of pixels on screen
- Number of pixels coloured per frame (adjustable with Up/Down)
- 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:
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.
The zombies are trying to eat your brain! Grow a plant infantry to stop them!
(Warning: not very mobile-friendly!)
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
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.
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.
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!
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?
The decoration feature of PICO-8 v0.2.2 could also be useful to also draw dakuten / handakuten marks above the kana characters, rather than to the side of them, but sadly, since the current syntax only allows them to be shifted horizontally between -2 and 1 pixels.
Maybe it's worth it to adjust the "\v" character syntax so that it works differently after wide characters, or add a different one where the horizontal shifts use 3 bits instead of 2 (and allow for horizontal adjustments between -4 and 3 pixels?).
A little demo of a water sprite, inspired heavily by 7DRL game A Root Path. I wanted to see if I can replicate the art style and add some little glowy lightning effects to it.
Messing around with some collision detection. Up and down modify gravity, left and right push the ball in the corresponding direction.
Code is a mess, read at your own risk. Currently only handles static obstacles -- shouldn't be too hard to add once you know the contact point but didn't really feel the need, I've already had my fun with it :)