This is a game I've been coding for a bit, Linecraft! This is my first and biggest demake (though I've been working in other non-published projects before) so I'm very excited that other people will try it!
Also, I'll keep it updated, so if you find any bug, leave it down below on the comments! I'll check them out and fix them in the following versions.
The sounds and music were made by Munchkin (thank you :D) and the code and graphics were made by me.
Thanks to kallanreed for his tline rotation function I used for the splash text in the game.
Thanks to Felice for their implementation of the OpenSimplex noise generator on PICO-8 that I used for the world generation in the game. The code may look a little different in my cart, but that's due to changes in development (back when I thought this game could be made in a single cart!).
Thanks to shiftalow for their 140-token trifill function, fast and very light!
So have fun playing it! I hope you like it :)
(mouse support is funky when playing on website, so you might need to click on the game screen every time you load a world or save it)
WARNING IF PLAYING ON WEBSITE: Your worlds will get deleted once you reload the page/close it. Export your worlds by selecting your world, going to the options menu and clicking "Export World". It will send the world data to your clipboard. Mobile players cannot press CTRL-C to allow the copy to go through, so sadly they cannot preserve any worlds they save.
Features
Version Log



this is so sick how did you even make this also the fact that this is playable on mobile makes it even more impressive but its very hard to play xd
anyways i found gold and lapis but i couldnt find diamonds :(



It took me a year of pain to code it all together since I kept running out of tokens (literally the game cart is pure gibberish from how optimized I had to make it) this game pretty much goes over every limit set in pico-8, but I guess in the end it was possible lol
Also yeah, playing with buttons is kinda hard since there's not a lot of them, I tried making the best combination to be the most comfortable but there isn't much I could do, it will always be finicky to play, and pure hell to fight a mob lol. You can always change the layout in the settings if you want to, if you found a more comfortable setting



Me: "Why's the ground in the sky? and what's this pole thing doing h- oh wait it's a tree" 🤣
So far I managed to craft a workbench, make stone tools, make a tiny house on a hill, slay my first zombie + chicken + pig + sheep, and run away from my first skeleton. This is an amazing demake.



The second I enter a world while using the pico-8 app, keyboard and mouse support seems to stop working. I'm facing directly down and can't rotate the camera at all, with mouse or arrow keys. I can walk forwards and backwards but that's about it. If I pause then I can't use the mouse to select any buttons and if I use arrow keys, the cursor jumps all the way to the corners of the screen.



ooooggll I think that is an issue with mouse configuration... Going to the mouse settings and fiddling with the sensitivities should fix that up.



Good to see this project being released!
Excellent work and polish.
note: got a bug where I'd insta-die on a new level I just reloaded.



Hi freds :) thank you, I will look into that too. I might do an update soon just to fix all the broken stuff.



Awesome game, tryna play form release day so I can have the oldest world 😇 (I’m in a cave mining away)



Found a small bug, seems like it might be an overflow issue. Only seems to happen standing at this angle.
.gif)



Oh that's funny, it's indeed an overflow bug! One side of a block highlighter is getting rendered at one end the number limit (32767) and the other side of it is getting rendered at the other end of the number limit (-32768). I don't know how to fix it, as it requires remaking some stuff from my renderer and highlight system... I might fix it in the future, though it might stay with us for a bit :P (also I should've mentioned it in the post, but you can increase the render distance! it's by going to the options > video settings)
EDIT: Fixed this issue! And a whole lot of other issues.



This is why I love pico-8. I'm surprised you even got fluid mechanics in there and mobs too. Fantastic job and I'm having fun with this!



Can you use the player 2 controls as a way to have extra buttons? It would make it a whole lot easier because my devkit mouse does not work



Well I wanted to, but then I got told it would break compatibility with mobile and handheld console users, since they only allow one player support. I could maybe add it as an optional feature but that would need a rewrite on the game cart which would require even more tokens, and a launcher rewrite too which just looks like too much work for the small chance that people have two-player button support but not devkit



Are you playing on the BBS that you have that issue? On the BBS devkit is broken, as it uses mouse delta which isn't supported on web, but if it's on another platform I'd like to see which one just so I can try to fix it.



would it be possible for you to share all of the p8 files for this? i kinda wanna try it on a few consoles i have that can emulate pico 8



