Page 1 of 1

Playing a gif inside factorio

Posted: Wed Aug 26, 2015 5:34 am
by Hunab
Dancing girl gif created made famous by Chuck Pointer, made in an array of lights in factorio.
dancing.gif
dancing.gif (289.11 KiB) Viewed 29122 times
EDIT:
I did set the values of the lights by hand. Not sure how to start making a blueprint-string from a pixel matrix.

I was already happy with finding out how to split a gif in separate frames/images, how to get the pixel matrices of every unique image in a gif, and doing some modifications on the matrices.
FreeMat (a free tool comparable to matlab) did all the work.
and after the build was done, how to record your screen and make a gif from that to post on the forum.
That was all new for me.

I assigned the pixels I needed in the first unique image a value of 1 (if light is lid).
the pixels in the second a value of 2,
the third a value of 4,
fourth... 8,
and the fifth .. 16.

By adding all the matrices together I got the values I needed for the light.
If a pixel has a value of for example 13, then I send that signal for unique image one, three and four (because 1+4+8 = 13)
logic.jpg
logic.jpg (144.85 KiB) Viewed 28974 times
I have a clock counting from 0 to 9 (in red)
I have 10 non-unique frames and 5 unique images.
The green part gives me the value for at what count I need to show what unique image.
The blue part gives me the pixel nr (31 in total 1+2+4+8+16 = 31)

To show unique image one I send pixel nr
1, because 1 = 1
3, 1 + 2 = 3
5, 1 + 4 = 5
...
29, 1 + 4 + 8 + 16 = 29
31, 1 + 2 + 4 + 8 + 16 = 31

After figuring it all out, it was easy although a bit tedious to set the correct value to the lamps.

EDIT2: some typo's
EDIT3: I added the save file in a new comment below

EDIT4: using the newly added strikethrough function :) .
"Woohoo!" This made the news post. For more lights and logic, but way more advanced; check out Combinator Game of Life by DaveMcW.

Re: Playing a gif inside factorio

Posted: Wed Aug 26, 2015 7:12 am
by Smarty
:shock:

Re: Playing a gif inside factorio

Posted: Wed Aug 26, 2015 2:35 pm
by Alekthefirst
Now make me some combinator creation that can play Factorio; inception is happening guys!

Re: Playing a gif inside factorio

Posted: Wed Aug 26, 2015 3:30 pm
by sillyfly
Did you make it by hand?
I'm sure it can be possible to make an automated tool to convert animated gifs to Factorio blueprints :)

Also, I really like how the lighting effect makes a sort of "glow" around the animation.

Re: Playing a gif inside factorio

Posted: Wed Aug 26, 2015 3:51 pm
by Xterminator
My mind is blown. :o This truly amazing!
To think I can't even figure out how to use combinators and wiring for something simple like showing amount of something in a chest. Lol

Great job! Would love to see more of these.

Re: Playing a gif inside factorio

Posted: Thu Aug 27, 2015 6:35 am
by jeroon
that.. what.. wow..

Re: Playing a gif inside factorio

Posted: Thu Aug 27, 2015 9:28 am
by ssilk
The save of this would be cool.

Re: Playing a gif inside factorio

Posted: Thu Aug 27, 2015 2:32 pm
by Hunab
ssilk wrote:The save of this would be cool.
If I need to host the save externally, let me know. It is 16MB.
I am unsure about allowed size of attachments, or preferred practice.

The file was saved in Factorio 0.12.3
(100+ hours of gameplay, and 50 hours of messing around and alt-tabbing)

And I want to thank everyone for the positive comments.

EDIT: I found out how to use the console to set all the conditions for the lamps.
(I looked at the code found at https://forums.factorio.com/forum/vie ... =8&t=13997 , and with help from Narc on the Factorio IRC and the Lua manual I managed to understand and write some code)
EDIT2: Found two typo's in code. Corrected them
Code

Re: Playing a gif inside factorio

Posted: Fri Aug 28, 2015 7:45 am
by slpwnd
Brilliant :)

Re: Playing a gif inside factorio

Posted: Sun Sep 13, 2015 8:18 pm
by Twisted_Code
Unless I missed my guess, you based this on this, right?

Re: Playing a gif inside factorio

Posted: Sun Sep 13, 2015 8:56 pm
by Hunab
Twisted_Code wrote:Unless I missed my guess, you based this on this, right?
Yes. Your link is the 2.0 version. The source is the same. According to this article it is a sample animation from an old black & white Macintosh application called VideoWorks(1985), which was an early predecessor of Macromedia Director.

Chuck Pointer removed the shadow, colored it and added his name to the file. (forgetting the blinking pixel)
Early case of I made this?