ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

Golly 2.9b1 and the overlay

For general discussion about Conway's Game of Life.

Re: Golly 2.9b1 and the overlay

Postby rowett » March 24th, 2017, 11:47 am

blah wrote:Well, if they use two different rules for even and odd generations, that's the problem. These rules don't alternate every 2 generations, they oscillate through n generations (n being the number of states). The algorithm I came up with before should work.

Yes understood, many thanks I'm taking a look - this is issue #2 above.

Dave,
For issue #1 above please can you test the following pattern in your Golly:
#CXRLE Pos=0,0
x = 5, y = 32, rule = 012/03/23
2A$A9$.2A$.A9$2.2A$2.A9$3.2A$3.A!

The 3 cell groups that start on an odd X coordinate get an extra cell by generation 2 (which is clearly wrong and different than LifeViewer).
#CXRLE Pos=-1,-1 Gen=2
x = 7, y = 34, rule = 012/03/23
4B$B2CB$BC.B$3B.A7$.4B$.B2CB$.BC.B$.3B7$2.4B$2.B2CB$2.BC.B$2.3B.A7$3.
4B$3.B2CB$3.BC.B$3.3B!
rowett
Moderator
 
Posts: 972
Joined: January 31st, 2013, 2:34 am
Location: UK

Re: Golly 2.9b1 and the overlay

Postby dvgrn » March 24th, 2017, 11:53 am

rowett wrote:So for clarity I'm working on two separate issues:
  1. LifeViewer and Golly behave differently on the same pattern for 012/03/23. They shouldn't since they use exactly the same algorithm
  2. I'm investigating the algorithm they both use to see why it doesn't produce the output blah and Dave generated

Exactly. Golly's doing something strange with both copy-and-pasted patterns and patterns restored by Undo -- which are really more or less the same thing, so that makes sense.

But if we want to get B0 Generations rules working correctly, and without a flicker, we'll need a different algorithm -- basically, rules that alternate on an N-tick cycle instead of just a 2-tick cycle.

I think blah's suggested approach might work, but I'm not sure yet. Will have to do some trial simulations this weekend.

If we didn't mind the flicker -- because Generations rules are going to flicker like crazy anyway! -- there might be a workaround involving an internally generated rule table along the lines of the one I posted above. But at least given the way Golly currently handles rule tables with B0, that trick will work a lot better on bounded grids, and will have serious problems if it's attempted on an unbounded grid.

rowett wrote:For issue #1 above please can you test the following pattern in your Golly...

Interesting! Yes, I see the weird behavior. Every other preblock produces a "rocket", for some reason.
User avatar
dvgrn
Moderator
 
Posts: 5085
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Golly 2.9b1 and the overlay

Postby blah » May 8th, 2017, 7:47 pm

dvgrn wrote:I think blah's suggested approach might work, but I'm not sure yet. Will have to do some trial simulations this weekend.

This weekend is very long.
succ
User avatar
blah
 
Posts: 238
Joined: April 9th, 2016, 7:22 pm

Re: Golly 2.9b1 and the overlay

Postby dvgrn » May 8th, 2017, 10:30 pm

blah wrote:
dvgrn wrote:I think blah's suggested approach might work, but I'm not sure yet. Will have to do some trial simulations this weekend.

This weekend is very long.

Ha, hmm, well, it wasn't really that long, it's just that I forgot to report the results on this thread. Here's a summary I wrote on March 30th:

dvgrn wrote:
rowett wrote:... How is your B0-with-Smax thought experiment going?

Not very well. I need either more time or more brain cells, probably.

Permanent inversion requires that we pretend that whatever the finite pattern is, must already have been inverted. So the whole universe is really ON and going to stay that way, and the ON cells we're looking at are really OFF cells... and somehow mysteriously no cells with the extra Generations states are around. (If the pattern had actually run to reach that state, there would probably be some around -- any initial ON cells that died during the inversion step).

I think the key is that OFF cells don't gradually turn ON over the course of N ticks, the way ON cells gradually turn OFF. So if there's such a thing as an inverted rule that could be run, it's not going to be anything like as simple as in regular two-state rules. We'd have to have a separate 'Snoitareneg" algorithm, the opposite of Generations, so cells are born normally, but don't count in neighbor counts until N ticks have passed.

That would be an interesting generalization, no doubt, and once it was added then we could trivially simulate an inverted B0-with-S8 Generations rule.

But in the meantime, let's just throw the same error as you're throwing for B0-without-Smax...

