First release of my Geometry Dash demake. No music currently.
Up arrow to jump
Z/X to place/remove checkpoints, or jump in normal mode.
The enter menu also has useful options.
Ship physics is weird, I need to fix that at some point. The other gamemodes have pretty good physics though, but not perfect.
When using strings in your code it is sometimes useful to break them over multiple lines. Usually you would use the long strings [[text]] to do so, but this will introduce newlines into the string:
str = [[foo bar]] ?str -- foo\nbar |
If you don't want newlines in the string, there is a little-known feature of Lua that allows you to break short strings over lines:
str = "foo\z bar" ?str -- foobar |
While this works and prints the correct value (foobar), the syntax highlighting does not continue over the linebreak, and more importantly, the token count also breaks. Take this example:
foo = "\z
" function free_tokens() print('yay, ' .. 'free ' .. 'tokens!') end free_tokens()
|
This is only 4 tokens, yet runs fine!

It would be nice to have a way to patch system processes and files that are run before /appdata/system/startup.lua is run, for processes like wm, and the default workspaces. My suggestion is to add a /appdata/system/patch.lua, which is run inside boot.lua before any other processes are created. It would be a safer way that making the system folder persistent, as it could still be bypassed like with startup.lua, but it would allow for things like creating custom patches for the editors and such.

When using alt+up or alt+down in a text box, it will can sometimes freeze. I have narrowed it down to this loop: while (first or y != start_y) do in search_for_function().
The reason it freezes is because start_y is 0 if the cursor is at the top of the text. The code responsible for wrapping the search position will wrap it between #text and 1, which means if there are no functions or bookmarks to jump to, and the cursor is at the top of the editor (which will happen if it's only a single line), then y != start_y will never be false, and the loop will never terminate.

Something that I feel is missing from the otherwise great userdata api is some way to fill a region with a specified value. It would work similar to lerp, as in: userdata:fill(offset, len, el_stride, num_fills, fill_stride). Since we already have more advanced operations such as lerp, I feel this would fit, and be useful in many cases.
Edit: You can use :add to set values, since it's 0 by default and you can pass a scalar to it.
When setting up a window for an app, you can set pixels to be transparent, so the background shows through. This allows us to have simple on/off transparency, but it does not allow us to blend colours and have translucent windows. My suggestion is to let the cart give the window a colour table. This would be applied before drawing the window and removed afterwards, and it would let the window blend with the background.
In a recent update, fetch()ing a .png file will now return a paletter-fitted u8 userdata, instead of the i32 we had before. Unless I've missed something, this means it's now no loner possible to get the actual colours in the image? Maybe an extra argument to fetch could resolve this, as we still have the ability to pass true to userdata :convert to get the palette alongside a u8.

I have encountered some strange behaviour when using pod() with keys that are tables.
This code snippet prints {} (it should print nil if it were to be consistent with other pod behaviour)
local a = {}
a[a] = 1
?pod(a) |
This code snippet also prints {}
local a = {}
local b = {}
a[b] = 2
?pod(a) |
But now, the strange part. This:
local a = {}
local b = {}
a[a] = 1
a[b] = 2
?pod(a) |
causes an error, it reads simply attempt to compare two table values. No error location, just this!
Here is a list of bugs/annoyances in the BBS:
Important:
Code preview is broken, if you click on the code button under the pico-8 web player, it doesn't show the code. (It's the right size now, but still no code. Definitely an improvement!)Fixed!
Minor:
- The padding around the pico-8 web player is too big.
- The featured buttons at the top of the BBS don't show the author, it just says "by ".
There are a couple more, but they're not really issues, so I've omitted them.
When clicking the play button on the Picotron web player, it stays as a grey screen. Checking the console shows an error, that it can't find https://www.lexaloffle.com/play/picotron_0101.js. After some digging, I believe it should be https://www.lexaloffle.com/play/picotron_0100h.js instead.
Edit: Wait, does this hint at Picotron 0.1.1?
FIXED!!!!
This is a maze generator in 191 characters.
t={-2,2}function g(x,y)if(pget(x,y)<7)return
line(x,y)::l::r=rnd(t)if(rnd(2)>1)then
g(x+r,y)else
g(x,y+r)end
line(x,y)if(rnd(99)>1)goto l
end
cls(7)g(0,0)pal(7,8,1)pal(6,7,1)::_::flip()goto _ |
This is my first time doing this, let me know if it could be improved.

This is a simple transition, that should be fairly easy to use. All the code is in rgb_transition.lua. Simply call rgb_transition_setup() when starting the transition, and then on each frame, after the game is drawn, call rgb_transition(). It takes one argument: Whether the transition should be fading in or out. True fades out. In this test cart, press X to reverse the transition.






0 comments





