Hey all,
A slightly annoying bit of Lua syntax is how verbose the anonymous function syntax is.
For example consider a function filter function that accepts an array and a test function that accepts a single element and returns true or false if the element should be kept. The filter function would then return an array of all elements for which the test function returns true.
function filter(array, test_fn) local ret = {} for elem in all(array) do if (test_fn(elem)) add(ret, elem) end return ret end |
So yeah a pretty straight forward functional programming paradigm that's easy to use and awesome.
It is especially convenient to use with anonymous functions where your test function need not be defined anywhere and can instead be defined inline with the function call. Here's an example that would filter an array to only even numbered elements:
filter({1, 2, 3, 4, 5, 6, 7, 8, 9}, function(v) return v%2==0 end) -- result: {2,4,6,8} [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=61932#p) |
HACK*MATCH
Screenshots
About
HACK*MATCH is a mini-game in EXAPUNKS, a programming puzzle game by Zachtronics. When I first played the mini-game I loved it, and thought that it would work really well on PICO-8. This is my own version of the mini-game with some slight modifications.
How to play
The goal is to connect 4 or more of the same coloured piece. There are two ways you can do this, by either picking pieces up and putting them down in a different location, or by swapping two pieces, either the two above you, or the one you're holding and the one above you. The game takes some getting used to so it might take a few rounds before you're comfortable with the controls.
Welcome to my first game ever finished!
- Controls
- Player 1 -> E(Up) / D(own)
- Player 2 -> Arrow Keys
- Description
- It is a simple PONG game that you can play alone trying to survive as long as you can or with a friend trying to beat him.
- Special Thanks
- Thanks to @Alfedi for finding bugs and giving me feedback <3
updated: added ricochets / music / music toggle / screenshake toggle. use the 'return menu' to access the options.
z=shoot
x=jump
l/r=move left/right
get a high score! ammo is limited so be sure to retrieve your shots. chain together multiple kills with 1 bullet for score multipliers, and ricochet bullets off walls for bonuses.
some tips:
- bullets take on the left/right momentum of the player, so use that to line up shots!
- jumping can help you launch bullets higher!
- when bullets hit an enemy, their direction/travel speed is affected by the enemy movement. i.e a fast enemy moving left will knock the bullet left by a moderate amount and halt its upward momentum significantly.
-
Save small town Ozark!
Play as ArgentBot v2.02, an old rusty excavation automaton who's the only hope for the small rural town of Ozark!
After Harold Pechengsky vanished deep underground, the town's last few residents jumped ship. Now Ozark is in danger of collapse! Dig deeper and deeper and bring back riches to rescue Harold and save the town! Buy, sell, recharge, and repair your way to mineral mastery!
Inspired by Schulles' "Utopian Mining". Play it on Armor Games!
Quick Guide
Energy-
Without energy, you can't mine and harvest minerals! Make sure to recharge often at the power plant.
The deeper you go, the more energy it takes to mine, so make sure to upgrade your battery consistently.
Hey, everyone! I'm a hobbyist developer who finds the concept of a "fantasy console" pretty interesting, so I made a little demo based on this game I made for a programming competition for CodeWalrus, which I also remade into an Atari 2600 game. I hope it looks and plays alright!
Hi guys,
There's an Alakajam! event scheduled for the 22-24th February week-end!
The event is an online gamedev competition where people make a game from scratch over 48 hours. Start/end times are suited to European timezones (7pm UTC), also both the theme and the winners are decided by the community! As I write the theme submission phase in ongoing, and you can suggest your own ideas.
You can discover the winners from the last jam here</a>, for which we had 79 games aounrd the theme Falling. For the record the very first jam was actually won by a PICO-8 entry :)
More than the thrill of the competition, a cool thing is that all games are getting valuable feedback their games thanks to our voting/comment system.
If you're interested feel free to check in, we also
So I've started working on a pico8 U.I today. I'll be re-installing linux (switching to fedora) soon so I'm not only using this post as a backup, but also using this post as a sort of preview of things to come.
I wouldn't bother using this just yet, though. Its quite un-optimized so far and not yet finished, and its also not documented and the sample code used for the gif I generated was a bit sloppily thrown together, but if you want to take the code and tweak it to your own needs then by all means do so.
running code:
--s★ui --shooting★ function s★ui_init() s★ui={frame={},mse={0,0}} --configure here --[1]=bg, [2]=border, --[3]=content color --[4] = scrollbar back color --[5] = scrollbar btn color --[6] = scrollbar btn hover -- color --[7] = content btn bg color --[8] = content btn border -- color --[9] = content btn fg color [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=61854#p) |
Tiny Mandelbrot renderer which allows you to pan and zoom around the Mandelbrot set in real-time. It renders at a low resolution and then slowly refines the image the longer you stay in the same place/zoom.
Controls:
- Pan around with the directional buttons
- Zoom in with button 4 (Z on kbd)
- Zoom out with button 5 (X on kbd)
- Toggle between two shading modes with second player's button 4 (LShift on kbd)
- Cycle through five different color palettes with second player's button 5 (A on kbd)
My first PICO-8 Cart! Now updated with color schemes and bugfixes! Maybe someday I'll add Julia sets.
Source is on Github at https://github.com/mbh95/mandelbrot-pico-8
Was looking through the api on https://neko250.github.io/pico8-api/ and I noticed the command gui_theme. It seemed to be something I enter in the splore console but does't work. Is there a correct way to use this? Has it been deprecated?
This is the standalone version of
DIRT*RACING
The tiny racing game in 425 tokens for #17in1jam by @p01 and @Gruber
For the purpose of the jam trying to fit 17 games in one cart, the game had very tight constraint.
The whole game takes 425 tokens, 16 sprites, 16 map cells, 4 sfx and 4 music patterns.
Features
- 3 in game sfx for the engine noises and transition between tracks.
- 4 music patterns mixing 3 unique sfx
- 5 tracks
- Ghost of your previous laps
- A nice trophy at the end and a sweet Easter egg
Hope you like it, and will soon try the whole #17in1jam cart!
Curious to read any feedback, good, and especially bad.
It was really fun to make my first game on PICO8