Pattern viewer for forum threads

For discussion directly related to ConwayLife.com, such as requesting changes to how the forums or home page function.
JohanB
Posts: 16
Joined: June 10th, 2016, 11:59 pm

Re: Request: close shortcut key and grab focus on start.

Post by JohanB » June 14th, 2016, 4:35 am

The options are:
  1. [esc] closes the standalone LifeViewer but pauses playback on the inline LifeViewers
  2. [esc] closes the standalone LifeViewer and does nothing on the inline LifeViewers
  3. we pick a different shortcut key
Feel free to vote!
My preference would be to option 1. [esc] closes the player if popup and pauses it if inline.
That way [esc] = "I'm done now and ready to move on to the next post."

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

Re: Request: close shortcut key and grab focus on start.

Post by rowett » June 14th, 2016, 10:53 am

JohanB wrote:My preference would be to option 1. [esc] closes the player if popup and pauses it if inline.
Try this build. The standalone viewer also grabs the keyboard focus (until you click somewhere else or move the mouse over and then off the viewer).

JohanB
Posts: 16
Joined: June 10th, 2016, 11:59 pm

Re: Request: close shortcut key and grab focus on start.

Post by JohanB » June 15th, 2016, 4:26 pm

rowett wrote:
JohanB wrote:My preference would be to option 1. [esc] closes the player if popup and pauses it if inline.
Try this build. The standalone viewer also grabs the keyboard focus (until you click somewhere else or move the mouse over and then off the viewer).
Yep that works like a charm. Very nice.

BTW what do you use to program the player in?
Do you use some sort of js IDE/framework? Just curious.

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

Re: Request: close shortcut key and grab focus on start.

Post by rowett » June 15th, 2016, 5:00 pm

JohanB wrote:Do you use some sort of js IDE/framework? Just curious.
It's just Javascript, no libraries, wrote it all from scratch. The "IDE" is vim and the Chrome Developer tools :D

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

Re: Pattern viewer for forum threads

Post by rowett » June 30th, 2016, 5:19 pm

Build 200 is now live on conwaylife.com

Please note: you will need to refresh your browser to use the new build

Enhancements since the last released build:
  • LifeViewer now works on LifeWiki
  • new AutoFit engine that has different ways of tracking patterns with the camera - test
    1. AUTOFIT
      • glides the camera towards the current generation bounding box
      • good for arbitrary patterns
      • not recommended for low GPS playback
    2. TRACK X Y
      • you define X and Y velocities in cells/generation (can be specified as fractions)
      • glides the camera towards the bounding box defined by the initial pattern bounding box offset by T*X, T*Y (where T is the current generation)
      • good for tracking fixed size spaceships including low GPS playback
    3. TRACKBOX E S W N
      • you define the East, South, West and North velocities in cells/generation
      • glides the camera towards the bounding box defined by the initial pattern bounding box whose edges are offset by T*E, T*S, T*W and T*N
      • good for tracking growing spaceships including low GPS playback
    4. TRACKLOOP P X Y
      • you define P (the period) and X and Y velocities in cells/generation
      • shorthand for LOOP P TRACK X Y but also works well with GRIDMAJOR
      • good for tracking fixed size spaceships since the LOOP means the pattern never hits the grid edge
      • not good for Themes that show history
    5. HISTORYFIT modifies any of the four above modes to include cells that have died into the bounding boxes
      • good for showing where a pattern has ever been
      • shift and hotkey "h" to toggle
    • AutoFit only locks the pan and zoom controls when Playing and unlocks all the controls when playback Paused
    • if AutoFit defined then first Reset disables it, and second Reset enables
    • toggle AutoFit with shift and hotkey "f" or the "Auto" button at the top left
  • thumbnail mode enhancements
    • new script command [[ THUMBSIZE ]] to define thumbnail divisor (2, 3 or 4)
    • new script command [[ THUMBLAUNCH ]] which creates a thumbnail that when clicked on launches the standalone viewer
    • [[ THUMBNAIL ]] script command creates a thumbnail that when clicked on expands inline
      • when a thumbnail is expanded briefly display the hotkey ("n") to shrink
  • reset behaviour
    • first Reset will restore the pattern to T=0 and reset the camera but disable AUTOSTART, AutoFit, LOOP, STOP and Waypoints if defined
    • second Reset while at T=0 will enable whichever of AUTOSTART, AutoFit, LOOP, STOP and Waypoints were defined
    • notification displayed when defined items are switched on or off during Reset
    • new UI indicators for AUTOSTART, LOOP, STOP and Waypoints (grey: not defined, coloured: defined, highlighted, enabled)
    • shift and hotkey "r" will reset all viewers including the current one
  • standalone viewer usability enhancements
    • hotkey "Esc" will close the standalone viewer
    • standalone viewer grabs focus when it opens
    • [[ TITLE ]] string is now correctly clipped to the title bar
    • close button is now larger
  • pattern format support
    • added support for #CXRLE Gen
      • shift and hokey "g" toggles generation display between absolute generation and offset from start
      • generations >= a billion are shown as "1B+" in the UI
  • information bar
    • displays the current camera X, Y and ANGLE and the TRACKBOX speeds
    • shift and hotkey "i" to toggle display of the information bar
    • new script command [[ SHOWINFOBAR ]] which turns the information bar on at pattern load
  • "Life ended at" notification
    • new script command [[ NOREPORT ]] that disables the "Life ended at generation" notification
    • notification is not shown if all cells die but LOOP is defined and enabled
  • script numeric values
    • numeric values in scripts can now be specified as fractions [[ DEPTH 2/3 TRACK 0 -1/10 ]]
    • divison by zero is treated as zero
  • UI
    • default grid line colours are now based on brightness of background colour
    • reduced the font size of the population statistics, rule, elapsed time and mouse coordinates