So that was the provisional verdict -- because we don't have an inverse-Generations algo available in Golly, it seems like the right thing to do is just to throw an error in all the B0 Generations cases.
User avatar
dvgrn
Moderator
 
Posts: 5085
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Golly 2.9b1 and the overlay

Postby fluffykitty » May 21st, 2017, 11:07 pm

On a somewhat related note, will B0 rules ever get visible background strobing?
I like making rules
fluffykitty
 
Posts: 334
Joined: June 14th, 2014, 5:03 pm

Re: Golly 2.9b1 and the overlay

Postby Andrew » May 22nd, 2017, 5:21 am

fluffykitty wrote:... will B0 rules ever get visible background strobing?

Why would you want such a horrible display? (It's actually quite dangerous for people with epilepsy.)
User avatar
Andrew
Moderator
 
Posts: 686
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.9b1 and the overlay

Postby blah » May 22nd, 2017, 6:45 am

Andrew wrote:Why would you want such a horrible display? (It's actually quite dangerous for people with epilepsy.)

I think it makes it easier to understand how the rules work. It's simpler than having to invert it in your head or account for the alternating rules.
succ
User avatar
blah
 
Posts: 238
Joined: April 9th, 2016, 7:22 pm

Re: Golly 2.9b1 and the overlay

Postby Andrew » May 22nd, 2017, 8:34 pm

If you really want to see a strobing background you could write a simple script that runs a B0 pattern and calls the setcolors command to set the desired state colors depending on whether getgen returns an odd or even number.
User avatar
Andrew
Moderator
 
Posts: 686
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.9b1 and the overlay

Postby drc » June 11th, 2017, 10:34 pm

What the hell is going on here?
Image
This post was brought to you by the letter D, for dishes that Andrew J. Wade won't do. (Also Daniel, which happens to be me.)
Current rule interest: B2ce3-ir4a5y/S2-c3-y
User avatar
drc
 
Posts: 1664
Joined: December 3rd, 2015, 4:11 pm
Location: creating useless things in OCA

Re: Golly 2.9b1 and the overlay

Postby Andrew » June 12th, 2017, 6:28 pm

drc wrote:What the hell is going on here?

Difficult to say given that I can't see the image.
User avatar
Andrew
Moderator
 
Posts: 686
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.9b1 and the overlay

Postby drc » June 12th, 2017, 6:33 pm

Andrew wrote:
drc wrote:What the hell is going on here?

Difficult to say given that I can't see the image.

The top-left menu is replaced with an 'or' image stretched out, from the paste menu probably. Sometimes it becomes a stretched out version of the last generation of the pattern.
This post was brought to you by the letter D, for dishes that Andrew J. Wade won't do. (Also Daniel, which happens to be me.)
Current rule interest: B2ce3-ir4a5y/S2-c3-y
User avatar
drc
 
Posts: 1664
Joined: December 3rd, 2015, 4:11 pm
Location: creating useless things in OCA

Re: Golly 2.9b1 and the overlay

Postby Andrew » June 12th, 2017, 8:22 pm

drc wrote:The top-left menu is replaced with an 'or' image stretched out, from the paste menu probably. Sometimes it becomes a stretched out version of the last generation of the pattern.

I'm struggling to visualize what you mean. If you have problems pasting a screenshot here then email one to me (my address is in Golly's docs/ReadMe.html).
User avatar
Andrew
Moderator
 
Posts: 686
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.9b1 and the overlay

Postby dvgrn » June 12th, 2017, 8:25 pm

Andrew wrote:I'm struggling to visualize what you mean. If you have problems pasting a screenshot here then email one to me (my address is in Golly's docs/ReadMe.html).

Sounds like you can't see the image that drc posted, which shows up fine for me -- i.imgur.com/PjyCalt.png must be blocked for you, for whatever reason. Have uploaded a copy below --

drc wrote:The top-left menu is replaced with an 'or' image stretched out, from the paste menu probably. Sometimes it becomes a stretched out version of the last generation of the pattern.

That matches what I see when I run Golly 2.9b1 on my old Asus laptop:

OpenGL-problem.png
problem with icons, colors and pop-up buttons with OpenGL 1.1
OpenGL-problem.png (42.79 KiB) Viewed 3967 times


From a discussion in January that I probably should have forwarded to golly-test:

