Skip to content

Pretty pixel animations through the game of life

Notifications You must be signed in to change notification settings

DebugUself/automaton-create

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

automaton-create

Pretty pixel animations through the game of life

Create a raw 24-24 pixel animation

import life

def create_life(outfile, background, palette, seed, generations=100, duration=100):
    mat = life.sid_to_mat(seed, size=10)
    mat = life.mat_padding(mat, padding=7)
    world = life.World(mat, background=background, palette=palette)
    world.gif(generations=generations, duration=duration, file=outfile)

create_life("gifs/example-raw.gif", 
            background="#FFE478", 
            palette=["#363636", "#E8175D"], 
            seed="1001110101110110110100001100011001011010000111101010111111000111010001111110101010000110001001001100")

Scale it up!

life.resize_gif("gifs/example-raw.gif", "gifs/example.gif", size=350, duration=100)

About

Pretty pixel animations through the game of life

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages