Log In  

Cart #matrix_pixel_rain-0 | 2022-12-09 | Code ▽ | Embed ▽ | No License
9

A nice screensaver? Or just listen to the music and relax to the colorful rain.

The loop is a cover of the song "Clubbed to Death" by Rob Dougan, known from the Matrix movies.

Controls
❎ toggle auto color (default: enabled; changes color automatically over time)
🅾️ toggle mute music (default: enabled)
⬆️/⬇️ change color (default: green)
⬅️/➡️ change speed (default: 1)

Check out my profile for more carts.

P#122070 2022-12-09 02:15 ( Edited 2022-12-10 23:59)

You mean I'm not the first with this idea? I'm shocked. ;-)
I know the huge amount of that. Every developer should write at least one matrix rain app. From web in JS to ascii console app in C. :D But to be honest, I'm already a bit tired of it. This one is a kind different. It uses simple pixels instead of characters and noisy blending to fade out in different colors. The music was the trigger to create it. Just another matrix rain scribbling on the side. ^^

P#122096 2022-12-09 15:10 ( Edited 2022-12-09 16:03)

yes it’s pretty neat :)

I don’t know the goal of the posts listing similar carts.
people know that and/or can search and/or still have fun making existing ideas! I think it could be discouraging for some to see this kind of reply

P#122100 2022-12-09 16:07

@merwok I would be elated if someone did that for me.

We can always learn from others' coding. Always. I actually learned quite a bit from this very particular cart regarding Matrix.

https://www.lexaloffle.com/bbs/?pid=46190#p

For the first time I saw it was possible to write a single line of code in Pico-8 and still have a working cart.

As for your submission, @domske. You have proven yourself in masterful music and animation, especially from this cart I favorited and starred when you released it.

https://www.lexaloffle.com/bbs/?tid=48957

Pico-8 is and always will be a learning experience. Let us all embrace each others code, learn new concepts and ideas, and never be discouraged to see new ideas.

That is the reason the SOURCE button appears there online. That is why we are here.

P#122116 2022-12-09 19:17

It's fine. :) Thanks.
Next time I'll remove all line breaks to have confusing code on a single line if you like. ;)

P#122183 2022-12-10 21:46 ( Edited 2022-12-10 22:31)
1

No, it's not that, @domske. I think you know this. :)

We learn something new every day. Me ? I try to focus on learning new ways of coding Pico-8 and new methods to try in it.

This one-liner presented itself. It was unique to me - to code in one line. So I sat to try and learn what was happening in it and eventually write my own 1-line functions.

For instance, your code stops the music when you press 🅾️. Press it again to restart from the beginning. It uses music(-1)

Yet if you look inside my Christmas Card found HERE:

https://www.lexaloffle.com/bbs/?tid=36143

You will see when you press 🅾️ I am not stopping the music.

No, I am POKEing directly to memory to =PAUSE= the music. Something quite different. Then I poke again to continue it, without having to restart it. It continues precisely where you left it.

And this is something few people know about it and now can look for in the code. :)

We always learn from others.

P#122186 2022-12-10 22:35

Yes, just joking :P You know that developers like to show off how smart they are by writing complicated code. Preferably in an error-prone one liner. Ok, in Pico 8 you have no space for clean code anyway. The limitations force you to think smart and the font for using extreme abbreviations. That's the idea. But for me, it's not always fun to read others code. ^^ Especially when it's obfuscated or just terrible written. Anyway, other code can be interesting to discover magical things and learning new stuff. But in this case, I'm focused on the result, the art and the game. Not for sharing code. Especially for music carts. ...

Good to know that poke(0x5F2F, 0/1) pauses and resumes the music at the position. Thanks. But I'm fine with that to restart the music in this case. First I used music(-1, time) to fade in/out to reduce clicks in the sound. But turning music on and off isn't the main feature and doesn't really matter.

I currently more interested in controlling the volume at runtime. Preferably without hacks (poke, not documented). Use case: A game of positioned music or sound origins. Where you can change the volume while the music is playing. For example by distance between a music source (position) and the player. I could change the sounds in memory using poke. But I would prefer a more comfortable solution. With music(id, time) you can fade in/out over time. My suggestion is to set this volume to an absolute value. Dynamically changeable, possible in every step in e.g. draw or update function. ... And for the web player, I wish that there is a volume control instead of just on/off button. Similar like in the native player. Even if the device or mixer in OS can do that. Chiptune can be perceived very loudly. Some carts can cause heart attacks. In browser you can not define a different volume per domain or tab. Also the OS mixer can only change the master volume of the program. So watching videos in background while testing carts on website can be a bit annoying.

P#122207 2022-12-11 01:07
1

Well now, @domske, you are referring to another cart I wrote that lets you change volume. This came out before Pico-8 could change volume let alone MUTE. Let me see ...

https://www.lexaloffle.com/bbs/?tid=35559

My cart is seen below. Likely could be improved on coding today.

And yes you can increase higher than 0 adjust but then it just sounds sorta weird. Sounds great going to negative numbers though.

P#122208 2022-12-11 01:13

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-18 22:30:45 | 0.050s | Q:24