Log In  

BBS > Superblog
Posts: All | Following    GIFs: All | Postcarts    Off-site: Accounts

Hey,

I'm writing something that uses a lot of memory and initially was running out of memory, I've been dealing with the issue all day, but went back to an old file (where I was running out of memory) and ran it however I didn't run out of memory this time.

I started printing stat(0) to see what was going on and for maybe the first ~1k of memory I used I was getting a result of 0 memory used back from stat(0).

I tried loading the file on my laptop and got the out of memory error. Went back to my PC, reopened Pico, ran the file, out of memory.

Is this a known bug? Am I being an idiot and missing something?

8 comments


Cart #50802 | 2018-03-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
12

It's a frosted 3D donut, drawn in 265 chars of Lua!

I'm including the code here, with spacing and indents for legibility (instead of minimizing chars like in the cart).

Variable meanings:
X/Y/Z: Current sample position (moves along a camera ray), +Y is up
I/J: Screenspace position
U/V/W: Ray direction (normalized)
C: Output color of the current ray
K: Raymarch iterator
Q: Distance to the unextruded torus on XZ plane
L: Shortest distance to the surface of the extruded 3D torus
A: Angular position of sample pos around the torus (0-1, repeating)

(Both distance values are signed: a negative distance means that a point is inside a shape)

cls(2)
::_::
x=0
y=2
z=-3
i=rnd(112)+8
j=rnd(66)+40
u=i/128-.5
v=-(j/128)
w=sqrt(1-u*u-v*v)
c=2
for k=1,20 do
	q=sqrt(x*x+z*z)-1
	l=sqrt(q*q+y*y)-.5
	if (z>4 or y<-1) then
		break
	end
	if (l<.08) then
		a=t()/64+atan2(z,x)
		c=(-y*5-.3+sin(a*6)/4)
		break
	end
	x+=u*l
	y+=v*l
	z+=w*l
end
pset(i,j,max(c%16,1))
goto _
12
1 comment


Fixes:

Features:

  • pixel-perfect auto-resizing (optional, set autoresize to true in html)
  • minor enhancements (pico8 palette colors, black frame with shadow)
  • play button when autoplay is denied (in compliance with autoplay policy changes in chrome 66)

Tested on:

  • win10 (chrome,opera,firefox, edge(blurry as expected, lol@ms))
  • linux mint (chromium,firefox)
  • macos (safari)
  • itch.io, site & app (min embed size is 516x540, close fit with borders without autoresize)

How to:
unzip ub.html to {application data}/pico-8/plates
and then
> EXPORT FOO.HTML -P UB

minified version:
> EXPORT FOO.HTML -P UBM

Download:
https://www.lexaloffle.com/bbs/files/13845/ub_html_12.zip

Have fun!

(edit) no mobile support for now

...
1.2: power button when autoplay disabled (chrome update may 2018)
1.1c: fixed cursor keys scrolling page within iframe
1.1b: removed CRs, added minified
1.1: fixed select/drag/context menu
1.0: first version

Previous versions:
https://www.lexaloffle.com/bbs/files/13845/ub_html_11c.zip
https://www.lexaloffle.com/bbs/files/13845/ub_html_11b.zip
https://www.lexaloffle.com/bbs/files/13845/ub_html_10.zip

(free to use and modify, no attribution required)

30
6 comments


Cart #51597 | 2018-04-14 | Code ▽ | Embed ▽ | No License
16

Here's a super secret preview of Dragondell, a cute stealth adventure game. Code and art are by me, music and sound design are by Gruber -- grubermusic.com. The main page for this game is now on its itch.io page -- feel free to continue leaving comments here as well, but I may be slower to see them, and the version here may lag behind that version if I make further updates.


Note: There's a brief flashing effect when you go through the portal. You can disable it in the pause menu.

