wh0am1-dev / pico8-api Goto Github PK
View Code? Open in Web Editor NEWUnofficial PICO-8 API with a lovely design ! ::
Home Page: https://carlos-aguilar.com/pico8-api
License: Other
Unofficial PICO-8 API with a lovely design ! ::
Home Page: https://carlos-aguilar.com/pico8-api
License: Other
In the latest manual (https://www.lexaloffle.com/pico8_manual.txt):
coresume
returns a bool value, and can take additional parameters as the coroutine's parameters.
costatus
now returns one of three string value: "running"
,"suspended"
,"dead"
Copied from official manual for convenience
:: Coroutines
Coroutines offer a way to run different parts of a program in a somewhat concurrent
way, similar to threads. A function can be called as a coroutine, suspended with
yield() any number of times, and then resumed again at the same point.
function hey()
print("doing something")
yield()
print("doing the next thing")
yield()
print("finished")
end
c = cocreate(hey)
for i=1,3 do coresume(c) end
cocreate f
Create a coroutine for function f.
coresume c [p0 p1 ..]
Run or continue the coroutine c. Parameters p0, p1.. are passed to the
coroutine's function.
Returns true if the coroutine completes without any errors
Returns false, error_message if there is an error.
** Runtime errors that occur inside coroutines do not cause the program
to stop running. It is a good idea to wrap coresume() inside an assert().
If the assert fails, it will print the error message generated by
coresume.
assert(coresume(c))
costatus c
Return the status of coroutine c as a string:
"running"
"suspended"
"dead"
yield
Suspend execution and return to the caller.
what am I supposed to do
I often find that I know the notes that I want to enter into PICO-8 (e.g. E, C#, A, etc.), but have NO IDEA which keys map to which note.
So, was thinking it might be helpful if your (already v.useful) piano image also included the musical notes (for those of us that aren't piano players!)
I realise this may be a bit tricky as there are different octaves, but either way - wondered if you though this would be as useful as I would?
Thanks! 😃
In the Input section, the number of player is written like PLAYER 1 and PLAYER 2, which is referenced as 0-based index in code.
There should be a note or warning about this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.