Speed Test: Conways Life

BlitzMax Forums/BlitzMax Programming/Speed Test: Conways Life

EOF(Posted 2005) [#1]
Conways Life comes to Max.

(Note: 2 versions here for speed testers)

On my rig the Max version hammers the Blitz3D/2D equivalent. Try watching the gliders. The FPS and timers will indicate this as well.

BlitzMax version



Blitz3D/2D version



Perturbatio(Posted 2005) [#2]
I get 800fps more with Max over B3D


EOF(Posted 2005) [#3]
Both Updated. A timer is now available which stops at a specifed 'GenStop' value.

Max version has gone Strict and is blistering along now.

Under the default settings in both versions (with DEBUG off) I get:

Blitz3D = 72417 milliseconds
BlitzMax = 26555 milliseconds


col(Posted 2005) [#4]
In B3D,
At Gen 100000 I got avg 800fps

In BMax,
At Gen 100000 I get avg 2000fps

both with DEBUG OFF


Bot Builder(Posted 2005) [#5]
I think the proper title is Conway's Game of Life but whatever :)

Nice job, cruises on my comp, although...... it seems to mess with my gfx car... could be a overheating problem or something... its pretty freaky.. windowed mode is cool though. prolly cuz its running at like 2000 fps, and either the lcd or the gfx card doesnt like it. yeah, the gfx card is pretty hot.. not too hot but eh (new comp i built last week :))

A standard implementations would wrap over on the sides so cells dont just stick - i remember doing this in qbasic :P

Also, the implementation seems very laborious, prolly just optimization though. my old qbasic one was only 20 lines :) prolly the optimization is what prevents doing the wrapping stuff.

[edit] AH! the resolution was non-standard. My card likes 640x480 way more. Actually, could have been the LCD's problem.


Xip(Posted 2005) [#6]
hmm... i get the same problem i have in alot of other situations, the bmax source compiled and then nothing happend, no errors, no exeptions, nothing... in both normal and debug mode.

this is somting that is realy getting on my nerves, i have goten this error ALOT lately using bmax, and it makes max imposible to work with =(

i doubth a reinstall will do mutsh difference, since i had simular probs in both v02 and v03 since i started using it.

i was working on a huge isometric game engine(with realtime dynamic shadows for example) in bmax, but all the debugging for stuff that isent even in my source/engine, has almost kill the projekt alredy, i cant work like this :(

but i will try and view this demo in b3d-trial if it works :)


Bot Builder(Posted 2005) [#7]
hmm. What's the output say, xip?

The output for say, the program i last compiled says:

Building Parser v0.003
Compiling:Constants.bmx
flat assembler version 1.51
3 passes, 8006 bytes.
Compiling:StringFunctions2.bmx
flat assembler version 1.51
5 passes, 9955 bytes.
Compiling:Parser v0.003.bmx
flat assembler version 1.51
3 passes, 4467 bytes.
Linking:Parser v0.003.exe

Process complete
"E:/BlitzMax/Projects/Interpreter/Parser v0.003.exe"

Process complete
Note that string functions and constants are imported modules.


Xip(Posted 2005) [#8]
Building test
Compiling:test.bmx
flat assembler version 1.51
11 passes, 47591 bytes.
Linking:test.debug.exe

Process complete
"C:/blitzmax/projekts/test/test.debug.exe"

-----------------------------

and that is all :(


Beaker(Posted 2005) [#9]
Looks like you are clicking "Build" instead of "Build and Run" maybe?


Floyd(Posted 2005) [#10]
The final line "C:/blitzmax/projekts/test/test.debug.exe" is an attempt to run the exe.

Whatever is happening seems to be a genuine problem. From the description it sounds like the programs have bugs. But on his particular machine they are failing in a mysterious, silent manner.


sswift(Posted 2005) [#11]
When I was in school I wrote a life simulation.

I had a neat idea for a prank to pull with it too, but I never actually bothered to code it.

My idea was this.

I would make an editor which would allow me to draw to the game board. On this board I would write a message using the little critters. Then I would run the simulation backwards from that point for a minute, and then record that point to restart it from later. Then when my teacher ran the simulation after a minute my message would appear, and then dissapear. :-)

Thinking back on it now though, I'm not sure if they would have worked. It is possible that the game is not time reversiable, and that though you could run backwards from a certain board configuration, running forwards again would not reproduce the original board state because some of the configurations of points (which I created manually) would violate the rules of the game. Part of my message might appear for example, but there might be large gaps in the middle, or bits along the edges missing.


marksibly(Posted 2005) [#12]
Hi,

I had trouble running it here too. The problem was unsupported 512,384 graphics mode.

Try changing the Graphics command to:

Graphics xres,yres,0

to see if it works in windowed mode.


rdodson41(Posted 2005) [#13]
Yeah, I found that too. It works fine in window mode. Pretty cool prgm, should make it so that you can edit the cells and make your own.


Xip(Posted 2005) [#14]
yeas, wen i run the exe created, it complains somthing about the graphic mode, dont know why i dident se that before (dohh!)

problem solved :)


PGF(Posted 2005) [#15]
sswift,

Nice idea but you've realised the problem - Life is not reversible, not even remotely.

One of the cleverest small Life configurations I've seen was a bunch of Gliders (8 from memory) that would collide and form a 'Glider Gun' that then spews out a glider every cycle which was something like 12 generations.

There are some astounding configurations out there. Much more complicated and I'm not sure quite how they are discovered or created but it must involve a bit of design and a lot of trial and error.

Some automata are reversible so your idea would work on them - but not Life.

PGF