Author Topic: Batch export vector draw commands one by one  (Read 847 times)

0 Members and 1 Guest are viewing this topic.

Offline Collector

Re: Batch export vector draw commands one by one
« Reply #15 on: October 14, 2020, 07:55:42 PM »
It was early AGI in general. I have a booter image that draws that slowly if I drop the DOSBox cycles low enough.
KQII Remake Pic

Offline MusicallyInspired

Re: Batch export vector draw commands one by one
« Reply #16 on: October 14, 2020, 08:08:03 PM »
I don't think that would be necessary. I'd be content with such a feature that just *bam* painted the floodfill without any extra frames of animation.
Brass Lantern Prop Competition

Offline cosmicr

Re: Batch export vector draw commands one by one
« Reply #17 on: October 14, 2020, 10:10:09 PM »
Okay, here it is attached.

It's a windows executable. I wrote it in Linux, but I'm hopeless at portable stuff(I don't get libraries), so hopefully it works.

It's got a heap of debugging text which you can ignore but basically run it as:

Code: [Select]
scipictureviewer.exe pic.000
It will churn away for a minute or so, saving all the frames to the current directory.

Here is an example of output. Like others have said, it would look better if it had all the parts of each command, but still cool. Also these files are huge (for animated gifs).


This was a fun little exercise.  I wrote this viewer as a way to understand how picture resources work, it's not perfect, I have some bugs with patterns, filling, and control/priority screens at the moment, but it's good enough for this. Disclaimer: anything that goes wrong is not my problem!

And for what it's worth - it IS just as easy to use GifCam on Sci Companion, I only made this for fun and education.

Offline MusicallyInspired

Re: Batch export vector draw commands one by one
« Reply #18 on: October 14, 2020, 11:21:07 PM »
This is super cool thanks for sharing!! Works great on Windows except it just hangs after it's finished and doesn't seem to do anything. Pressing CTRL+C drops back to prompt easily enough, though.

I notice it does get some pen tool pixel drawing wrong but that's expected as you said there are some bugs. I just made the final frame a capture of the proper final image and nobody's the wiser.
« Last Edit: October 15, 2020, 01:04:24 AM by MusicallyInspired »
Brass Lantern Prop Competition

Offline cosmicr

Re: Batch export vector draw commands one by one
« Reply #19 on: October 15, 2020, 12:03:46 AM »
Awesome glad I could help!

Not sure why it hangs - it's supposed to open a window with the finished image. Did it report 0xFF end of picture at the end?

Meh, like I said, cross-platform programming isn't my forte - I was coding in linux, but linux executable distribution is hard, so I ported it to windows, but god knows what issues that could have introduced.

That Zelda title screen looks awesome. Looking forward to seeing more animated gifs!

Offline MusicallyInspired

Re: Batch export vector draw commands one by one
« Reply #20 on: October 15, 2020, 01:06:11 AM »
Ah I just ran it again and a new window DID pop up showing the final image. Before it just said END OF PICTURE. Though, maybe I didn't just didn't notice the new window popup the first time for whatever reason. So it works as expected after all.
Brass Lantern Prop Competition

Offline ZvikaZ

Re: Batch export vector draw commands one by one
« Reply #21 on: October 15, 2020, 03:27:58 AM »
Okay, here it is attached.

It's a windows executable. I wrote it in Linux, but I'm hopeless at portable stuff(I don't get libraries), so hopefully it works.

It's got a heap of debugging text which you can ignore but basically run it as:

Code: [Select]
scipictureviewer.exe pic.000
It will churn away for a minute or so, saving all the frames to the current directory.

Here is an example of output. Like others have said, it would look better if it had all the parts of each command, but still cool. Also these files are huge (for animated gifs).


This was a fun little exercise.  I wrote this viewer as a way to understand how picture resources work, it's not perfect, I have some bugs with patterns, filling, and control/priority screens at the moment, but it's good enough for this. Disclaimer: anything that goes wrong is not my problem!

And for what it's worth - it IS just as easy to use GifCam on Sci Companion, I only made this for fun and education.

That's great!
Maybe you could share the source file(s)?
(maybe even in GitHub?)

Offline cosmicr

Re: Batch export vector draw commands one by one
« Reply #22 on: October 15, 2020, 06:13:26 PM »
That's great!
Maybe you could share the source file(s)?
(maybe even in GitHub?)

At the moment it's a mess of spaghetti code and commented out sections all over the place, as well as the bugs I mentioned - but if I end up fixing it up I'll put the code online.

If you're really interested in how it works I only learned from the FreeSCI documentation on the SCI Wiki, along with my own experiments with a hex editor. I documented everything I learned here:http://sciwiki.sierrahelp.com//index.php?title=Picture_Resource. I used SFML for the pixel routines and saving to PNG.

Offline Kawa

Re: Batch export vector draw commands one by one
« Reply #23 on: October 17, 2020, 07:01:31 AM »
Phil added a GIF exporter to SCI Companion, but it only works if there's a 999.pal. Naturally, no SCI0 game would have a palette resource.

So when I copied this feature, I altered it to use the current picture's embedded palette (SCI1 or better) or a hardcoded CGA. And here's the result.

This is not yet available from the link in my signature.
« Last Edit: October 17, 2020, 09:06:53 AM by Kawa »

Offline troflip

Re: Batch export vector draw commands one by one
« Reply #24 on: October 17, 2020, 11:21:35 AM »
You made quick work of that!
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Batch export vector draw commands one by one
« Reply #25 on: October 17, 2020, 12:06:52 PM »
What is quick work, really? Phil added it twelve hours ago at the time I write this, and I finished backporting it three hours ago.

Edit: I'm an idiot who didn't recognize "troflip". I'm too used to "Phil". Awk-ward~
« Last Edit: October 17, 2020, 03:22:17 PM by Kawa »

Offline MusicallyInspired

Re: Batch export vector draw commands one by one
« Reply #26 on: October 17, 2020, 01:07:43 PM »
Lovely! I appreciate this work! :D
Brass Lantern Prop Competition


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.106 seconds with 24 queries.