Sure! I'm making an update to the game so when I publish it, I'll give you an offline version of it
EDIT: Done! Download these files from the BBS and save them to a folder. The files must have these names:
Version 1.7:
- #linecraftoffline-0 → linecraft.p8
- #linecraftoffline_devkitgame-0 → wdevkit.p8
- #linecraftoffline_buttongame-0 → wbutton.p8
- #linecraftoffline_compdecomp-0 → wcomp.p8
EDIT 2: Oh I forgot to upload the 2.0 version! Here it is.
Version 2.0:
- #linecraftoffline-1 → linecraft.p8
- #linecraftoffline_devkitgame-1 → wdevkit.p8
- #linecraftoffline_buttongame-1 → wbutton.p8
- #linecraftoffline_compdecomp-1 → wcomp.p8
- #linecraftoffline_polygame-0 → wpoly.p8
Version 2.1:
- #linecraftoffline-2 → linecraft.p8
- #linecraftoffline_devkitgame-2 → wdevkit.p8
- #linecraftoffline_buttongame-2 → wbutton.p8
- #linecraftoffline_compdecomp-2 → wcomp.p8
- #linecraftoffline_polygame-1 → wpoly.p8
- #linecraftoffline_polybutton-0 → wpolybutton.p8
Version 2.2:
- #linecraftoffline-4 → linecraft.p8
- #linecraftoffline_devkitgame-5 → wdevkit.p8
- #linecraftoffline_buttongame-5 → wbutton.p8
- #linecraftoffline_compdecomp-4 → wcomp.p8
- #linecraftoffline_polygame-4 → wpoly.p8
- #linecraftoffline_polybutton-3 → wpolybutton.p8



A Minecraft port with no Sniffer?? What's even the point?!
jk this is the most impressive Pico-8 game I've ever played. The movement physics feel surprisingly close to the real deal. I found diamonds and built a house and fell in lava. Good game :)



This is really awesome- one question; how do I make the blocks solid like in the GIF in the post?



On the title screen, go to Options -> Video Settings and click on "Render: Lines" so it toggles to "Render: Polygons". Careful, because it's devkit-only! If you only have buttons, you'll softlock once you load the world because you can't control anything, not even the mouse :/
EDIT: Now no longer the case on 2.1! The polygon renderer is the default option and also it supports both buttons and devkit.



For playing this in 60fps i need an so good computer.... but well, at least i like this sooo much ;)



na_, a lot of determination and free time. The game was first a line renderer that I built up from. I added a 3d table, then made the renderer read from it, then added the player breaking and placing blocks, and then began optimizing tokens, adding features, optimizing tokens, adding features. Then the game also has a small interpreter inside to cram in more code without using up more tokens. You can see the bytecode if you stop the cart while ingame and click on the spritesheet, on the 2nd, 3rd and 4th page. The first page looks like bytecode aswell but nope it just stores other stuff.
Bottom line, it's just optimizing tokens and seeing what features you can add from the original game. That's about how it went. It was a bit of a pain to make, ngl.



Starylax, yeah lol my laptop can't hit 60fps as well so I have to test my code on my pc to not have bugs on the game regarding the speed of things



This is the best thing I've seen here. There's one thing I've seen on POOM (pico8 doom) that I'd like to see here. On mobile in POOM you have normal buttons like up, down, left, right, X and O, but also additional left and right buttons which I believe is from the second player. You can use that if you want as it will make it way better.



Thank you for the kind comment! About the buttons... I could, but still I want the game to be run on handhelds which I don't think they have two player button support.



How do you brake blocks! It's like impossiblr also I'M ON A LAPTOP



it's not letting import my world i have the code in a text file and i pasted it but it dosen't work also i'm a bit bad at spelling



pizzagame321, the game detects if you used buttons or mouse/keyboard, so if you used buttons while creating a world, it will make you use buttons ingame. You can see which one it chooses depending on what cursor you have, if you have the + symbol you are about to enter the game with button layout, if you have a pointer it's gonna give you mouse & keyboard support. Try to wiggle the mouse and/or click the enter world button with your mouse so it correctly sends you ingame with mouse and keyboard.
But anyway, while using buttons you can break blocks by pressing the O button plus left and the O button plus right to place blocks. I should show a little manual on how to do stuff while using buttons, it can be a bit difficult.



masonthecool12314, can you give me the world to see what's wrong with it? Though before you send it, try to import it again, but remove any spaces or line breaks from the copied text, those could be messing it up. They could make the game reject the import, iirc the first letters that should be in the copy are _[00]_ if there is anything before it, the game will not recognize it.



It's amazing to see something that moves to this extent!
I'm also thrilled that I was able to help out (with trifill).
Out of curiosity, I'm going to try my hand at token and string compression.
I'll tweak it enough to test improvements to the button settings.
2025-03-12
2025-03-14
This is a work in progress.

I secured a token and edited the button system.
It's now possible to add combinations where the operation (rawkey) differs depending on which button was pressed first, even when pressing simultaneously.

