flat assembler
Message board for the users of flat assembler.

 Index > Main > memory,convolution & life game
Author
edfed

Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 26 Feb 2010, 10:54
while coding my first program (game of life in colors) in 2005, i played on video memory directlly to process the pixel sum.

it is horribly slow.

soon, i played with cpu ram only, and a triple buffering.
it is very fast now.

there, i post 3 versions.

it is to show the difference beetwen direct to screen and triple buffering speed

enjoy

Last edited by edfed on 27 Feb 2010, 10:30; edited 1 time in total
26 Feb 2010, 10:54
DJ Mauretto

Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto 26 Feb 2010, 12:11
I like your psychedelic vision of life
26 Feb 2010, 12:11
edfed

Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 27 Feb 2010, 10:25
it is crazy to seee how a single and simple algorythm can create variious effects.

the pixel sum is a convolution algorythm with a matrix like this one:

Code:
```1,1,1
1,0,1
1,1,1
```

replacing the sum by a proportional calculation will create a very complex effect capability.

for example, imagine a convolution matrix like this:

Code:
```1,2,1
2,3,2
1,2,1
```

in this case, pixels are additioned after a multiplication by it's weight in the matrix.

etc, etc.

the same thing is possible with 1D and 3D of course.

with 1D, it will act on a signal, for example, a sound.

Code:
```0.25,0.5,0.25
```

the 0.5 value will take the half of the current sample, and 0.25 values will take the quart of neibourg samples.

adding them will act as a low-pass filter on the signal, something like a convolution or a FIR or IIR.

better explanatioàns can be found on sites related to DSP.

enjoy algo!
27 Feb 2010, 10:25
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

 Jump to: Select a forum Official----------------AssemblyPeripheria General----------------MainTutorials and ExamplesDOSWindowsLinuxUnixMenuetOS Specific----------------MacroinstructionsOS ConstructionIDE DevelopmentProjects and IdeasNon-x86 architecturesHigh Level LanguagesProgramming Language DesignCompiler Internals Other----------------FeedbackHeapTest Area

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum