Log In  
Follow
wallgraffiti
Follow

I sometimes make small games. Pico-8 is my heaven and modding is my stairway.

So, as shown in my previous two posts, I'm making an operating system for Pico-8 called P8OS.
I am making it so that Z, closest to the window/whatever key, activates the app menu, and X, right next to it activates the task menu, where you can see which windows/programs are active. I need to check for both of them every frame. Shortened down to the problematic code, here is where it goes wrong:

function btnk(k)
  local p=stat(30)and stat(31)
  if k!=nil then
    if(p==k)return true
    if(p!=k)return false
  else
    return p
  end
end
if(btnk('z'))inmenu=not inmenu
if(btnk('x'))intask=not intask

It will not detect pressing X unless Z is pressed in the same frame, which is even more confusing.
Clearly something has gone desperately wrong somewhere in this code. I just can't pinpoint what.

P.S. Keep in mind that if you want to reproduce this you will need to call poke(24365,1) or equivalents at the start of your code.

P#88683 2021-03-08 18:41 ( Edited 2021-03-08 18:42)

This is my manifesto of sorts on how I plan to implement P8OS in the forseeable future. I will keep writing it over time. Basically, you'll see the post progress as I write it down.

Part 0: Decisions, decisions, decisions

First, I'll have to make some choices to fit the limitations of PICO-8. First and formost; will we allow external programs that can be installed onto any given person's copy of the OS? And if so, how will we fit this into PICO-8?
I have the answer to both of those questions. 1) Yes. 2) A VM.
A VM is perfect for this. If you manage to design a compact and efficient bytecode and run it efficiently, then you're set.
Second decision: Should our OS have multitasking? And, once again, if so, how?
Here are the answers: 1) Yes. 2) Instancing.
If we build our VM modularly, we should be able to have a single instance of the VM for each program, which if run asynchronously, would allow for multitasking.
Third decision: Should we use the mouse and keyboard?
As demonstrated by my extremely early and nonfunctional version of the OS, yes to both.
There are more decisions that I'll add in here later. For now, we're set.

Please give feedback on the current version. I want to know what you think!

P#88661 2021-03-08 08:06

Cart #p8os_early-0 | 2021-03-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

This is a very early version of P8OS, a very creatively named operating system built on the one Pico-8 already has. I'm trying to do what the original Windows did, which is piggybacking on an existing framework and building off of that.

It really isn't much just yet, but here's a few lists for those who like them.

Existing features:

  • Mouse and keyboard reading(really not much to brag about)
  • A built in system clock
  • A basic menu bar
  • A (yet nonfunctional) app menu you can toggle with Z(closest to the Windows button)
  • A very clever way of storing program names

Planned Features:

  • Custom VM with bytecode transfered through sprites
  • A framework for said VM with access to writing files and stuff like that
  • A code editor for the VM in the OS. So... a VM inside a VM with an editor for that VM inside an operating system built in an editor on an operating system.

I want to make it so that you can paste in programs you made for the VM from the clipboard since that would be cool and I like cool.

Anyways, I hope you enjoy doing nothing interesting in this glorified button pressing simulator. Give ideas if you can!

P.S. Please do check out my very clever way of storing program names. I'm too proud of it for you not to notice ;_;

P#88649 2021-03-07 18:48 ( Edited 2021-03-07 18:49)

Cart #nocliplost-1 | 2021-03-05 | Code ▽ | Embed ▽ | No License
2

Finally, track four! This is a short one.
It sounds like something from a trailer so there's one use idea!

