Life tag testing

For scripts to aid with computation or simulation in cellular automata.
Locked
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 361 is now available on the lazyslug server

Enhancements in this build:
  • auto-shrink feature will automatically shrink selections to alive cells
    • new Auto-Shrink toggle button in Selection menu
    • hotkey Alt "A" to toggle
  • hotkey Ctrl+Shift "V" pastes to selection
Fixes in this build:
  • fixed bug when growing grid during drawing
  • fixed bug with undo/redo while drawing during playback
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:Seems like Ctrl+Space and Shift+Space as in Golly would be pretty near equivalent to an "evolve before pasting" option. That could be interesting, too, though -- especially if the bounding box of the pattern could change as you evolve it. Copy a pi-heptomino, evolve it 173 ticks, and paste 47x31 pi detritus? I can't exactly think why that would be useful, but it might be better in some ways than Golly's slightly weird bounding-box-limited behavior.
Rather than Advance Selection and Advance Outside I was thinking of allowing the selection and/or paste rectangle to be advanced. The bounding box would auto adjust to the pattern as it does so.

For the paste rectangle this is intuitive since it doesn't form part of the pattern until pasted. It sits "above" the pattern.

For the selection rectangle this is more tricky and I guess this is why Golly has Advance Selection and Advance Outside to make a clear boundary between the selection and the rest of the pattern. The selection bounding box becomes a mini-bounded grid (plane).

So in summary I may just have Advance work on the paste rectangle with auto-adjusting bounding box. Thoughts?
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:So in summary I may just have Advance work on the paste rectangle with auto-adjusting bounding box. Thoughts?
The auto-adjusting bounding box would be a big improvement over the mini-bounded-grid behavior in Golly, I think. I don't usually want things to smash into the selection boundary. In particular, it would be really nice to be able to select a single glider and advance it long distances, without having to select a big rectangular area (which will often pick up nearby mechanisms that I don't want to be involved with the glider advancement).
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 362 is now available on the lazyslug server

Enhancements in this build:
  • hotkey Shift "L" to cycle paste location
  • hotkey Shift "M" to cycle paste mode
  • hotkey Alt "L" to toggle annotation display (was previously hotkey Shift "L")
  • don't draw individual paste cells if zoom < 1 (just the paste rectangle)
  • Paste to Selection will tile the paste if the selection is bigger than the paste
  • Auto-Shrink no longer removes empty selections so they can be used for Paste Selection
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 363 is now available on the lazyslug server

Enhancements in this build:
  • a Paste (red box) may now be advanced by one or more generations
    • hotkey Ctrl "Space" to advance paste generation
      • select required cells (green box)
      • cut selection with Ctrl "X"
      • bring up Paste (red box) with Ctrl “V”
      • advance paste generation one or more times with Ctrl "Space"
      • yellow bounding box will show location of advanced paste
        • Ctrl+Shift "V" pastes to advanced position (yellow box)
        • left click or Enter pastes to mouse position (red box)
        • Esc cancels paste
        • Ctrl "Z" then Ctrl "X" to start paste again
  • selection and paste boxes now work with camera rotation
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:The auto-adjusting bounding box would be a big improvement over the mini-bounded-grid behavior in Golly, I think. I don't usually want things to smash into the selection boundary. In particular, it would be really nice to be able to select a single glider and advance it long distances, without having to select a big rectangular area (which will often pick up nearby mechanisms that I don't want to be involved with the glider advancement).
Dave, please try build 363 for this feature. I haven't made it a Release Candidate since it probably needs some testing :)

You can test it from here. Note it won't work yet with anything other than 2-state Life-like patterns.
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:Dave, please try build 363 for this feature. I haven't made it a Release Candidate since it probably needs some testing :)
I had a look at this yesterday, and got sidetracked trying to figure out if there was a reasonable feature request involving the mouse anchor point for floating selections.

What you have at the moment is similar to Golly -- five possible paste-location anchor points. If the selection is large enough and you want to precisely line up something in the universe with something near the middle of one of the edges, the paste operation can get pretty tricky.

If there was a way to allow arbitrary paste locations, then that would also improve the behavior of Alt+Space. Right now when the selection changes size as a result of evolution, the bounding box jumps around strangely. Even evolving a traffic-lights selection when the paste location is in a corner, causes diagonal jumps in the traffic-lights center location. Could fix that by using the center paste location, but even then there are problems with the offset changing if the selected pattern evolves asymmetrically.

Have you considered the idea of keeping the same paste location as a floating Paste pattern is evolved, even if the paste location is no longer in the corner or center of the floating rectangle? I'm not sure how that would work with the Paste Location slider bar, though.

Given the current limitation in paste locations, I really like the way the Advance Paste selection is shown in the universe, in relation to the original copied pattern. But that doesn't work so well if Cut has been used instead of Copy, or if the selection has been removed or moved to a different location.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:If there was a way to allow arbitrary paste locations...
Yes I'm thinking of adding the ability to select an arbitrary cell in the Paste Box and making it the paste location. Would work similar to the "Pick" control for choosing a colour to draw with.
This would appear in the Paste Location slider as "User Defined" when specified.

