Search found 50 matches

by ehaliewicz
Fri Dec 27, 2013 11:00 pm
Forum: Demos
Topic: Game of Life demo
Replies: 16
Views: 13674

Do you use lookup table to draw? And, you don't need to do copy. You can make something like this for (int x=1; x < width+1; ++x) CountsNew[x][0]=0; for (int y=1; y < height+1; ++y) CountsNew[0][y]=0; for (int y=1; y < height+1; ++y) for (int x=1; x < width+1; ++x) { CountsNew[x+1][y+1]=0; if(there...
by ehaliewicz
Fri Dec 27, 2013 10:28 pm
Forum: Demos
Topic: Game of Life demo
Replies: 16
Views: 13674

You can try prebuild table of tranlations, calculation of new state will be like: C[x][y] = T[a] [c]; where x, y - cell position. and a,b,c bitmasks of 3 rows. or somehow in another way. so, you don't need then make loop for 9 cells, and make calculations. I don't know now how to make it in best wa...
by ehaliewicz
Fri Dec 27, 2013 7:55 pm
Forum: Demos
Topic: Game of Life demo
Replies: 16
Views: 13674

too slow :(. where is vsync? :( is there source available? Did you try the updated version? It's a bit faster. As for vsync, when the screen is really hectic updating takes longer than a VBLANK (at least, I think that's the issue) so you'll always have tearing. I can't really do much about the spee...
by ehaliewicz
Fri Dec 27, 2013 12:15 am
Forum: Demos
Topic: Game of Life demo
Replies: 16
Views: 13674

Update - game of life v2

Update has arrived :) https://dl.dropboxusercontent.com/u/3581058/gol-byte-v2.bin I've improved the controls, added a grid, and a generation counter. The resolution is also quadrupled, so it's quite a bit slower. I still have an different algorithm to try, which I hope will make it run fullspeed. It...
by ehaliewicz
Tue Dec 24, 2013 1:19 am
Forum: Demos
Topic: Game of Life demo
Replies: 16
Views: 13674

Game of Life demo

So, I made a game of life simulation with GCC and the SGDK. (thanks stef!) Nothing too fancy, but it works on real hardware :D https://dl.dropboxusercontent.com/u/3581058/gol-byte-v1_001.png https://dl.dropboxusercontent.com/u/3581058/gol-byte-v1.bin Controls - Start - toggle simulation - D-pad - wh...