Fixes since the last released build:
  • UI and display issues
    • saving (hotkey "v") and restoring (shift and hotkey "v") camera position now works with thumbnail view
    • fixed display flicker while looping
    • ensure navigation menu appears above population statistics
    • angle, layers and depth hotkeys were not disabled when corresponding UI controls were disabled
  • Waypoint mode
    • patterns with Waypoints defined and no Theme were defaulting to the wrong theme
    • patterns with Waypoints defined were ignoring initial ZOOM
    • Waypoint playback at < 60 GPS was not spending enough time at T=0
    • fixed an issue with Waypoints using AUTOFIT when in THUMBNAIL mode
  • algorithms
    • fixed an issue with Generations algorithm when only decaying cells remain
  • decoders
    • rle patterns beginning with "o" were being treated as Cells format and failing to decode
  • general
    • fixed an edge case where the grid could grow too late based on the increase in maximum STEP size
The updated hotkey map detailing the LifeViewer keyboard controls is here.

Comments, feedback, suggestions and bug reports welcome!

simeks
Posts: 408
Joined: March 11th, 2015, 12:03 pm
Location: Sweden

Re: Pattern viewer for forum threads

Post by simeks » July 2nd, 2016, 3:29 pm

@rowett: Thanks for all your great work on the pattern viewer!

I noticed a feature that I thought was really helpful seems to have gone missing in the latest update:

When zooming in on a pattern while playing it and then pressing reset, the zoom level is now restored to fit the whole pattern.

Before, it used to retain the current zoom level and not restore it until the second time you press reset, and I really preferred that behaviour.

User avatar
muzik
Posts: 5650
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik » July 2nd, 2016, 3:52 pm

Will LifeViewer ever be released as a standalone app?

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

Re: Pattern viewer for forum threads

Post by rowett » July 2nd, 2016, 4:23 pm

simeks wrote:When zooming in on a pattern while playing it and then pressing reset, the zoom level is now restored to fit the whole pattern.

Before, it used to retain the current zoom level and not restore it until the second time you press reset, and I really preferred that behaviour.
True, that changed in the latest release.

The Reset behaviour is as follows:
  • First reset
    • Restores the pattern to generation 0
    • Disables any of AutoFit, AUTOSTART, LOOP and Waypoints that are defined
    • Resets the camera position (ZOOM, ANGLE, X and Y)
  • Second reset (while at generation 0)
    • Enables any of AutoFit, AUTOSTART, LOOP and Waypoints that are defined
    • Resets the camera position (ZOOM, ANGLE, X and Y)
    • Resets Theme, LAYERS, DEPTH, GPS and STEP