GOALS AND CONTROLS

  • Collect loot by bringing keys to chests
  • Befriend royals with O (z), then return them to the castle of the proper color (match robes to flags and lead them all the way to the door)
  • Don't get spotted by knights; you can breathe fire at them by holding X (x), but it takes a couple seconds
  • Once all the royals are returned, use the portal to end the game

CHANGELOGS

[hidden]
1.0.0

  • Knights will now only alert when they see fireballs on Veteran.
  • Found some tokens and added key hints.

0.9.12

  • Tuned knight speeds at Adventurer and Veteran difficulty levels.
  • Fixed a bug that caused roasted-knight ash to stay in the room if you roasted two knights in the same place.

0.9.11

  • Added sentries.
  • Added difficulty settings.
  • Fixed royals not entering castles after swapping positions.

0.9.10

  • Made the board a little smaller; there's now 5 each of royals and treasure instead of 7.
  • Knights you haven't seen before should no longer spawn right next to you. (If you let one chase you off screen and then turn around and come back, it'll still be there, though.)
  • Added new score bonuses and adjusted some existing values.
  • Fixed bug whereby roasting a knight who was standing on a key would destroy the key.

0.9.9

  • Fixed the speed bonus not resetting properly in between games.

0.9.8

  • Updated sounds to final version, including end music.
  • Keys, coins, and piles of ash (former knights) no longer block sight, movement, or fireballs.
  • Added more possible score segments.
  • Added new set pieces.
  • Put visible trays in the HUD for keys, coins, and crowns.
  • Adjusted the fireball sprite to look more continuous.
  • Adjusted some set pieces.
  • Fixed knights sometimes spawning on top of castles.
  • Fixed chests spawning in positions that would block passage through the room.

