Side Quest 2 is broken down into 4 requests from the same villager. You first come across this Side Quest in "Lesson 6: Print to the Screen" and are encouraged to revisit it after learning how to use variables in "Lesson 7: Variables & Data Types". You are free to submit both examples under this post, but you should make it clear whether you made them with or without variables.
2-1
"Hi, I have a clothing store and I need a sign that shows people our fabric color options. Can you print the numbers 1 through 15 but in those exact colors for me?"
2-2
"I also do custom jobs where I can design someone's name into the fabric. Can you give me some ideas by printing your name, one letter at a time, in a really cool pattern?"
Hello everyone,
Here's my first upload to the BBS ever, it's a simple rewrite of the ls.lua
util. I've always preferred using ls -al
(that is usually aliased as ll
) in my unix terminals and because the muscle memory is too strong, I've just remade it quickly in Picotron.
Let me know if you have any issue. I also wanted to add the 'rwx' info just as a joke, but it crowded the output a bit too much.
Just copy this code in 'll.lua' in '/appdata/system/util'
function lpad(nb, str) local nb_to_add = nb - #str local result = "" for k=0,nb_to_add do result = result.." " end return result..str end cd(env().path) local path0 = env().argv[1] or "." path = fullpath(path0) if (not path) then print("could not resolve path "..tostr(path0)) exit(0) end local res=ls(path) if (not res) then print("could not find path "..tostr(res)) exit(0) end [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=160609#p) |
I'm trying to do a simple state machine but I'm doing something wrong in the assign.
I wanna assign "running" if a button is pushed from a list of values.
player = { lives = 3, current_state, list_states = {"running","jumping","falling"} } function _update() if btnp(❎) then player.current_state = player.list_states["running"] end end function _draw() cls(1) print(player.current_state) end |
This doesn't work:
player.current_state = player.list_states["running"]
This works but its not very useful because I don't see in the code which state I'm assigning:
player.current_state = player.list_states[1]
This also works, but I think it's also not very useful because the usefulness of the state machine is assigning a concrete value from a set of predefined values to avoid mistakes.
player.current_state = "running"
How can i do it? Or whats the usual approach to make states machines?
Thank you!
Hi, all!
I have the following code (following a tutorial):
function _init()
player={
x=63,
y=63,
fx=false,
fy=false,
sp=1,
speed=1
}
end
function _update()
if btn(➡️) then
player.x+=player.speed
player.fx=false
player.fy=false
player.sp=1
end
if btn(⬅️) then
player.x-=player.speed
player.fx=true
player.fy=false
player.sp=1
end
if btn(⬆️) then
player.y-=player.speed
player.sp=2
player.fy=false
end
if btn(⬇️) then
player.y+=player.speed
player.sp=2
player.fy=true
end
end
if mget(flr((player.x+4)/8),flr((player.y+4)/8))==56 then
player.speed=2
else
player.speed=1
end
function _draw()
cls()
map()
spr(player.sp,player.x,player.y,1,1,player.fx,player.fy)
end
At line 38 (the mget part) I got a runtime error with the following message:"Attempt to index global 'player' (a nil value)". I have some programming knowledge in Pascal, C and Python, but I have no idea what does it mean, or what does it try to say.
Prehistoric Cantine - A 2 player coop game.
This is prehistory.
After school, the children play by the river and then go to eat in the school canteen. It's up to you to keep an eye on them and then take them to the school canteen.
Do everything you can to make sure kids don't fall into the water, bump into walls, or get swept away by dinosaurs.
When the bell rings, bring ALL the kids to the school canteen to take it to the next level!
Play with one controller per person or one keyboard for two.
--
French version is here :
About
- Try to go the furthest distance!
- Collect coins to brighten the cave!
Controls
- Press any button on keyboard, gamepad or mouse to jump.
- Press enter or start to pause.
Credit
- Made by: MrDuckyWucky
- Uploaded: Jan 12, 2024
- Also on itch.io
[CAT]
Hola a tots! He fet una petita utilitat per poder mostrar per pantalla els caràcters especials del català a Picotron. En concret afegeix suport per als caràcters:
ÀÈÉÍÓÒÚ àèéíòóú ÏÜ ïü Çç l·l
Sou lliures de modificar-la si voleu. Aquest cartutx és un exemple d'ús. Només cal:
1-Importar la llibreria al vostre cartutx
2-Importar-la al codi (com a l'exemple)
3-Ja podeu utilitzar les funcions de la llibreria. Són dues: bcursor(x,y) i bprint(text, [x], [y], [color])
This is my first game, Wordstorm! It's based on the old Text Twist flash game-- the goal is to use a scrambled set of letters to find valid words. Each round, you need to make three 3-letter words, two 4-letter words, and one 5-letter word to increase your score and get a new set of letters. Use the arrow button to submit a word once you've spelled it out. Timed mode adds a one minute timer per round and lets you accumulate a persistent high score. Untimed mode lets you spend as much time as you'd like per round, but you can't get a high score.
Huge thankyou to zep's is_word_40k dictionary that allowed me to greatly increase the number of words used. The font is copied from Early Gameboy by Jimmy Campbell on Dafont.
Rain Maker
Oh, River... you really want to do this, huh? Well.. who am I to stop you... but, keep in mind, Becoming the new rain maker will not be easy.
Your name is River, you are a 19 year old trans girl looking to become the new rain maker and save your town's crops from drought and death, and the gem is right there, were the stories all false?
Exposition
This is my first go at a game like this!!! I've never worked on a game that required design and wasn't completely endless! I'm really looking for constructive criticism and code suggestions! I really wish to improve my code and my game design abilities!! The dungeon is completely the same every time as I didn't know the Pico8 could do procedural generation. :(
Feature Suggestion: Cart Forking and Collaboration
I wish there was a way to track when a cart from the BBS is improved or modded or altered, linking it back to the original in some way. This could function like a "fork," showing all variants and allowing users to see the evolution of a cart over time.
With this feature, we could collaboratively work on adding features and fixing bugs, even through small individual contributions. Over time, these efforts would add up, leading to polished and feature-rich games and software.
Isn’t that the beauty of open-sourcing carts? A system like this would make it easier for the community to come together and create something truly amazing!
Feature added:
- Added more shading on sprites
- Added "wasd" + "e" + "space" as optional keyboard control
Typically, when using an external editor, I do cp -f cart.p64 src
and then work on src
externally. Every time I make a change, I need to load src
before running. Then, I can put it back in the cart by doing cp -f src cart.p64
.
The suggested way of using external editors in the docs is to have the code externally, and simply include it from inside the cart. This will automatically use the latest external change, but it makes it harder to switch back to editing inside Picotron, as you need to change parts of your code to put everything back in the cart.
I made a quick utility to make loading an external folders easier.
extload
is a modified version of /system/util/load.lua
that loads a folder for external editing. It saves the path of the folder in /ram/extcart.pod
and loads extrunner
instead of the actual folder. (It also loads the workspaces from the folder, though this is a little janky.)
extrunner
is a dummy cart that cds into the external folder (from /ram/extcart.pod
), loads the graphics and sfx (by including /system/lib/resources.lua
), and runs it (by including main.lua
).
This is for anyone that didn't manage to find a solution or was too lazy to look at the Picotron Documentation (like me).
You can get the window size after the user resized the window with
get_display():width()
and
get_display():height()
, respectively.
To detect when the window is resized you can use the following code by arnaught:
on_event("resize", function (msg) width = msg.width height = msg.height end) |
Hello all! I am new to Pico-8 and emulation as a whole. I recently got a RG35XXSP and bought Pico-8. I moved over the files people told me to, changed the core to Pico-8, and even got a game to run, but Splore isn't popping up in the Pico-8 directory. All the videos I saw, the second they got out of a game, Splore would populate the directory and they could use it but it's not working for me. Am I missing something?
Also sorry if this isn't the right category for this. I'm in a hurry to post something so I can sleep for work.