dvgrn wrote:... my "GPU Caps Viewer" utility reports GL_VERSION 1.1.0, and an OpenGL extension called "GL_EXT_bgra (OpenGL 1.2)".
...
This is a fairly old 64-bit laptop, an Asus Notebook K401J/K501J series. Barely has OpenGL support at all, I guess -- I tried looking for newer drivers for my display adapter, but Windows couldn't find anything better for "GPU 1: Mobile Intel(R) 4 Series Express Chipset Family (Microsoft Corporation - WDDM 1.1)".

rowett wrote:Sadly Intel stopped support for that Mobile Graphics chipset at the end of 2012 so I'm not sure you're going to get a better driver.

I haven't found any workarounds besides going back to Golly 2.7 for most purposes. Seems like it may be best to advertise Golly 2.7 as a good build for older non-OpenGL-compatible systems.

drc's image again:
drc-image.png
image copied from i.imgur.com/PjyCalt.png
drc-image.png (45.82 KiB) Viewed 3965 times
User avatar
dvgrn
Moderator
 
Posts: 5085
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Golly 2.9b1 and the overlay

Postby Andrew » June 12th, 2017, 9:37 pm

Very suspicious that the display glitch occurs in the area Golly normally shows translucent buttons. If you open Prefs > View and change the location of the buttons does the glitch move to that new location? Or if you disable the buttons does the glitch no longer occur?

Do display glitches occur when you run an overlay script, like overlay-demo.lua?

I have a vague memory that old OpenGL drivers require bitmap sizes to be powers of 2 (or at least the width?). If so we might be able to fix the translucent button problem, but any overlay glitches are going to be very hard to fix.
User avatar
Andrew
Moderator
 
Posts: 686
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.9b1 and the overlay

Postby dvgrn » June 12th, 2017, 10:21 pm

Andrew wrote:Very suspicious that the display glitch occurs in the area Golly normally shows translucent buttons. If you open Prefs > View and change the location of the buttons does the glitch move to that new location? Or if you disable the buttons does the glitch no longer occur?

Changing the location moves the glitch -- I tried all four corners.

Andrew wrote:Do display glitches occur when you run an overlay script, like overlay-demo.lua?

I have a vague memory that old OpenGL drivers require bitmap sizes to be powers of 2 (or at least the width?). If so we might be able to fix the translucent button problem, but any overlay glitches are going to be very hard to fix.

Yes, with breakout.lua the glitchy stretched bitmap covers the whole Life universe area; with overlay-demo.lua it's just the square area in the middle of the screen where the demo is supposed to draw things -- can't see any of the actual overlay, just the distorted bitmap. (It's squashed instead of stretched, for whatever reason, but clearly it's the same problem.)

overlay-demo-with-old-OpenGL.png
overlay demo running on Asus K401J
overlay-demo-with-old-OpenGL.png (160.91 KiB) Viewed 3955 times
User avatar
dvgrn
Moderator
 
Posts: 5085
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Golly 2.9b1 and the overlay

Postby Andrew » June 12th, 2017, 10:30 pm

dvgrn wrote:That matches what I see when I run Golly 2.9b1 on my old Asus laptop: ...

There's something else very odd about that display. The cells in the main pattern are colored white but the edit bar clearly shows a gradient from red to yellow. Is that yet another display glitch?
User avatar
Andrew
Moderator
 
Posts: 686
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.9b1 and the overlay

Postby Andrew » June 12th, 2017, 10:37 pm

Dave, please try this test: In overlay-demo.lua there's a function called create_overlay that should have this line:

    ov("create 1000 1000")

Change the first 1000 to 1024 and see if that fixes the overlay display. If not, change both numbers to 1024 and try again. This will tell me whether we can fix things by ensuring a bitmap's width (and maybe height) must be a power of 2.
User avatar
Andrew
Moderator
 
Posts: 686
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.9b1 and the overlay

Postby rowett » June 13th, 2017, 2:30 am

Andrew wrote:I have a vague memory that old OpenGL drivers require bitmap sizes to be powers of 2 (or at least the width?). If so we might be able to fix the translucent button problem, but any overlay glitches are going to be very hard to fix.

Before OpenGL 2.0 textures needed to be a power of 2 (and some Open GL 2.0 implementations also had this restriction).
rowett
Moderator
 
Posts: 972
Joined: January 31st, 2013, 2:34 am
Location: UK

Re: Golly 2.9b1 and the overlay

Postby dvgrn » June 13th, 2017, 8:08 am

Andrew wrote:
dvgrn wrote:That matches what I see when I run Golly 2.9b1 on my old Asus laptop: ...

There's something else very odd about that display. The cells in the main pattern are colored white but the edit bar clearly shows a gradient from red to yellow. Is that yet another display glitch?