I'm also planning on adding the mid-points on each side of the Paste Box to the locations. So you'd now have:
Top Left, Top Middle, Top Right, Middle Left, Middle, Middle Right, Bottom Left, Bottom Middle, Bottom Right and (if specified) User Defined.
dvgrn wrote:Given the current limitation in paste locations, I really like the way the Advance Paste selection is shown in the universe, in relation to the original copied pattern. But that doesn't work so well if Cut has been used instead of Copy, or if the selection has been removed or moved to a different location.
For the two evolution cases (Advance Selection and Advance Outside) I'm planning on have the concept of "lifting" the cells in the current selection up. You'll see the lifted cells in the semi-transparent yellow Selection Rectangle.

For "Advance Outside" you can use the normal controls to step or play the pattern. The lifted cells will be ignored since they're above the grid but you'll still see them in their original location. At any point you can drop them back onto the grid. Since the lifted cells have effectively been cut from the grid there's no issue with any interaction between the grid and the lifted cells but you'll still see both.

For "Advance Selection" you can use Control-Space (or something) to advance the lifted cells in the yellow rectangle. Their bounding box will autofit as they evolve. When you're happy you can either just drop them back onto the grid (at the location shown in the yellow box) or use Ctrl-V in which case they yellow box will be replaced by the Red Paste box that you can then drop at an arbitrary position.

Until you drop the lifted cells you can arbitrarily Advance Outside and/or Advance Selection.
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

People seem to be having trouble with the new default Ctrl+C functionality, or the lack of it:
On Discord, Ian07 wrote:for the new version of lifeviewer you have to click the "sync" button in the top right and then press ctrl+C
no idea why
I'd like it better if the "Sync" option were turned on by default, at least for simple full-pattern copies where no selection has been made. Right now Ctrl+C no longer does anything by default, and LifeViewer doesn't pop up a message or anything to explain why it's ignoring Ctrl+C, or how to get RLE for the full pattern.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 364 is now available on the lazyslug server

Enhancements in this build:
  • there are now four additional standard paste locations: Top, Left, Right, bottom
  • Ctrl-C with no selection copies entire pattern to external clipboard
This build is a Release Candidate.
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

I haven't updated the LifeViewer version on my weblog yet, but I'm seeing a problem that can't be related to that, because it works for some existing blog posts and not others.

In this new post, LifeViewer takes up the entire width of the blog text, even though "width 480" is specified for the canvas.

For other blog posts like this one, LifeViewer seems to be showing up at the intended width.

No doubt it's something obvious. Do you happen to see whatever silly thing I managed to do wrong here?

Thanks...
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:In this new post, LifeViewer takes up the entire width of the blog text, even though "width 480" is specified for the canvas.
LifeViewer has a feature that lets you match (or limit) the width of the LifeViewer canvas to that of the textbox containing the pattern RLE.
In the build you're using (Build 259) this feature defaults to on. So LifeViewer is ignoring the "width 480" and setting the canvas to the width of the textbox.
dvgrn wrote:For other blog posts like this one, LifeViewer seems to be showing up at the intended width.
The reason these ones are the right width is because they have [[ WIDTH ]] script commands defined which overrides the "limit" setting.

Later builds of LifeViewer (in fact from Build 260 onwards!) made the limit width default to off so you won't see the issue even without specifically setting a [[ WIDTH ]].
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 365 is now available on the lazyslug server

Fixes in this build:
  • fixes for undo/redo during playback
  • selections now respect [[ VIEWONLY ]]
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 366 is now available on the lazyslug server

Enhancements in this build:
  • improved selection and paste boxes for offset-square grid and hexagonal grid
Fixes in this build:
  • create and clear selection were missing from undo/redo
  • horizontal and vertical flip were not working for paste
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 367 is now available on the lazyslug server

Enhancements in this build:
  • improved selection and paste boxes for triangular grid
  • improved performance for hexagonal grid selection display
Fixes in this build:
  • paste bottom left and bottom right positions were the wrong way round
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

rowett wrote:
dvgrn wrote:If there was a way to allow arbitrary paste locations...
Yes I'm thinking of adding the ability to select an arbitrary cell in the Paste Box and making it the paste location. Would work similar to the "Pick" control for choosing a colour to draw with.
This would appear in the Paste Location slider as "User Defined" when specified.
Is there requirement to have the arbitrary paste location outside of the Paste Box?
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:
rowett wrote:
dvgrn wrote:If there was a way to allow arbitrary paste locations...
Yes I'm thinking of adding the ability to select an arbitrary cell in the Paste Box and making it the paste location. Would work similar to the "Pick" control for choosing a colour to draw with.
This would appear in the Paste Location slider as "User Defined" when specified.
Is there requirement to have the arbitrary paste location outside of the Paste Box?
For ordinary copied patterns, no.

The weird exception that comes to mind is where you cut something mobile like a glider or spaceship, put it in the position where you want it, and then advance N generations before dropping it.

