Golly Python Script
seems to be a very high-level code
almost pseudocode
after studying a few scripts,
it seems that there are connected .DLLs .LIBs etc.
PM2Ring's script that makes a BitMap Printer,
calls for a "dot matrix printer"
and there is only a bit of .rle pattern code in the whole script.
SO a lot of necessary code is elsewhere.
Is there a tutorial that would get me up to speed on this ?
I have just crafted a huge pattern, and I do not want to "sculpt" the code into ROM ( deleting gliders ).
What I need is a simple looping script that loops between two arrays which have one-for-one correspondence.
One array has all the ROM glider locations, the other has the "on" pixels from the bitmap selection ( glider present ).
At least, this is how I would go about coding it. But I notice that PM2Ring's script has no arrays at all, indicative of higher level
language. I appreciate any help I may get with this, it would be better than "winging it". But I want to see my creation in action - - - - -
that is only normal - Thank You ! ! !
folks at conwaylife.com are TOPS !
attd is the pattern I want script for :
Thank You !
Device Specific Scripting
Device Specific Scripting
- Attachments
-
- P736-LWSS-MEMunit-with-LoaferPrintHead-128-Registers-Ortho_Polygonal_Number_One.rle
- script needed to select image and insert into ROM
- (1.56 MiB) Downloaded 99 times
Last edited by otismo on November 1st, 2020, 1:35 pm, edited 2 times in total.
"One picture is worth 1000 words; but one thousand words, carefully crafted, can paint an infinite number of pictures."
- autonomic writing
forFUN : http://viropet.com
Art Gallery : http://cgol.art
Video WebSite : http://conway.life
- autonomic writing
forFUN : http://viropet.com
Art Gallery : http://cgol.art
Video WebSite : http://conway.life
Re: Device Specific Scripting
There really aren't, in most cases -- or rather, the libraries that get used more often are installed as a standard part of the Python language. You do have to add an "import" line at the top of the script to use some features, and sometimes you have to use 'pip' -- the Package Installer for Python -- to go out and get a library if it isn't installed.
If a Golly script contains a line at the top like "from glife import *" -- that's a Golly-specific library; the source code can be found in Scripts/Python/glife.
Nope, all the necessary RLE is right there. A p30 bitmap printer has a lot of duplication, and really doesn't need a lot of RLE.
-- At least, that's true if you're talking about this version. There were some versions posted before that, that only work from the Python command line, or only work with Golly 1.x. They do some unnecessarily complicated things with 'exec', writing out a Python script that then builds the pattern, etc. Just don't look at those versions until you've made sense of the version I linked to.
You wouldn't technically need arrays, because you could use the Golly universe itself as data storage -- but there are in fact arrays in PM 2Ring's code. Have a look at get_bitmap() -- it's all fairly standard stuff.