My entry for LD46 (Compo)! Created in 48 hours from scratch, mostly as an excuse to mess about with tline and the new pico8 version!
Delve into some ancient ruins following a mysterious voice, but watch out for the encroaching darkness! Keep your torch lit via passing flames and reaching checkpoints as you descend deeper. Avoid spikes, watch out for dowsing waterfalls, master difficult platforming and discover the ancient secret within!
Fairly tricky platforming, so congratulations if you manage to reach the end! Your time will be displayed on completion too if y'fancy speedrunning it!
Controls:
- Arrow keys: Movement
- Z: Jump, Start game
I was tinkering with the custom key repeat settings in 0x5f5c and 0x5f5d and I realized that they always seem to be expressed in 30ths of a second. Shouldn't this depend on whether or not the game has _update60(), or for games with custom loops, whether or not they've called _set_fps(60)?
I guess it's not a critical problem if it stays this way, it just seems like it ought to track the fps setting.
I was excited by the new tline function in 0.2.0, immediately tried to plug it into my project and ran into problems.
I made this demo to break down rotating the map to a fairly minimal program. I've added comments to explain the different data points and what they achieve when plugged into tline.
The demo shows a rotated 2D view into the map.
Left and right keys move the view. X toggles the unrotated map to show the direction of the rotated view relative to the map.
I hope this is useful to you! :)
Hey @zep, me again. ;)
I looked through the rather comprehensive list at https://rosettacode.org/wiki/Bitwise_operations and couldn't spot anyone at all who had an operator for rotation, let alone find some kind of standard for it. Most languages use either a function or a textual operator (e.g. a ror b), but those end up making your expressions a lot larger and/or filled with whitespace.
WE COULD BE THE ONES TO SET THE STANDARD! :D
I'll just propose a few ideas. Note that I bring the "|" operator into some of them because normally people have to do rotates by or'ing together two shifted values.
rotl rotr ---------- ---------- a <<<< b a >>>> b a <<> b a <>> b -- I like these best, personally a >|> b a <|< b a |>> b a <<| b a >>| b a |<< b |
I like <<> and <>> because they imply that part of the shift wraps back around. I also find them aesthetically pleasing.
This game is just a test.
Please run it to see if Cart Two will load Cart 1.
This is a test for another game I am working on.
Code
--cart two and cart 1 --by candycolt games function _draw() cls() map(0,0) print("loading cart 1...",54,44,7) end function _update() if time()>2.5 then load"#cart 1-2" end end |
Cart 1 is at: https://www.lexaloffle.com/bbs/?tid=37447
Conclusion
Test 1
Okay, This did not work apparently. If you know how to load a cart in another cart please comment it below. Thanks!
Test 2:
IT WORKS!!!!!!
This game is just a test.
Please run it to see if Cart 1 will load Cart Two.
This is a test for another game I am working on.
Code
--cart 1 and cart two --by candycolt games function _draw() cls() map(0,0) print("loading cart two...",54,44,7) end function _update() if time()>2.5 then load"#cart two-2" end end |
Cart Two is at https://www.lexaloffle.com/bbs/?tid=37448
Conclusion
Test 1:
Okay, This did not work apparently. If you know how to load a cart in another cart please comment it below. Thanks!
Test 2:
IT WORKS!!!!!!
Hit a strange bug tonight in trying to compare some values.
Ultimately, I was being told that 0 != 0 (apparently).
In digging in further, I can reproduce the problem in one line.
> print(8.5333-3.7667-4.7667) -0 |
I understand that there can be rounding issues, but -0 is not such a useful return value I think.
Edit: Another strange occurrence
I'm doing time profiling on functions in my code. Call time() at the beginning and end of a test and subtract the results.
In the test, I received 37.4667 - 35.6333 = 1.8333
but if I just ask Pico-8 to compute that in the console I get the proper 1.8334
I was going through my old posts, gleefully marking bug after bug "resolved" (THANKS ZEP!:D), and ran across one I hadn't actually posted in the support section.
I know the chat section sees a lot of traffic and moves quickly, so I'm worried it was never seen, and I want to try posting it again in the right section, in hopes of seeing it added to 0.2.0 or a later version:
I'm trying to write a tool that has text editing, and I find that the devkit keyboard doesn't return a lot of the special keys that it easily could.
You're returning a string, so there's no reason why it has to be just one character. So pressing the Home key could simply return the string "home". No need for special characters, escape sequences, etc., since these verbose names would all be distinct from any single regular typed character.
I'm mainly thinking of the standard navigation cluster: up, down, left, right, ins, del, home, end, pgup, pgdn, but I'm sure there are others.
I made a tiny plugin that lets Tiled load .p8 cartridges, edit the map section, and save them back without breaking the code or other sections. Works great for me, so I hope you may find it interesting!
Available on GitHub: https://github.com/samhocevar/tiled-pico8
Here is what it looks like with a dark theme and the grid color set to white:
Update 2021/02/20: The plugin was ported to JavaScript for compatibility with all OSes. Requires a preview version of Tiled (1.5.0) for now.
On Windows, when launching a cart that uses #include, all included files get locked forever and cannot be deleted or modified by an external program unless PICO-8 is stopped. Even if another cart is loaded, the old files are still locked. This makes it really hard to work with source control because no file can be updated or merged while PICO-8 is running.
Edit: here is a screenshot of resmon.exe showing that pico8.exe acquires a new file descriptor on the same file each time I press Ctrl-R:
Wanted to take a stab at creating blackjack in pico-8. This was surprisingly more complicated than I thought it'd be 😅. Anyhow, from what I've tested it's pretty much there despite some weirdness that might come up in scenarios where you're splitting your hand. If you do give it a spin, feel free to lmk what you think.
Cheers,
l4nk332