It would be very convenient if either the size of the paste box would increase, or if the paste location would stay in the same place relative to the moving object, so that you could just hit Ctrl+Space for the right number of ticks and then [Enter] to drop the advanced pattern into place without touching the mouse.

You currently have a "relative position" display to show where the advanced pattern is relative to the place where it was copied out. That's a really nice bit of functionality, but so far it hasn't been relevant for any editing tasks I can think of: an LWSS, for example, is just a LWSS, so I'm going to grab a sample of one from the nearest handy location, but I'm going to put it somewhere else entirely, maybe in a different orientation, and it doesn't really matter where it came from. It matters how far it gets Ctrl+Space advanced from the initial position where I start to paste it.

Does that help at all? I have to admit, I'm still pretty thoroughly stuck doing complex editing tasks in Golly -- haven't tried doing anything big or complex in LifeViewer yet. Partly this is because I tend to save my work under a new filename every few minutes, in case I make a mistake. Golly's unlimited Undo is nice, but still has a bug or two in it somewhere, so it's possible to lose work.

(It's also possible to lose work by Undo-ing back to an earlier version, and then deciding that I want the later version after all so I want to Redo back to the end of the chain... but I've accidentally done something silly and trivial like make a different selection, so all the later work has gotten cavalierly thrown away.)
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:It would be very convenient if either the size of the paste box would increase, or if the paste location would stay in the same place relative to the moving object, so that you could just hit Ctrl+Space for the right number of ticks and then [Enter] to drop the advanced pattern into place without touching the mouse.
Here is the proposed workflow:
  • Select some cells with the mouse (or Ctrl+A for Select All)
  • Advance the cells in the Selection some generations (with Ctrl+Space)
  • Paste the advanced cells
There are three options for pasting after advancing a selection (let's assume the advanced selection is bigger than the original):
  1. the actual displayed advanced position (Enter)
  2. the original selection position using the Paste Location setting to determine where relative to the original selection to paste (Ctrl+Shift+V)
  3. at a position defined with the mouse using standard paste functionality (Ctrl+V, move mouse, click or Enter)
Thoughts?
dvgrn wrote:I tend to save my work under a new filename every few minutes, in case I make a mistake.
That was one of the motivations for having 10 clipboards.
It's relatively easy to select a clipboard and copy the pattern to it: Alt+n (switch to Clipboard n), Ctrl+A (Select All), Ctrl+C (Copy), Alt+0 (switch to default Clipboard).

To restore: Ctrl+A (Select All), Del (Delete Selection), Alt+n (switch to Clipboard n), Ctrl+V (Paste), Alt+0 (switch to default Clipboard).

I may add further shortcuts to make that easier if you think it's useful. For example: Ctrl+Alt+n to save pattern to Clipboard n and Shift+Alt+n to restore pattern from Clipboard n - both of which wouldn't change the active Clipboard.
dvgrn wrote:Golly's unlimited Undo is nice, but still has a bug or two in it somewhere, so it's possible to lose work.
Having just implemented LifeViewer's unlimited Undo (in conjunction with the existing Step Back system) I can see why!
dvgrn wrote:(It's also possible to lose work by Undo-ing back to an earlier version, and then deciding that I want the later version after all so I want to Redo back to the end of the chain... but I've accidentally done something silly and trivial like make a different selection, so all the later work has gotten cavalierly thrown away.)
Yes this annoyed me recently while testing LifeViewer. If I get motivated enough I'll add some functionality for branching.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 368 is now available on the lazyslug server

Fixes in this build:
  • Advance Outside now works in a single step with Undo/Redo
  • Advance Outside now always uses Copy paste mode
  • fixed POPUPWIDTH validation
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 369 is now available on the lazyslug server

Enhancements in this build:
  • Performance improvement for cell history and longevity
  • Performance improvement when ZOOM < 1
  • THEMEs without history (Mono, Inverse, Golly, MCell, Caterer and Life32) and PASTE commands now have improved performance at STEP sizes > 1
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 370 is now available on the lazyslug server

Enhancements in this build:
  • performance improvement when ZOOM < -2
  • performance improvement for THEMEs without history and STEP size 1
  • performance improvement for THEMEs without history when ZOOM < 1
  • switching to a THEME without history clears history cells
Fixes in this build:
  • not all menu items were being drawn locked when menu locked
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 371 is now available on the lazyslug server

Enhancements in this build:
  • performance improvement for THEMEs without history
  • new script command [[ TIME ]] to trigger timing at a waypoint
  • waypoint messages can now use string substitutions #0 to #9 to display timing results as average frames per second
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 372 is now available on the lazyslug server

Enhancements in this build:
  • performance improvement for ZOOM < 1
  • performance improvement for THEMEs without history and ZOOM < 1
  • [[ TIME ]] output now has one decimal place
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 373 is now available on the lazyslug server

Enhancements in this build:
  • performance improvement for THEMEs with history
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 374 is now available on the lazyslug server

Enhancements in this build:
  • performance improvement for next generation (excluding LtL/HROT)
  • improved allocation speed for random grid
Fixes in this build:
  • population statistics were incorrect if stats were off and pattern had bounded grid
This build is a Release Candidate.
Locked