Author Topic: Conway's Game of Life Program  (Read 23895 times)

0 Members and 2 Guests are viewing this topic.

Offline calcfreak89

  • LV2 Member (Next: 40)
  • **
  • Posts: 25
  • Rating: +1/-0
    • View Profile
    • Ayebear.com
Conway's Game of Life Program
« 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.

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/.

Here is a screenshot of a glider gun in action:
« Last Edit: April 08, 2011, 08:44:47 pm by calcfreak89 »

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Conway's Game of Life Program
« Reply #1 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
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline calcfreak89

  • LV2 Member (Next: 40)
  • **
  • Posts: 25
  • Rating: +1/-0
    • View Profile
    • Ayebear.com
Re: Conway's Game of Life Program
« Reply #2 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?

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Conway's Game of Life Program
« Reply #3 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
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Conway's Game of Life Program
« Reply #4 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.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline calcfreak89

  • LV2 Member (Next: 40)
  • **
  • Posts: 25
  • Rating: +1/-0
    • View Profile
    • Ayebear.com
Re: Conway's Game of Life Program
« Reply #5 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.
« Last Edit: March 10, 2011, 09:03:18 pm by calcfreak89 »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Conway's Game of Life Program
« Reply #6 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.
« Last Edit: March 10, 2011, 11:38:50 pm by DJ_O »

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Conway's Game of Life Program
« Reply #7 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.
« Last Edit: March 11, 2011, 03:01:20 pm by HOMER-16 »

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline calcfreak89

  • LV2 Member (Next: 40)
  • **
  • Posts: 25
  • Rating: +1/-0
    • View Profile
    • Ayebear.com
Re: Conway's Game of Life Program
« Reply #8 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.

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Conway's Game of Life Program
« Reply #9 on: March 11, 2011, 04:40:26 pm »
I LOVE the Game of Life! You should allow users to set custom rule-sets if you don't already have that.
Shaun

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Conway's Game of Life Program
« Reply #10 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

Offline calcfreak89

  • LV2 Member (Next: 40)
  • **
  • Posts: 25
  • Rating: +1/-0
    • View Profile
    • Ayebear.com
Re: Conway's Game of Life Program
« Reply #11 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

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Conway's Game of Life Program
« Reply #12 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.