Jump to content




Bubbles!


8 replies to this topic

#1 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

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 by KingofGamesYami, 09 December 2014 - 03:19 PM.


#2 thenextntnick

  • Members
  • 8 posts
  • Location'murica

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:
Posted Image

Pastebin: 3CeFxk9X

#3 cdel

  • Banned
  • 496 posts
  • LocationMelbourne, Australia

Posted 09 December 2014 - 06:08 AM

This is really awesome, looks very sexy and is very memorizing. :D

#4 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

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?

#5 cdel

  • Banned
  • 496 posts
  • LocationMelbourne, Australia

Posted 09 December 2014 - 06:45 AM

 oeed, on 09 December 2014 - 06:38 AM, said:

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 ?

#6 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 09 December 2014 - 08:01 AM

 cdel, on 09 December 2014 - 06:45 AM, said:

 oeed, on 09 December 2014 - 06:38 AM, said:

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.

#7 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 09 December 2014 - 02:35 PM

 oeed, on 09 December 2014 - 06:38 AM, said:

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 by KingofGamesYami, 09 December 2014 - 03:05 PM.


#8 Agent Silence

  • Members
  • 319 posts
  • Location[string "FindMe"]:23143: bad argument #1 to 'returnPos' (vector expected, got nil)

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

#9 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 13 December 2014 - 06:16 AM

 oeed, on 09 December 2014 - 06:38 AM, said:

OneOS
the word most commonly spoke by Oeed

Edited by Geforce Fan, 13 December 2014 - 06:17 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users