Omnimaga

General Discussion => Technology and Development => Computer Projects and Ideas => Topic started by: calcfreak89 on March 10, 2011, 08:13:59 pm

Title: Conway's Game of Life Program
Post by: calcfreak89 on March 10, 2011, 08:13:59 pm
I wrote a program to mathematically simulate generations of life based off of the rules of Conway's Game of Life (http://en.wikipedia.org/wiki/Conway's_Game_of_Life).

It is written in C++ and uses the library SFML.

You can paint tiles by clicking with your mouse, pan with the arrow keys, and zoom in and out with + and - (on the number pad). For more controls, more information, and to download it, go to my downloads page on my website - http://idkcode.co.cc/ (http://idkcode.co.cc/).

Here is a screenshot of a glider gun in action:
(http://dl.dropbox.com/u/10679006/screenshots/screenshot330.png)
Title: Re: Conway's Game of Life Program
Post by: ruler501 on March 10, 2011, 08:47:14 pm
Norton told me you are trying to infect my computer. It hates all good programs. It even said one of my programs was a virus once
Title: Re: Conway's Game of Life Program
Post by: calcfreak89 on March 10, 2011, 08:54:39 pm
Norton told me you are trying to infect my computer. It hates all good programs. It even said one of my programs was a virus once
Wow well that's weird, and if you don't trust running it then download the source code, look through it, and compile it yourself, so you know it's not malicious. All it does is draw stuff in a window with SFML. It's not even like it uses networking stuff of any kind. Well it's perfectly safe, Norton is just reporting it as a false positive. Maybe try adding it as an exception or temporarily disabling Norton?
Title: Re: Conway's Game of Life Program
Post by: ruler501 on March 10, 2011, 08:56:20 pm
I will probably end up doing that. Norton is a stupid thing sometimes.
Depending on what C++ functions you used that can cause it. I found out that system( is considered a virus by Norton. That is why it had blocked my programs a while back
Title: Re: Conway's Game of Life Program
Post by: Scipi on March 10, 2011, 08:59:16 pm
wow, it doesn't even write to a file. ???

I wonder what's causing the false positive.

edit: Perhaps sfml uses certain functions that Norton is reacting to.
Title: Re: Conway's Game of Life Program
Post by: calcfreak89 on March 10, 2011, 08:59:27 pm
Depending on what C++ functions you used that can cause it. I found out that system( is considered a virus by Norton. That is why it had blocked my programs a while back
Yeah that makes sense, but I never used "system(" because I made it cross-platform... :/

wow, it doesn't even write to a file. ???

I wonder what's causing the false positive.

edit: Perhaps sfml uses certain functions that Norton is reacting to.
IKR!

hmm

I only included the system, window, and graphics libs and left out audio and networking since it didn't use it, so I don't see how SFML using OpenGL causes a false positive.
Title: Re: Conway's Game of Life Program
Post by: DJ Omnimaga on March 10, 2011, 11:19:06 pm
Wow this is kinda cool actually, I love it calcfreak89. Also this might be useful to generate magic animations. :P

We just need to be careful to not hold down the V key, though. O.O

RUler501 Norton tends to be weird like that. Other times it just won't detect anything bad.
Title: Re: Conway's Game of Life Program
Post by: Scipi on March 11, 2011, 03:00:57 pm
Yeah, soon me and calcfreak will add in the ability to save/load to a file, as well at have a library of configurations that you can paste. Perhaps even a copy feature.
Wow this is kinda cool actually, I love it calcfreak89. Also this might be useful to generate magic animations. :P

We just need to be careful to not hold down the V key, though. O.O

RUler501 Norton tends to be weird like that. Other times it just won't detect anything bad.
The V key? I'll need to check out what that will do, it should just invert the colors without actually affecting the live/dead cells (though it could just be trippy :P ).

It's holding down the D key that you should worry about if you have a lower end video card (or drivers). That will slow down your system since it has to draw all that.
Title: Re: Conway's Game of Life Program
Post by: calcfreak89 on March 11, 2011, 03:33:06 pm
Wow this is kinda cool actually, I love it calcfreak89. Also this might be useful to generate magic animations. :P

We just need to be careful to not hold down the V key, though. O.O
Yup :)

LOL yeah then it will blink like crazy, inverting the colors so fast.  :crazy:

Yeah, soon me and calcfreak will add in the ability to save/load to a file, as well at have a library of configurations that you can paste. Perhaps even a copy feature.
Yeah I will make it so you can select stuff and copy and paste. But instead of having a built in library in the program itself, I will just make the file saving/loading feature, and it will come with a few files that will have cool configurations (like breeders and glider guns) that you can load.

The V key? I'll need to check out what that will do, it should just invert the colors without actually affecting the live/dead cells (though it could just be trippy :P ).

It's holding down the D key that you should worry about if you have a lower end video card (or drivers). That will slow down your system since it has to draw all that.
Yes, that is what the V key does.

LOL yes, unless you zoom in enough so it's not drawing all of those thousands of cells. Future versions will run faster.
Title: Re: Conway's Game of Life Program
Post by: merthsoft on March 11, 2011, 04:40:26 pm
I LOVE the Game of Life! You should allow users to set custom rule-sets (http://en.wikipedia.org/wiki/Life-like_cellular_automata) if you don't already have that.
Title: Re: Conway's Game of Life Program
Post by: DJ Omnimaga on March 12, 2011, 03:32:29 am
As for the V thing, for me, in full screen, with nothing on the screen it blinks about 50-100 times a second. That should give you an idea of how seizure-inducing it can be. :P
Title: Re: Conway's Game of Life Program
Post by: calcfreak89 on March 12, 2011, 09:34:47 am
As for the V thing, for me, in full screen, with nothing on the screen it blinks about 50-100 times a second. That should give you an idea of how seizure-inducing it can be. :P
LOOOOOL! But, I set the V key to be event based, so the max speed is determined by your OS settings for keyboard repeat rate.

Oh and I wrote a program that just opens in fullscreen and changes the background color to random RGB values at the speed of your monitor's refresh rate (it v-syncs), for maximum seizure-inducement! I haven't released it yet though for obvious reasons. :P
Title: Re: Conway's Game of Life Program
Post by: DJ Omnimaga on March 13, 2011, 04:09:38 am
I see. And lol at the other program. XD

On some Mac computer screens I remember when the screen colors alternated too fast it turned into some sort of gray.