In the previous releases the First reset did not reset the camera (which can be manually reset at any time using hotkey "v"). Given we have a vote for the old method what do other people prefer?

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

Re: Pattern viewer for forum threads

Post by rowett » July 2nd, 2016, 4:24 pm

muzik wrote:Will LifeViewer ever be released as a standalone app?
Did you mean as an iPhone App or Android App? If so, then no.

JohanB
Posts: 16
Joined: June 10th, 2016, 11:59 pm

Re: Pattern viewer for forum threads

Post by JohanB » July 7th, 2016, 4:45 pm

rowett wrote: In the previous releases the First reset did not reset the camera (which can be manually reset at any time using hotkey "v"). Given we have a vote for the old method what do other people prefer?
I personally like the new behaviour. Reset just resets. It's not a showstopper so if @simeks feels strongly about the issue I'll happily defer.

wildmyron
Posts: 1544
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: Pattern viewer for forum threads

Post by wildmyron » July 7th, 2016, 11:44 pm

rowett wrote:In the previous releases the First reset did not reset the camera (which can be manually reset at any time using hotkey "v"). Given we have a vote for the old method what do other people prefer?
I quite liked the old behaviour in the following scenario:

Run a pattern at low zoom and notice an interesting interaction somewhere. Zoom in on that area to observe the reaction by doing reset and then play until the active pattern reaches the zoomed in area. Then pause and advance slowly to watch how the reaction take place in detail.

When I want to do this in Golly, I have to take careful note of the position, reset, then zoom into the desired region and so I developed a habit of preferring to watch certain patterns on the forum. In Lifeviewer, I guess this is a redundant process because it's possible to step back rather than reset (in Golly it's possible to Undo without reset, provided the pattern has been paused since Gen 0; if not, the reset is the only option). I presumed the behaviour in Lifeviewer changed for compatibility with Golly, but I had no idea that a second reset was different from the first. Was the old behaviour to reset the camera position with the second reset? If so I would prefer to go back to that behaviour, but like JohanB I don't feel strongly about it as the step back functionality provides a convenient workflow to achieve the same result.

P.S. I think the features added to Lifeviewer in the last two versions have been significant additions to the viewer and help make it a fantastic piece of software for this, and other, websites. Thank you Chris, for your great work.
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

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

Re: Pattern viewer for forum threads

Post by rowett » July 8th, 2016, 2:44 am

wildmyron wrote:I presumed the behaviour in Lifeviewer changed for compatibility with Golly
Not especially. It was part of an initiative to make the LifeViewer UI more consistent. In this case though I think I also prefer the old behaviour. But still time to vote!

Thanks for your feedback.

M. I. Wright
Posts: 372
Joined: June 13th, 2015, 12:04 pm

Re: Pattern viewer for forum threads

Post by M. I. Wright » July 8th, 2016, 3:15 am

wildmyron, I agree 100% with your first two (and final!) paragraphs - I also much preferred the old reset behavior of the LV - but you should know that Golly actually has the option to preserve zoom and location when resetting! It's in the View tab of the settings/preferences, if memory serves.

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

Re: Pattern viewer for forum threads

Post by rowett » July 12th, 2016, 11:50 am

The voting is closed. The old reset behaviour will be reinstated. New build release is imminent. Thank you!

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

Re: Pattern viewer for forum threads

Post by rowett » July 14th, 2016, 9:40 am

Build 206 is now live on the Forums and LifeWiki

Please note: you will need to refresh your browser to use the new build