This will allow even more operations to be covered.
(I'm not sure yet if this is easy to do...)
Main edits



Man that's really awesome! I love the idea of which button was pressed first, though I gotta be honest I can't exactly wrap my head around what it does perfectly well, but if it lets the played do more actions, then it's cool. If I see what optimization the token compressor does to shave off those tokens, I'd be down to add it to the game to fit the new button input, because I know the current one on my game is pretty janky. I'm the dev; I've played the game hundreds of times, yet sometimes I still drop items while I jump, because jumping and walking forwards at the same time triggers the item drop button combination :P
Also I gotta say thank you for the trifill function, it was really really helpful and it was the reason there are polygons in the game. I tried turning the game into polygons as far back as the first update but I just couldn't find an optimized enough trifill, then I found yours on a bbs thread and I was blown away. Thank you.
(By the way, I find it amazing that you were able to read my code and 1. Figure out what it does and 2. Succesfully edit it. I do have the habit of writing spaghetti code haha)



I'll share what I have done so far.
As part of our plan to secure more tokens, the hardcoding of split and uplit could be made into one-token global variables, and uplit could eventually be removed.
linecraft.p8
0x5e48-0x5e57
is now the primary button setting area.- Addr3 for the primary button is included in the key settings.
- The order is ignored button, pressed buttons, primary button.
- The condition range for
resetdefault()
has been changed to0x5e58-0x5edf
.
wpolybutton.p8
- Token acquisition (stringification and data templating)
- Added
htbl(), cat(), tbfill()
- Split block vertex data and color & fillp data
- Re-reference color & fillp data
- Added
- Reflect primary button settings in getkey processing.
- Depends oldbtn determination on
rawkey "16"
(simultaneous press jumps were not possible)
Changed default actions (^ is the primary button, must be pressed first)
The cartdata ID for this version is maz_linecraftoffline_2_2_a_data
- Player left / Right ◯^ + Left / Right - Camera up / down ◯^ + Up / Down - Mine Block / Attack ✕^ + Down - Place / Interact ✕^ + Up - Throw Item Down^ + ◯ + ✕ - Crowch Up^ + ✕ - Jump / Swim / Fly Up^ + ◯ |
Well, this isn't enough. Jumping and crouching especially don't work very well.
You'll need to make sure you press the primary key with the button neutral.



That's really cool! I like that system for buttons. Careful with changing some variables to locals though, I'm not on my computer to test right now but iirc changing the "items" variable to local will crash the game once you interact with a bed or sapling. Will look into it further once I go to my computer
EDIT: Yeah, the interpreted code tries to index the global variable "items" which is nil since it can't read a local variable

EDIT 2: Man, there are some good optimizations here! I didn't know count(table) would return the number of values the table holds, and that it would throw a nil if the argument isn't a table. you used it to check if a variable is a table, that's really cool! I'll try to implement that makeblock function you made too, it's really good for optimizing tokens, though I'll make it so the function sets the block table directly to the "blocks" variable, so this doesn't happen that seems to waste tokens a bit.

Also I'll try to optimize the functions you made (like htbl, cat and tbfill), and maybe remake them a bit because some feel like they focus more on readibility than optimizing tokens/compressed, unless there is some underlying reason as to why that I didn't see while scrolling, reading the code.
Man, with these optimizations I'm starting to think it's time for an update! I'm a bit burnt out atm due to some other projects so maybe in a week something flourishes. This is really awesome what you did, thank you :)
EDIT 3: Oh, I forgot to talk about the button system. I like it!
I'd say though that if we have the vertical keys for left click and right click I'd say up = left click and down = right click, instead of the down = left click and up = right click that you had originally. At least for me, that I began playing for the first time with this new system, it felt a bit awkward for left click to be down. I dunno, maybe I'm just overthinking the buttons, if I got used to them maybe I wouldn't bat an eye to that config.
I also looove that you managed to fix my really dumb up + O to drop the item, it was quite a cursed configuration! you jump and there's a chance that you drop your sword mid combat. Now that's X+O and down as the primary button, it's almost impossible to hit it unless the player somehow tries to open the inventory while walking backwards which of course is such a weird and rare case, there's no need to worry.
Also, you mentioned the player not being able to hold the jump key, that was due to an issue with my previous button configuration, where if you wanted to scroll the hotbar to the right/left, you would jump many times over since the player would press X and the left/right button, and every time they release the dpad the game would detect an X button which is jump and as a result you'd jump in place many times over while scrolling the hotbar. With this configuration this issue would be gone. So yes, I kinda duct-taped a solution. I might be deleting that duct-tape that I made to let the player hold the jump button combination.
Something I see a bit difficult (which to be fair my previous button code didn't do as well) was jumping while walking, to let the player do parkour. You can do it with your code, but you stop running since the game detects that you stopped pressing the walk forwards key. Also, I'd love for the player to be able to crowch and walk... maybe with a different button combination it would be possible! But then again, my original function didn't do any of this so I'm not holding this against your button code.
Overall, really awesome and solid button code and config! I think I'll add that to the game, if you don't mind 👀



I'm glad you found it positive.
I really overlooked the items
thing!
I've seen that error before and couldn't reproduce it... 😅
Also, I may have overlooked a slight difference when putting together the same pattern in the vertex data of many blocks.
The design of the blocks may have changed.
I understand and agree that your intention for the default control settings is "left click and right click".
My intention was "Place blocks in the direction of travel/take them in the back, upload-download etc...".
As an exception, I decided to assign item drop to the down key so that it doesn't juggle.
By the way, if you have the time, I think you could move at a more advanced level if you had a system where you could maintain crouching by tapping twice (tap again to release).
Although I haven't encountered a situation where I need that yet!😶🌫️



I think if the player wants to build a bridge for example, the player can't crowch and build at the same time and it could become a bit difficult not to fall off and get damaged. I'll make it so the player can toggle crowching, tap once for enabling, tap again for disabling. With the free 40-ish tokens I'd be able to add that easily.
Also about the left click/right click, wouldn't it be so if you want to say, break a line of blocks in front of you, you'd press up to go forwards too? like, break, go forward, break, go forward. Then for placing a line of blocks, it's place, go backwards, place, go backwards, etc? Maybe I misunderstood what you said.
Honestly I don't mind the blocks having a slightly different pattern as long as it looks similar to the item displays.
Anyway, I'm feeling a bit inspired now and I have some free time so I might start applying these features to my dev carts to see if there's more to squeeze the pico-8 interpreter for tokens :) maybe I could add a new feature too, I had scratched some ideas in the past due to token issues



wELL UH...

I gave it a shot optimizing it...
I guess there's a lot of stuff that I can add now! A lot of stuff. I don't even know what to add now lmao, I'll see what I can add that still makes the game feel like minecraft alpha. I wonder if lighting effects could be done. Only bad thing about this is that it took me 5 hours of constant writing to remake the block model data, now I'll need yet another 5 hours for the wireframe version of the game. I guess it'll be worth it!
I don't think you know this but I was slowing down development into the game because it just felt like I couldn't optimize the game further. My last major optimization was only 180 tokens, now it's 443 tokens that you saved!! That's a GIANT NUMBER!! I can't thank you enough! You pretty much saved this project from not getting updated any longer!! Thank you soooo, so much!!!!! I'll add this optimization to the credits I'll tell ya that :) <3



Superb!!
The results far exceeded my expectations.
Oh yeah, I'm looking forward to the implementation of lighting! It reminds me of the time when I was really looking forward to the early Minecraft updates.
By the way, the code for line mode and poly mode has a lot in common. What do you think about putting them in the same cart at this point? (I think it will be line drawing that references the vertices of tri.)



I don't think merging both renderers would be a good idea, each one has its own set of differences, like water bobbing up and down on the wireframe version and also the fact that wireframe doesn't translate well to the vertices, the lines on every block actually have its own patterns that could be considered textures to make it easier to differenciate, like two diagonal lines for grass and a sorta grey "broken glass" outline for cobblestone. So I would be forced to add data for the lines and that'd add a lot of tokens. I prefer to use the tokens for cool features. I'll see if lighting could be possible, on the polygon version.



Do you know how I could make this run on my Miyoo Mini? It has a Pico-8 emulator installed already. Could you walk me through the steps on how to add this brilliant game to my Pico-8 library on my Miyoo Mini?



Sure! You can download the offline game on one of my comments before this one, the ones saying "drive link" and showing many versions, it's a patched version to work outside of the bbs. Though, I don't know much of Miyoo Mini, so I don't know if it fully supports this game, I hope it does! The game takes advantage of a lot of undocumented features to save on tokens, like poke() returning 0 or the function holdframe() for example. If the emulator is 100% accurate, like almost a port, it can run it. If it doesn't, I could try to patch the latest version so it runs a bit better, though some things could be removed to free up tokens.



So, do I put all the files from linecraft 2.2 on my card, or just linecraft.p8?
BTW, the emulator the Miyoo Mini uses for Pico-8 is Fake-8 I don't know if that affects anything, just putting it out there.
[Please log in to post a comment]