This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
KingofGamesYami's profile picture

Bubbles!

Started by KingofGamesYami, 09 December 2014 - 02:06 AM
KingofGamesYami #1
Posted 09 December 2014 - 03:06 AM
I got bored, made a program that randomly moves bubbles up (bigger ones move faster) on the screen. Not much, it's just kinda pretty… Feel free to improve the code and post your own version :)/>/>.

I haven't tested on pocket computers, but it generates via the term size, so it should look alright.

pastebin get JCR8YTww

Preview*

*for some reason, this feature of Mimic isn't working for me. Dunno if it's just me or what.
Edited on 09 December 2014 - 02:19 PM
thenextntnick #2
Posted 09 December 2014 - 03:35 AM
I made it more like a screensaver. Press a key to interrupt the program and it will quit. It also won't clear the screen.
A little screenie:


Pastebin: 3CeFxk9X
cdel #3
Posted 09 December 2014 - 06:08 AM
This is really awesome, looks very sexy and is very memorizing. :D/>
oeed #4
Posted 09 December 2014 - 06:38 AM
Yea, this is pretty neat. You've got me thinking about making something a little like this for OneOS…

It does noticeably freeze every few seconds though, maybe from a bunch of math.random calls?
cdel #5
Posted 09 December 2014 - 06:45 AM
It does noticeably freeze every few seconds though, maybe from a bunch of math.random calls?

I ran this on Lua Land, didn't experience any spikes whatsoever ?
oeed #6
Posted 09 December 2014 - 08:01 AM
It does noticeably freeze every few seconds though, maybe from a bunch of math.random calls?

I ran this on Lua Land, didn't experience any spikes whatsoever ?

Hmm, well I was running it in an emulator. They're not super frequent, but they are there.
KingofGamesYami #7
Posted 09 December 2014 - 02:35 PM
It does noticeably freeze every few seconds though, maybe from a bunch of math.random calls?

I've not noticed any freezing, but then I'm using Mimic, so…

The individual 'bubbles' will freeze, but there should always be several moving. I will admit, I do have a lot of math.random calls - but I don't know of any way to speed that up.

Edit: I've updated the pastebin, see if the freezing still occurs. I made the sleep manually and threw everything inside it (If you've done this, you know what I did).
Edited on 09 December 2014 - 02:05 PM
Agent Silence #8
Posted 09 December 2014 - 04:34 PM
I made something like this as a test. First it was rain, then I changed it to this matrix type thing. Pastebin is MJvnXB2W
Geforce Fan #9
Posted 13 December 2014 - 06:16 AM
OneOS
the word most commonly spoke by Oeed
Edited on 13 December 2014 - 05:17 AM