0.9.7

  • Fixed speed bonus calculation.
  • Fixed several bugs that caused sounds to repeat rapidly.
  • Fixed the timing of the portal using noise.
  • You can now move while befriending.
  • If you manage to step through a door onto an NPC, that NPC should now move. (Please let me know if you successfully reproduce this, it's hard to test.)
  • Knights will now pause for a moment when you enter a room.

0.9.6

  • Fixed bug where special items would sometimes be placed behind trees.
  • Bumping into knights from behind makes them turn around.
  • Knights turn to ash a little faster when fireballed.
  • Ash will disappear immediately when you leave the room.
  • Tweaked some score bonuses.
  • Some new sfx and related bugfixes.

0.9.5

  • Capped the speed bonus based on how many rooms the player visited.

0.9.4

  • First draft of sfx!
  • Knights will no longer turn around if you sneak up right behind them.
  • Knights now notice fireballs in their field of view and try to find the origin.
  • The end portal now only appears after returning the last royal.
  • Added a bunch of new score bonuses, some of them quite silly.
  • Lots of title screen improvements.
  • Minor adjustments to room templates.

0.9.3

  • Fixed a bug in vision cone calculations (thanks Joel!)
  • Massive art update.

0.9.2

  • Fixed a bug where the castle distribution was sometimes different from "one of each color" (thanks Yoshi!)
  • Fixed a bug where knights would get stuck in their "charging" sprite if you left the room and came back
  • More score tweaks

0.9.1

  • Map generation now validates rooms (to make sure all goals and exits are reachable)
  • Made it even harder for knights to chase you immediately on room entry (and easier to get out of it if you're clever)

0.9.0

  • Switched to the version number I actually meant last time (whoops)
  • Knights who have spotted you but not yet charged on you move faster
  • Knights will not be looking at you as soon as you enter a room (even for the second time)
  • Minor tweaks to room generation, scoring, and portal animation
  • Added menu option to disable flicker effect

[ Continue Reading.. ]

16
16 comments


Cart #50783 | 2018-03-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2


A mouth wanting to eat a taco. The worst kind of torment.

1
0 comments


Cart #51082 | 2018-03-31 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

Charlie needs help. He doesn't understand music. To learn about it, he has built a machine that can make sounds. He will have to teach his neural network (music brain) how to make musical sounds.

When he starts the machine for the first time, it will make a random sound. To hear this sound again he can press the green PLAY button. To reward the machine for playing something sort of musical, he can press the red LEARN button. This will modify the brain and a new sound will play, usually similar to the first but not always. If the new sound is still "musical," he can press LEARN again to get more creative. To save this brain to the cartdata, he can press the gray SAVE button.

If the brain is not making musical sounds, he can modify any node directly by moving on top of it, pushing the value up or down with the buttons. The weights of the nodes and edges are represented by color patterns. The first column of nodes are input nodes. Modify them and press play to get a new sound from the machine using the current brain, without changing any connections. The middle column are learning nodes. Modify them and press learn for chaotic, unpredictable behavior. Pressing play will reset them. The right column are output nodes associated with instruments, pitches, envelopes, volumes, speed, and loop length, respectively. Modify these to be what you believe they should be and press learn to train the brain to produce those outputs when given the current inputs. (left column)

Good luck have fun!

3
5 comments


Cart #50770 | 2018-03-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

1 comment


Cart #datamaku-1 | 2019-02-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

Cart #50852 | 2018-03-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5


2019-02-05 UPDATE: Minor code clean-up and dialling back glitch effects at game-over screen


2018-03-26 UPDATE: Change of name (from Dataseed) due to name being in-use.


2018-03-25 UPDATE: Added rudimentary hi-score system (resets when cart resets)


First game I've ever made, on pico-8 or otherwise.

Learned a ton of stuff while making it, including how not to structure my code next time :)

[ Continue Reading.. ]

5
0 comments


Hey friends,

For your interest, in case you haven’t seen it on Twitter, Trasevol_Dog and I just finished a major collaboration on JS Bach’s Two-Part Inventions.

I arranged all 15 of these compositions in Pico-8 (Each required 2-3 carts worth of SFX). And Trasevol_Dog created animated portraits for each.

Write-ups on the how he did the portraits can be found on Trasevol_Dog’s Patreon Page

And all of the music and portraits can be seen/heard in this YouTube playlist

Hope you enjoy!

3
3 comments


I'm using a Microsoft Surface Pro. I noticed that Pico-8 doesn't respond correctly to touch events. This affects the use of the touchscreen as well as the use of a stylus. I'm using the Surface Pen.

Although you can control the cursor with touch inputs, triggering clicks is difficult. Tap events aren't registered as click. They move the mouse cursor but don't click. Tap and drag is correctly recognized as click and drag. So in order to click you need to basically draw tiny circles with the pen.

I would love to use the pen as a convenient way to do some Pico-8 pixelart on the go.

7 comments


Cart #50738 | 2018-03-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Prototype for Bennett Foddy's Pixel Prototype Studio, NYU Game Center

Prompt: Food

Float through donut space, kill the baddies with sugary treats

Arrow keys to move, ESDF to shoot new donuts

I want to keep working on this, maybe rewrite it in Phaser or Unity

Music by Elizabeth Castaño and me

2 comments


Well I am new to lua and pico-8

In javascript, it is possible to force run inner function after some seconds with setTimeout();

setTimeout(function(){},5000);

and I am looking for something similar method or function in lua or pico-8

this is my code

function define_level()
	local level = 'level'..levels;
	show_level(level);
end
function show_level(level)
	print(level,54,64,8);
end

levels is number.

I want to hide or remove text which is printed with print(level, 54,64,8);
after some seconds.

Any tips?

5 comments


Hey P8 fam,

Got a weird thing happening with my game and am having trouble finding anything on this, What is happening is on my map editor I am seeing sprite formations that I did not put there and when I try to remove some of them I see a glitching effect on some of the sprites I did place intentionally when I run the game.
Does that make sense?

Does this have to do with the 128 sprite limit? Didn't think I hit it.

Happy to answer any questions, thanks.

5 comments


Cart #50707 | 2018-03-23 | Code ▽ | Embed ▽ | No License

A simple snow particle system, with rising ground. It doesn't eat the CPU completely :).

4 comments


Cart #50703 | 2018-03-22 | Code ▽ | Embed ▽ | No License

0 comments


Hello I started lua programming just yesterday.

Because my project should be started right now, I hadn't so much time to read through lua tutorials.

I am an web developer and I have never seen such errors when I worked with Javascript and Java and I don't understand meaning of the error.

This is my code

The error is occured in function drawLife.draw()

function _draw()
	cls();
	rectfill(0,0,128,128,12);
	rectfill(0,72,128,128,7);
	clouds.draw();
	mapdraw(16,16);
	mapdraw(0,0);
	enemies.draw();
	bullets.draw();
	p.draw();
 	mapdraw(16,0);
	fires.draw();
	score.draw();
	drawLife.draw();
	print(bullets.type,4,4,7);
end
function drawLife.draw()
	rectfill(80,80,60,60,#FF004D);
	rectfill(80,80,60,60,#FF004D);
	rectfill(80,80,60,60,#FF004D);
	rectfill(80,80,60,60,#FF004D);
	rectfill(80,80,60,60,#FF004D);
end

I added .draw() after drawLife because I got lua code from my friend's brother who is game developer... and there were many .draw() and :draw() after the function name.. I need to learn about that

5 comments


Cart #50672 | 2018-03-21 | Code ▽ | Embed ▽ | No License

This is my first PICO-8 project. It's a small arcade game, I think it can be pretty fun for 2-3 minutes.

The game lacks some basic features, which include:
-Particles when enemies die
-High score table
-Sound and music

Also, this is my first time coding anything other than print("Hello world" in python. I know my code isn't practical and it's pretty token heavy for such a small game.

Constructive criticism on game/code welcome! :)

5 comments


Hi all,

I wrote a second Medium article, mainly as an introduction to Lua but all examples are about the PICO-8.
If you are interested, you can find the article here: https://medium.com/@hans.bruins/hello-lua-92ad1c692dae

You can find the previous one here: https://itnext.io/eeny-meeny-pico-b7b31600e65a

Have fun reading and keep tinkering!

1
1 comment


Cart #50646 | 2018-03-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

Version 1.2

  • All known bugs have been fixed.
  • The pricing scheme has been overhauled to make it simpler and more useful. The ticket price is now charged when leaving the point of origin and the value is linearly proportional to the distance to the destination, independently of the route taken (multiplied by the "class of travel" factor, whether the whole journey is by Shinkansen or not). For instance, if the distance is 6 "blocks", 4 of which are on fast trains and 2 on slow trains, the total fare is still 30,000 (if the price is left to the default 5,000). If using only slow trains, it would have been 6,000 in total.
  • The decision function to take the Shinkansen (or not) is now nonlinear. Travelers will choose the fast train option if the increase in price is lower than or equal to the square of the reduction in journey duration. For instance, if the duration is reduced by a factor 3 and the price is increased by a factor 5 (default), the traveler will still choose the fast option (5 < 3^2 = 9). This makes the price adjustment function more usable (i.e. it is easier to "convince" travelers to use the Shinkansen for only part of their journey through a small fare reduction).

For the "complete" manual, please refer to the original post: https://www.lexaloffle.com/bbs/?tid=30916

Also...

[ Continue Reading.. ]

2
3 comments


Cart #slipways-1 | 2023-01-08 | Code ▽ | Embed ▽ | No License
212

Slipways is now part of the PICO-8-gone-commercial club! You can find the grown-up version of Slipways on Itch or Steam!

So, here is the final PICO-8 version of SlipWays!

Mouse is kind-of-required for this one. You can drag the map around with the right mouse button, but that doesn't work on the BBS (since the browser's context menu will pop up). You won't have this problem when playing on itch.io or inside PICO-8. Alternatively, you can scroll around with SDFE or arrow keys.

Phew. Oh, wait, so you'd like to know how to actually play the game? There is an animated quickstart guide, but here is the shortest possible text summary:

[ Continue Reading.. ]

212
52 comments




Top    Load More Posts ->