Enhancements since the last released build:
  • [[ TRACK ]], [[ TRACKLOOP ]] and [[ TRACKBOX ]] now use Dynamic Origin rather than AutoFit - test
    • all controls (including AutoFit) available during playback
    • Track mode can be switched on/off with hotkey "w" or by clicking the "TRACK" UI Indicator
    • Track mode may not be used with Waypoints
  • Thumbnail improvements - test
    • text messages defined in scripts now appear in Thumbnail mode
    • "Expand" and "Launch" messages are now vertically centred
    • script error indication is shown in Thumbnail mode
    • added Shrink button to navigation menu which shrinks the Viewer back to a Thumbnail
    • timing display now positioned correctly in Thumbnail mode
  • Gridlines
    • gridlines are now more accurate
    • drawing gridlines is about 10% faster
    • shift and hotkey "x" toggles major gridlines if not disabled with [[ GRIDMAJOR 0 ]]
    • gridlines UI button now reflects hex/square display mode
  • timing display
    • new "FPS" button in navigation menu to toggle timing display
    • improved formatting of timing information
    • shift and hotkey "t" toggles extended timing information
  • UI improvements
    • by "popular" demand first Reset no longer resets camera
      • use hotkey "v" or second Reset to reset camera
    • Waypoint/Track mode and [[ LOOP ]] can be toggled by clicking the UI Indicators
      • if both are defined then they toggle together
    • Help hides population statistics overlay and navigation menu
    • improved AutoFit and Fit Zoom icons
    • added Tool Tips for UI controls (hover the mouse over a control briefly to view)
    • improved notification when [[ STOP ]] generation reached
    • coordinates label now disappears if coordinates aren't displayed and generation statistics are off
  • script commands
    • [[ NOREPORT ]] now also disables [[ STOP ]] notification - test
    • you can now use [[ Z ]] as an alias for [[ ZOOM ]]
  • rule aliases
    • added 19 new rule aliases
