Log In  


I've found some interesting things tucked away in picotron's code, and I'd like to share them!

First off, you can edit and view any file by typing edit name.ext, where name is the file and ext is the extension.

There are loads of gui features to mess with and ruin, and my favorite is notify_user(<text>). When called, it displays "text" in a little notification bar! Even works with vars! Another honorable mention is the gui text editor. It's buggy sometimes, but you can embed a text editor or code editor anywhere you want in your cart!

As for non-gui things, there are many. You can read keyboard presses (get_key_pressed(key)), actively playing sounds, running processes, open files, OPEN files, delete files, change and list directories, all from within your carts! I'm sure there's a way to make a program run in the background, so this could make for custom themes, keyboard remapping, BG music and sound effects, freaking integration with your, YOUR operating system, the list goes on.

Also, in the code for load.lua, you can see that if it finds certain files, it will launch certain editors. This includes .sfx for sounds, .gfx for sprites, .map for... the map, .Lua for code and .pod for who knows what.

Speaking of pods, I feel like I'm the only one exited for them! So much can go in a pod! Images, sprites, sound maybe, open workstations, save data, my net worth, im very exited for wacky old picotron object data

Another really really REALLY cool thing is this: try CDing into /system/util. Notice anything? Well I did! All those files are the terminal commands! They are also .lua's... (you know where this is going) try this: type "code echo.lua" while your in the util folder to make a new file. At line 1 type print(env().argv[1]) and save it. You should now have "echo.lua" in the util folder. Now type "startup" into the terminal to restart picotron. Now- get ready, type "echo hello!" Into the terminal. That's right. You just wrote your own terminal command! How freaking cool is that!? Incase you wanted to know, how this works is on boot, picotron loads everything in /util/ to be used as a terminal command. env() means "enviornment" and argv[1] means "Argument 1". enviornment is a function that manages ptron's enviornment, and argv is a table that contains any arguments you write in a terminal command! (if you write "load j.p64", j.p64 is the argument).

Last thing, the pinboard. You can actually re-enable it with some work! Just un-comment some code and add some code back, add some of your own, and bam! Because of the way picotron was made, and how easy it is to edit, I'm sure it's not too hard to write a library to put things up there.

5



[Please log in to post a comment]