Lurchicus / YALife2

Post recovery
MIT License
0 stars 0 forks source link

YALife

Description

Yet Another Life Program (based on Conway's Game of Life).

![YALife Screenshot 2021-11-20] (YALife_Screenshot_2021-11-20.png)

(stil can't figure out why my screenshot won't display with MD.)

Notes

On 12/10/2023 I had to recreate this repository since some odd bug in Visual Studio 2022 v18 Pre converted my WinForms application into a console app and I couldn't undo it. Attempts to rollback the commits also failed.

Details

Designed and authored by Dan Rhea.

I wrote this to try out WinForms on the VS 2022 Preview using .NET 6. Note that Visual Studio 2022 has been released as has .NET 6. And now it runs under .NET 8.

I added the ability to scale a life "cell" from 1 to 32. This means that a scale of 4 will draw a live cell that is 4 pixels high and 4 pixels wide. This can be thought of as a zoom, you see less cells but the ones you see are much easier to see.

I have also added a facility where you can create custom .GOL files to predefine an initial pattern. See the file LifeTest.gol for file formating information.

Licensing

I'm licensing this program under the MIT License.

The two classes I mention below that are from StackOverflow.com are covered under the MIT license as well.

Attributions

I don't have copyright information (dates) for the items below so I will go with the following attributions as suggested by StackOverflow.com.

I use the following to apply color to pixels based on how many passes the pixel remains unchanged by the Game of Life rules. It's fun!

ColorHeatMap class by Davide Dolla (https://stackoverflow.com/users/1332133/davide-dolla) and shared on (https://stackoverflow.com/questions/17821828/calculating-heat-map-colours)

I use the following to greatly speed up drawing the Game of Life bitmap each pass. I was seeing 1 to 1.5 seconds per pass before with an improvement to 0.01 seconds between passes. Before I was using standard bitmap.setpixel operations.

DirectBitmap by A.Konzel (https://stackoverflow.com/users/3117338/a-konzel) via StackOverflow (https://stackoverflow.com/questions/24701703/c-sharp-faster-alternatives-to-setpixel-and-getpixel-for-bitmaps-for-windows-f)

Change history

Detailed program change history is at the top of the Form1.cs code which is where I prefer to keep change history. This is an overview:

Installation

I do not (currently) have a package and install for this program. For now, it needs to be loaded into Visual Studio 2022 and run. I find it difficult to pay for an expensive code signing license for what is in effect a free program I wrote as a hobby/fun/learning/testing project.