Fixes since the last released build:
  • Generations rules were failing to draw some decay states at T=0 - test
  • the vertical bounding box calculation was slightly incorrect for AutoFit
  • error is raised if [[ TRACKBOX ]] W is greater than E or S is greater than N
  • Stars and coordinate display were using angle in Hex display mode (which doesn't allow rotation)
  • Step Back no longer disables [[ LOOP ]] if defined
  • fixed issue with pausing playback and slow GPS tracking
The updated hotkey map detailing the LifeViewer keyboard controls is here.

Code: Select all

#C [[ TRACKBOX 0 0 -1/12 -1/12 ]]
#C [[ THEME 4 STARS STOP 3429 AUTOSTART WIDTH 480 ]]
x = 51, y = 34, rule = B3/S23
32bo$30b2ob2o$32bo$47b2o$46bo2bo$33b2o11b2ob2o$32bo2bo11bo$31b2o3bo10b
3o$31bo4bo$31bo3bo$32bo2bo$33bo3$21bo7bo14b2o$20b3o5bobo12bob2o$19b2ob
4o2bo2bo10b2o$20b3o2bo18bo$21bo2b2o2bo$25b2obobo$29bo10b2o$40b2o2$3o$
4bo28bo$4b2o13bo12bobo$4bo2bo11bo12bobo$5bobo11bo13bo$5bo$4b2o15bo$3bo
bo14bobo$5b2o14bo$2b2o$4bo!
Comments, feedback, suggestions and bug reports welcome!

User avatar
muzik
Posts: 5650
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik » July 14th, 2016, 11:30 am

For a few threads in other cellular automata, can you make it so it tries to read any ruletables in the original post and run these on the respective code boxes?

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

Re: Pattern viewer for forum threads

Post by rowett » July 14th, 2016, 11:33 am

muzik wrote:For a few threads in other cellular automata, can you make it so it tries to read any ruletables in the original post and run these on the respective code boxes?
LifeViewer doesn't support ruletables.

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

Re: Pattern viewer for forum threads

Post by rowett » July 15th, 2016, 10:36 am

Build 207 is now live on the Forums and LifeWiki

Please note: you will need to refresh your browser to use the new build

Fixes since the last released build:
  • timer was not being properly reset on the standalone Viewer when a second pattern loaded
  • Viewer height and width were not being properly constrained when parent width limit not in force (which is the case on the Wiki)
Comments, feedback, suggestions and bug reports welcome!

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

Re: Pattern viewer for forum threads

Post by rowett » August 21st, 2016, 12:56 pm

Build 214 is now live on the Forums and LifeWiki

Please note: you will need to refresh your browser to use the new build

Enhancements since the last released build:
  • [[ TRACKBOX ]]
    • N and S switched so N is now top and S bottom
  • Aliases
    • added more non-totalistic aliases
  • hotkeys
    • numeric keypad now works as hotkeys
    • speed up (hotkey "=" or num "+") and speed down (hotkey "-" or num "-") now flow from GPS to STEP
    • hotkey "0" and num "0" now reset GPS and STEP
    • hotkey "5" now resets angle
  • COLOR
    • all [[ COLOR ]] recipients now support colour names
  • Bounded grids
    • hex patterns now support bounded grids
    • Klein-bottles without a twist specification now default to horizontal twist
  • CXRLE
    • added support for CXRLE Pos - test
    • CXRLE Gen and Pos are only displayed in help information if defined
    • Shift and hotkey "g" only toggles relative generation display if CXRLE Gen defined
  • UI
    • UI controls now step forward and back one generation
    • hotkey "Space" and "b" now step forward and back one generation
    • hotkey "Tab" and Shift "Tab" now step forward and back STEP generations
  • Tooltips
    • Tooltips are now in boxes with shadows
    • added tooltip for rule name and rule alias (if defined)
    • added tooltips for population statistics, elapsed time, coordinate state value and the information bar
  • rule names
    • non-totalistic rules now use correct canonical form
    • rule aliases are automatically matched with rules and displayed
    • rule alias is shown in help information if found
    • added new variable to [[ TITLE ]] string: #A the pattern rule alias name
  • script errors
    • script errors are now displayed on thumbnails - test
  • new script command [[ RANDOMSEED <string> ]] to set the pseudo-random number generator seed
    • used by [[ MAP ]] and [[ FILL ]] script commands
    • if not specified then a seed based on the system time is used
    • seed is display in help information
    • Stars uses its own pseudo-random number stream
    • number of times [[ FILL ]] is used is displayed in help information
Fixes since the last released build:
  • Viewers with a height too small to display the navigation menu were not correctly repositioning the adjacent UI controls
  • bounded grids that wrap (Torus, Klein-bottle, Sphere, Cross-surface) failed when grid edges were on tile boundaries
  • Track mode details were sometimes incorrect in help information
  • fixed [[ TRACKBOX ]] error messages so they don't need to wrap
  • at some zooms the right hand grid line was not being drawn
  • resizing snapshots could leave unused buffers not resized
  • [[ HISTORYFIT ]] would not work correctly until pattern reset
The updated hotkey map detailing the LifeViewer keyboard controls is here.

Now supports 8bit computers from the 1980s (I owned the first two): Comments, feedback, suggestions and bug reports welcome!

User avatar
PHPBB12345
Posts: 1096
Joined: August 5th, 2015, 11:55 pm
Contact:

Re: Pattern viewer for forum threads

Post by PHPBB12345 » September 8th, 2016, 10:56 pm

it LifeViewer is open source?

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

Re: Pattern viewer for forum threads

Post by rowett » September 9th, 2016, 12:41 am

PHPBB12345 wrote:it LifeViewer is open source?
No, not currently.

You are however welcome to use it on your own website. Instructions are here.

User avatar
Alexey_Nigin
Posts: 326
Joined: August 4th, 2014, 12:33 pm
Location: Ann Arbor, MI
Contact:

Re: Pattern viewer for forum threads

Post by Alexey_Nigin » September 9th, 2016, 4:35 am

If I run the pattern in this post with increased step size, LifeViewer gives a wrong answer about when the life ended.
There are 10 types of people in the world: those who understand binary and those who don't.

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

Re: Pattern viewer for forum threads

Post by rowett » September 9th, 2016, 6:26 am

Alexey_Nigin wrote:If I run the pattern in this post with increased step size, LifeViewer gives a wrong answer about when the life ended.
Yes you're correct. It's on the backlog to fix. Thanks for reporting!

User avatar
PHPBB12345
Posts: 1096
Joined: August 5th, 2015, 11:55 pm
Contact:

Re: Pattern viewer for forum threads

Post by PHPBB12345 » September 9th, 2016, 10:53 am

it is LifeViewer opening source at next version?

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

Re: Pattern viewer for forum threads

Post by rowett » September 9th, 2016, 12:27 pm

PHPBB12345 wrote:it is LifeViewer opening source at next version?
Not planned.

Post Reply