Log In  

BBS > Community Superblog
All | Following | GIFs | Off-site

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)
2 comments


HACK*MATCH

Cart #deadpixl_hackmatch_1-1 | 2019-02-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
19

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.

[ Continue Reading.. ]

19
12 comments


Thanks in advance for any help.

I have two Objects tabs in my Designer. Also, I am missing Fonts.

I am on a MacBook Air running 10.14.2.

Thank again!

5 comments


Cart #arcade_pong-4 | 2019-02-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2


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
2
2 comments


Cart #zeldamos-0 | 2019-02-15 | Code ▽ | Embed ▽ | No License
7

Zeldamos is a Zelda-esque Engine similar in style to the GameBoy titles.
I will be updating this throughout to hopefully make an example dungeon with combat, puzzles, and a boss.

v1.0 --

  • 8-Way Movement
  • Screen Transitions
  • HUD
7
7 comments


using google translate

At the beginning of the year I started using PICO-8 when I found out that Celeste was born from such a simple concept.
The first thing I could discover using PICO is that you can export to html...

if you can use HTML you can visualize it directly on Android using a tool called WebView.

This is a step-by-step tutorial to use your PICO-8 cartridges on your Android phone, let's begin shall we?

What do we need:

Now we need to understand what we are going to do:

1) create an application on Android (the classic helloworld: https://developer.android.com/training/basics/firstapp/).
2) Add the WebView tool to your app (https://jgvcodigo.blogspot.com/2017/12/webview-android.html).
3) Add the controls on the html file of your cartridge.
You can use the following template and call your .js file:

[ Continue Reading.. ]

8
7 comments


Cart #pip13-0 | 2019-02-26 | Code ▽ | Embed ▽ | No License
13

A retro platformer where Pip, the tiny birb, must collect feathers to get strong enough to return to their nest and finish their nap.

Z/C to jump and airjump
X/V to short hop (on ground) and dive (in air)

Current version: 1.3, patch notes farther down in thread

35
17 comments


Hello, I saw in the new changelog that Voxatron can now run Pico 8 cartridge , I tried it on my version , but didn't find any "pico 8" section , I tried opening a .p8.png in the designer , but it just crashed the console. This feature really hyped me , so I'll be more than happy to try it , thanks to anyone who read me.

1
2 comments


On Safari for Mac, the date string arguments to the get_relative_time JavaScript function are not considered to be valid dates. This causes every post to show "NaN years ago".

Bug showing NaN years ago:

Safari console showing Invalid Date:

2 comments


Cart #descenders_v9-1 | 2019-02-16 | Code ▽ | Embed ▽ | No License
6

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:

  1. bullets take on the left/right momentum of the player, so use that to line up shots!
  2. jumping can help you launch bullets higher!
  3. 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.

[ Continue Reading.. ]

6
3 comments


Cart #ozarkrush-6 | 2019-02-15 | Code ▽ | Embed ▽ | No License
8

-

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.

[ Continue Reading.. ]

8
11 comments


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!

Cart #dishibitu-0 | 2019-02-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

3 comments


a commanche like voxel renderer

Cart #voxel8-1 | 2019-02-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
9


fix minor bugs

usage:

use arrow keys to move
press x to generate a new terrain

Cart #voxel8-0 | 2019-02-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
9


previous version

9
1 comment


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

[ Continue Reading.. ]

0 comments


Cart #adelie-0 | 2019-02-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
74

A metroidvania mod of Celeste Classic. :)

74
20 comments


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)
12
7 comments


Cart #nidomkuko-4 | 2019-02-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

Just a simple sudoku game.

6
5 comments


Cart #mandelbrot-1 | 2019-02-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

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

8
8 comments


Cart #rabegawt-0 | 2019-02-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1


Here's my first experiment with platformer physics and collision detection.

(Arrow keys for movement)

1
2 comments


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?

5 comments




Top    Load More Posts ->