Yes. Back in January I sent a question about icons not showing up, which you forwarded to Chris. Here's the screenshot that went with the question:

LifeHistory-on-OpenGL1.1.png
Colors and icons rendered incorrectly
LifeHistory-on-OpenGL1.1.png (115.42 KiB) Viewed 3926 times

The conclusion at the time was, unfortunately,

Andrew wrote:Ok, that's not good news. I can't really think of anything we can do to work around the various rendering problems. Looks like your OpenGL is just too old (or too buggy).

So I've been using Golly 2.7 since then, except when I'm testing Lua scripts.

Andrew wrote:Dave, please try this test: In overlay-demo.lua there's a function called create_overlay that should have this line:

    ov("create 1000 1000")

Change the first 1000 to 1024 and see if that fixes the overlay display. If not, change both numbers to 1024 and try again. This will tell me whether we can fix things by ensuring a bitmap's width (and maybe height) must be a power of 2.

No luck. The behavior is maybe slightly different -- can still see the grid under the overlay area -- but there's no sign of anything like what the overlay demo is supposed to be producing.

glitch-at-width-1024.png
width 1024, and width+height both 1024, look identical
glitch-at-width-1024.png (56.34 KiB) Viewed 3926 times

This is just my particular system, though -- it's vaguely possible that some workarounds might work for drc, if his version of OpenGL is different. But the symptoms reported so far are pretty much identical, so I'm afraid the odds aren't too good...!
User avatar
dvgrn
Moderator
 
Posts: 5085
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Golly 2.9b1 and the overlay

Postby Andrew » June 13th, 2017, 8:50 am

dvgrn wrote:Back in January I sent a question about icons not showing up, which you forwarded to Chris.

Ah, I forgot about that (61-yr old brain clearly starting to decay).

Thanks for doing those overlay tests. It's clear that even if we modified the various bitmap sizes to be powers of 2 it's not going to solve all the problems. Chris, unless you have some bright ideas I don't see any solution for this mess.
User avatar
Andrew
Moderator
 
Posts: 686
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.9b1 and the overlay

Postby marioxcc » June 13th, 2017, 9:36 am

Where is the source code for this version?
marioxcc
 
Posts: 11
Joined: June 7th, 2017, 10:12 pm

Re: Golly 2.9b1 and the overlay

Postby rowett » June 13th, 2017, 10:19 am

dvgrn wrote:
Andrew wrote:Dave, please try this test: In overlay-demo.lua there's a function called create_overlay that should have this line:

    ov("create 1000 1000")

Change the first 1000 to 1024 and see if that fixes the overlay display. If not, change both numbers to 1024 and try again. This will tell me whether we can fix things by ensuring a bitmap's width (and maybe height) must be a power of 2.

No luck. The behavior is maybe slightly different -- can still see the grid under the overlay area -- but there's no sign of anything like what the overlay demo is supposed to be producing.

Dave in overlay-demo.lua in addition to changing the ov("create 1000 1000") line to 512 512 or 1024 1024, you'll also need to comment out line 2986 in the main_menu() function that says:
    ov("resize "..wd.." "..ht)

It should become:
    -- ov("resize "..wd.." "..ht)

And then please re-run your overlay-demo test.
rowett
Moderator
 
Posts: 972
Joined: January 31st, 2013, 2:34 am
Location: UK

Re: Golly 2.9b1 and the overlay

Postby rowett » June 13th, 2017, 10:21 am

marioxcc wrote:Where is the source code for this version?

https://sourceforge.net/p/golly/code/ci/master/tree/
rowett
Moderator
 
Posts: 972
Joined: January 31st, 2013, 2:34 am
Location: UK

Re: Golly 2.9b1 and the overlay

Postby rowett » June 13th, 2017, 11:31 am

Dave,
When you've re-run the overlay-demo.lua (see above) please will you also post your laptop OS and graphics driver version (you probably told me before but I couldn't find it).
rowett
Moderator
 
Posts: 972
Joined: January 31st, 2013, 2:34 am
Location: UK

Re: Golly 2.9b1 and the overlay

Postby Andrew » June 13th, 2017, 6:30 pm

Dave, instead of mucking around with overlay-demo.lua just use the following little script:

local g = golly()
local ov = g.overlay
ov("create 512 512")
ov("position middle")
ov("rgba 255 0 0 255")
ov("fill")

Select Layer > Delete Overlay to remove the resulting overlay.
User avatar
Andrew
Moderator
 
Posts: 686
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests