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

Behold, I give you... Fire! [demo]

Started by GopherAtl, 15 March 2013 - 04:12 PM
GopherAtl #1
Posted 15 March 2013 - 05:12 PM

pastebin get 4CY4AYj3 fire

q quits, d toggles the character dithering (I think it looks better on, but you be the judge)

works on monitors, just run with "monitor <side> fire"
nitrogenfingers #2
Posted 15 March 2013 - 05:15 PM
That's pretty brilliant :D/>
SuicidalSTDz #3
Posted 15 March 2013 - 05:20 PM
Wow, I never would have thought someone would do this… Looks great though! (*cough* multi/different color settings *cough*) ^_^/>

EDIT: Why are you standing in front of a furnace? Did that spark your imagination? :P/>
GopherAtl #4
Posted 15 March 2013 - 05:21 PM
Thanks! It looks better in game than in the crappy gif, just for the record. :)/>

It's easier than it looks, it's an old-school 2d fire effect that was used a lot back in the 90s.

Also worth noting, it redraws the entire screen every tick, so, uh, not really recomended for smp use…

SSTDz: eh? no furnaces around there. I'm on a platform in the sky, with nothing but smooth stone, a computer, and an 8x4 monitor.
LBPHacker #5
Posted 15 March 2013 - 09:49 PM
@SSTDz: Actually, in the background (what looks like a Furnace) that's a monitor with fire running on it :D/>
oeed #6
Posted 15 March 2013 - 10:11 PM
Wow.
Cruor #7
Posted 15 March 2013 - 11:33 PM
Oh my, that is some nice looking fire :o/>
Could be cool for a screensaver or silly fake fireplace :D/>
KaoS #8
Posted 16 March 2013 - 12:09 AM
this looks great! :o/> well done :)/>
SuicidalSTDz #9
Posted 16 March 2013 - 12:20 AM
@SSTDz: Actually, in the background (what looks like a Furnace) that's a monitor with fire running on it :D/>
Well it fooled me… Then again, it was 3 am when i made that post ^_^/>
NonStopGamer #10
Posted 16 March 2013 - 02:29 AM
@SSTDz: Actually, in the background (what looks like a Furnace) that's a monitor with fire running on it :D/>/>
Well it fooled me… Then again, it was 3 am when i made that post ^_^/>/>
You know it's a good program when someone mistakes it for a furnace.
GopherAtl #11
Posted 16 March 2013 - 02:43 AM
heh. thanks, all.

Delayed response, SSTDz, if you want to change the colors, there's a couple of tables at the top of the file, dither has the characters used, in order, to shade between colors, and then ranges has the list of color ranges used, in bg/fg color pairs. You can add or remove elements from either table, it will adapt - though if you change the total number of possible values, it will affect the flames.
NonStopGamer #12
Posted 16 March 2013 - 02:49 AM
heh. thanks, all.

Delayed response, SSTDz, if you want to change the colors, there's a couple of tables at the top of the file, dither has the characters used, in order, to shade between colors, and then ranges has the list of color ranges used, in bg/fg color pairs. You can add or remove elements from either table, it will adapt - though if you change the total number of possible values, it will affect the flames.

Possibly a menu within the program to change these values?

Cause that would be so awesome.
oeed #13
Posted 16 March 2013 - 02:53 AM
I haven't really had a good look at the code, but would this allow you draw a circle and make it 'fade out'. Sort of like a feathering effect on Photoshop.
Dlcruz129 #14
Posted 16 March 2013 - 03:12 AM
This is pretty damn awesome! I might use this as a fireplace or something.
Cranium #15
Posted 16 March 2013 - 03:13 AM
AMAZING. I put it on my emulator at work, and my coworkers were constantly looking over my shoulder at it, like they were transfixed. You, sir, deserve a standing ovation!
PixelToast #16
Posted 16 March 2013 - 05:17 AM
looks awesome :3
Simon #17
Posted 16 March 2013 - 05:38 AM
Wow, I could stare at that for hours
zekesonxx #18
Posted 16 March 2013 - 06:21 AM
Amazing. I'm totally setting this up with a monitor like a fireplace.
SuicidalSTDz #19
Posted 16 March 2013 - 07:48 AM
heh. thanks, all.

Delayed response, SSTDz, if you want to change the colors, there's a couple of tables at the top of the file, dither has the characters used, in order, to shade between colors, and then ranges has the list of color ranges used, in bg/fg color pairs. You can add or remove elements from either table, it will adapt - though if you change the total number of possible values, it will affect the flames.
Didnt even notice that table… Too distracted by the flames ^_^/>
BigSHinyToys #20
Posted 16 March 2013 - 08:31 AM
Dude great program now add random color shifting like a lava lamp. ow and +1
remiX #21
Posted 16 March 2013 - 08:32 AM
The gif goes so fast! Haha

Looks nice :P/>
Now main … rain O_o lol

Rain on the fire xD
TheOddByte #22
Posted 16 March 2013 - 09:45 AM
This look awesome and clean!
Cranium #23
Posted 16 March 2013 - 09:54 AM
Now to make lava.
KaoS #24
Posted 16 March 2013 - 11:36 AM
Now main … rain O_o lol

Rain on the fire xD

haha is this a reference to "set fire to the rain"? just checking…
remiX #25
Posted 16 March 2013 - 11:55 AM
Now main … rain O_o lol

Rain on the fire xD

haha is this a reference to "set fire to the rain"? just checking…

I actually did think of that as I wrote it but I didn't mean it :P/>
I Just meant make it rain on the fire and the fire then get's put out xD lol
Shnupbups #26
Posted 16 March 2013 - 12:20 PM
Can I have permission to use something of this fashion in a future version of CCScreensaver? I think it looks pretty darn cool.
GopherAtl #27
Posted 16 March 2013 - 12:33 PM
feel free to do with the code as you wish. If you include my code directly, credit would of course expected and appreciated.
Negeator #28
Posted 21 March 2013 - 07:16 AM
Finally! By running this on a monitor I can now have a fireplace that doesn't burn my house down!

Anyways, looks great. I'm surprised that it's able to animate so smoothly and without any sort of tearing or flickering.
AnDwHaT5 #29
Posted 21 March 2013 - 07:33 AM
something so simple in real life simply amazing in computercraft me put on monitor and in fire pit!!!
K-dence #30
Posted 21 March 2013 - 08:35 AM
Jesus! It's great!

I can implented this in my OS for screensaver?

EDIT :

feel free to do with the code as you wish. If you include my code directly, credit would of course expected and appreciated.

Lol. Ignore my question ^^
jesusthekiller #31
Posted 25 July 2013 - 07:54 AM
Amazing, now make it interact with mouse :D/>


  { colors.black, colors.gray, },
  { colors.gray, colors.red, },
  { colors.red, colors.orange, },
  { colors.orange, colors.yellow, },
  { colors.yellow, colors.white, },

is better tho :P/>





  { colors.black, colors.gray, },
  { colors.gray, colors.red, },
  { colors.red, colors.orange, },
  { colors.orange, colors.yellow, },
  { colors.yellow, colors.white, },
  { colors.white, colors.yellow, },
  { colors.yellow, colors.orange, },
  { colors.orange, colors.red, },
  { colors.red, colors.gray, },

w/o dithering O.o
GravityScore #32
Posted 25 July 2013 - 08:33 AM
This would be the coolest thing to include in the submissions for treasure disks thingy!! :D/>

I can just see someone opening the disk, seeing something called RUN_FOR_FIRE, wondering what the hell it does, then being transfixed by the awesomeness :P/>
jesusthekiller #33
Posted 25 July 2013 - 09:06 AM
It's already sent :P/>
GravityScore #34
Posted 25 July 2013 - 10:11 AM
It's already sent :P/>

Whoops, just saw that now :P/>
GopherAtl #35
Posted 25 July 2013 - 01:16 PM
indeed, submitted! Also, glad you bumped this, as I forgot to do so myself when I updated it for the treasure disk submission.

I have tweaked the program so it will now run monochromatic fire on b&amp;w computers. Which isn't nearly as cool, obviously, but still looks pretty neat, and is less disappointing than a message saying "color computer required."
Geforce Fan #36
Posted 25 July 2013 - 01:26 PM
Change the table "dithers" to:
"-".
"o",
"l",
"o",
"m",
"g".
"x",
"D",
for a troll's fireplace.
jesusthekiller #37
Posted 25 July 2013 - 03:10 PM
  • LocationLiberty, MO, United States, America, Earth, Solar System, Milky Way, Universe, 4th Dimension

Don't type something if you don't know what it means. . .

You exist in (at least) all 11 dimensions…
Mitchfizz05 #38
Posted 25 July 2013 - 05:20 PM
Wow… amazing! =D

At first I thought you used a photo editing program for it, but then I zoomed in.

Edit: 1+
Geforce Fan #39
Posted 25 July 2013 - 07:26 PM
  • LocationLiberty, MO, United States, America, Earth, Solar System, Milky Way, Universe, 4th Dimension

Don't type something if you don't know what it means. . .

You exist in (at least) all 11 dimensions…
probably, but I put that in (1) year(s) ago.
Zudo #40
Posted 26 July 2013 - 11:56 AM
AMAZING. I put it on my emulator at work, and my coworkers were constantly looking over my shoulder at it, like they were transfixed. You, sir, deserve a standing ovation!

:o/> What is your job?
Zudo #41
Posted 26 July 2013 - 12:03 PM

local ranges= {
  { colors.black, colors.lightGray, },
  { colors.white, colors.lightBlue, },
  { colors.blue, colors.blue, },
  { colors.blue, colors.lightBlue, },
}

change the ranges table to this :)/>
Thib0704 #42
Posted 26 July 2013 - 12:21 PM
Holy Beep, This is amazing :D/>
svdragster #43
Posted 27 July 2013 - 08:17 AM
I always keep this running in the background ^^
Dave-ee Jones #44
Posted 29 July 2013 - 03:56 AM
"I don't like it. I want BLUUEEEEE!" (typical 2 year old complaint)

This is great :D/>
Would be an awesome screensaver for an OS or something…
jay5476 #45
Posted 15 August 2013 - 05:13 AM
This should be a program found on disks :)/>
theoriginalbit #46
Posted 15 August 2013 - 05:43 AM
This should be a program found on disks :)/>
It is……………………… it's under `fire` in the post Gopher made…
xXLeNinjaXx #47
Posted 28 December 2013 - 04:39 PM
Is there one u can display on a advanced monitor?
TheOddByte #48
Posted 28 December 2013 - 09:19 PM
If you look at the screenshot he's running it on a monitor..
He's probably using 'monitor <side> program'
You can just do this in a file

shell.run( "monitor", "<side>", "fire" )