If you want to translate the symbols, the language is Korean(I'm not Korean but it looks cool so...). Of course, if you already knew Korean, you would know that it was in Korean and you would understand the Korean since you already knew Korean. Y e a h . Anyways, enjoy!

P#88588 2021-03-05 17:57 ( Edited 2021-03-05 18:45)

So, I'm expanding my previously released map generator. I've added stuff like biomes, biome generation types, so on so on.
The thing is, I'm making this generator because I want to start an RP community with stuff like being able to claim territory.
My problem: The map is too small. 128x128 is not a high enough resolution for this map. I've modified for the map generator to work on 256x256 pixels, but that would mean I would have to take four screenshots and manually stitch them together, which is a very frustrating process.
So, my question is, is it possible to take a 256x256px screenshot?
Cheers.
EDIT: I think it's worth noting that for automatically taking screenshots in my code is done with

extcmd('screen')

which could be a slight problem.

P#88404 2021-03-02 09:37 ( Edited 2021-03-02 09:39)

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

README!
This is a terrain/island generator, based on one of my tweetcarts:
I modified it to automatically do the following things:

  • First, run the program as normal.
  • When there are no black/empty pixels, start a timer.
  • Once the timer reaches a certain treshold, do the following:

  • Automatically make screenshot
  • Enable pause menu(you'll see why)
  • Reset cart

The reason it pauses after the screenshot is so that when you leave it unattended it will not just make ten thousand different islands without you knowing. Enjoy!

P#88290 2021-02-28 11:15

Cart #disposablewowee-0 | 2021-02-27 | Code ▽ | Embed ▽ | No License

I participated in the third Wowee Game Jam. The above is my submission!

Can't believe this is my third jam this year...

P#88252 2021-02-27 12:58 ( Edited 2021-02-27 13:22)

Cart #noclipexistential-0 | 2021-02-25 | Code ▽ | Embed ▽ | No License

Here's the third song in Noclip! Made it last night. It's the longest track I've made so far! I'm pretty proud of it. Let me know what you think!

P#88151 2021-02-25 10:43 ( Edited 2021-02-25 17:28)

Cart #kindahotproto-0 | 2021-02-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Making my own tiny, tile based version of SuperHot. Here's the prototype!

Arrows for movement
Z/C to use weapon if equiped. Otherwise punches
X to pick up weapon. Later, you will be able to throw them too.
S to skip a turn.

When you go past the top of the screen, you will be sent to the start. Later versions are planned to update the room when you exit it.

Bullets don't do anything yet since I haven't had enough time to do that yet(remote learning. Ughh.) Punching doesn't do anything either. One enemy is at the end of the room, but, once again, does not do anything. You can go through him if you want. I do want to keep working on this. Let me know what you think!

P#88001 2021-02-22 11:37

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

I participated in the 5th Brackeys Game Jam, and here's the final version! Tutorial ingame. Here's the itch version!

P#87925 2021-02-20 10:41

Cart #helloworldmodernised-0 | 2021-02-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

So, yesterday my brain exploded when I messed around with the new music filters introduced with 0.2.2, and went on a rampage of updating songs in my local carts to use them where neccesary, and just now I changed the music in the hello.p8 demo. I hope you like it!

P#87889 2021-02-19 13:22

I'm making a collection of songs called Noclip, which anyone here in the community can use with credit, a bit like ToyBox. Here are the tracks I've made so far, enchanced with 0.2.2 music effects!

Track One: Seen. Not sure what you would do with this one, but surprise me!

Cart #noclipseen-0 | 2021-02-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Track Two: SysNull. Spacey vibes. An expanded version of a song I made a bit of time ago.
Cart #noclipsysnull-0 | 2021-02-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

If you use these, comment on the post so that I can see what you've done with them! I'm excited to see the uses of these songs.

P#87887 2021-02-19 12:54

Cart #everlostplanetdemo-0 | 2021-02-11 | Code ▽ | Embed ▽ | No License
1

Next demo! Pretty quick, I know. I actually made this one before the movement demo, but meh.

Basically, this demonstrates the system I made for storing planets in a compact way.

One sprite is equal to one solar system. The sprite is split up into columns, where every row is one piece of data.

0 - Sprite to use for planet. Once again, graphics not final.
1 - Start of what's known as the intelligence range. This range will limit species on this planet to minimum and maximum intelligence values, which will change the complexity of the species.
2 - End of intelligence range.
3 - Intelligence modifier. This value is in place to bring average intelligence closer to a certain value.

The rest are seeds for species, species structures, species society and the planet's terrain.

This allows for up to eight planets in one sprite, which if used effectively can let you handcraft a world, with less work and a lot more space.

Also, I came up with a main track for EverLost. That's what plays in the cart.

P#87510 2021-02-11 14:00

Cart #everlostshipdemo-0 | 2021-02-11 | Code ▽ | Embed ▽ | No License

I'm planning on making a space exploration-game called EverLost and will be releasing demos of planned features. This is the first.

Fly around with arrow keys.
(O) key will switch between controlling ship and controlling pilot inside ship.

Yes, I am aware there are no collisions inside the ship. I'll add that in a later demo.

Please give feedback on movement and controls.

(graphics are not final)

P#87509 2021-02-11 13:49

Made a weird fade-type thing. I'm not entirely sure myself how the deterioration thing works, I just divide the draw colour by the deterioration factor and increase said factor by the deterioration rate every pixel. Messing around with the deterioration rate, starting factor and colour range yields different results, some radically different from others. Adding randomised

pal(x,y)

statements could be cool.

P#87431 2021-02-09 19:03

It is far too easy to create a softlock cartridge.

RUN() -- Softlocks program if run from Splore. The only
      -- way to stop is by closing PICO-8 entirely.

Of course, if run from the command line you can always just press ESC and everything will be fine. But I've tested this by running from Splore and there is no escape.
Try it yourself! Just make sure that you saved your work.

P#87416 2021-02-09 12:16

Cart #activitiespreview-0 | 2021-01-28 | Code ▽ | Embed ▽ | No License

So, as I said in my previous post, I am working on a game jam game. There is a problem with the cart above. When score, which the game uses to check progression, reaches 35 it should change the lvl variable to 10 to progress the game. However, when it does eventually reach 35 nothing happens. I simply cannot tell what in the world is going on inside that would halt progression like this. The jam ends tomorrow afternoon BST and if this isn't fixed, I might not be able to upload on time.

P#86872 2021-01-28 13:29

So, I'm working on a game jam game, and I see speed-running potential in it. I'm trying to make a built in speedrunning overlay, and I need to be able to pause the

time()

function so that in the transition areas the time pauses so you can rest for a bit. However, I haven't been able to find anything that can stop, or emulate stopping the time function. I need an answer by Friday afternoon BST since that's when the jam ends.

P#86832 2021-01-27 12:37

Cart #iboss_macromod-4 | 2021-01-19 | Code ▽ | Embed ▽ | No License
2

MACROS: An EyeBoss mod

Basically all credit goes to @BlueCandleGames. They made the original game, and I'm just piggybacking off of their code and sprinkling in some new features. Go check out the original EyeBoss game!

UPDATE 0.2

Features:

  • Added "COMPLETED!" text under
    logo after finishing both Normal
    Destroy and Normal Survival.

Changes:

  • Added outline style to boss core
  • Completing a mode in Easy difficulty
    will now tell you to "Complete Normal
    mode now!"
  • Added effects to music.

UPDATE 1.0 (Major!)

Features

  • Managed to add unlockables! After completing
    a section(when the music changes) you will
    get a skin with the colour of that section's
    signature enemy.
  • Added mode-specific powers. If you complete
    Survival(in Normal), you will get a new skin
    with the name "SURV" which gives you two extra
    lives in destroy and one extra life in survive.
    If you complete Destroy(in Normal), your bullets
    will do extra damage in Destroy and the timer in
    Survive will be lowered to 10 seconds.

Changes

  • Made the second to last music track actually be
    unique from the one before it.
  • Made a very subtle colour change to the background.
  • Added victory sounds to both completing a single
    mode and completing the entire game.

BUGFIXES

1.0.1:

  • Fixed an issue where boss timer in Survival is
    10 without completing Normal Destroy.

To-Do:

  • Get some of you guys' suggestions!
P#86454 2021-01-14 11:26 ( Edited 2021-01-19 17:09)

I'm modifying a 3D raytracing demo to make an engine, and I was doing pretty well until i came to the realisation: I had a limited amount of tiles. Basically, in the way that the original programmer, @Hiinds , designed it, only the top half of only the first page of the spritesheet is available for use. So, basically, what I was thinking is I could use the rest of the spritesheet, and when I no longer needed a certain texture but did need another, I could copy one of the textures into one of the usable slots. What I need is a method to copy a certain part of the spritesheet onto another. How do I do this (if possible)?

P#85115 2020-12-07 15:10

View Older Posts
Follow Lexaloffle:        
Generated 2021-03-09 03:34 | 0.181s | 4194k | Q:222