punk maker

punkmaker gem - make your own (pixel) punk base (archetype) heads incl. humans, zombies, apes, aliens, mummies, robots, and much more

Usage

Let's make golden punks...

require 'punkmaker'

GOLD  =  '#ffd700'

punk_m = Punk::Human.make( GOLD,  gender: 'm' )
punk_m.save( 'human-male_gold.png' )
punk_m.zoom(4).save( '[email protected]' )

punk_f = Punk::Human.make( GOLD, gender: 'f' )
punk_f.save( 'human-female_gold.png' )
punk_f.zoom(4).save( '[email protected]' )

Voila!

4x

Let's try some more base (arche)types:

types = [
  Punk::Mummy,
  Punk::Alien, 
  Punk::Ape,
  Punk::Skeleton,
  Punk::Zombie,
  Punk::Demon,
  Punk::Orc,
  Punk::Robot,
  Punk::Vampire,   
]

types.each do |type|
    ## get last name e.g. Orc from Punk::Orc
    name = type.name.split('::')[-1].downcase

    punk_m = type.make( GOLD, gender: 'm' )
    punk_m.save( "#{name}-male_gold.png" )
    punk_m.zoom(4).save( "#{name}[email protected]" )

    punk_f = type.make( GOLD, gender: 'f' )
    punk_f.save( "#{name}-female_gold.png" )
    punk_f.zoom(4).save( "#{name}[email protected]" )
end

Voila!


4x


Let's try some more colors:

NEONGREEN     =  '#c3ff00'
DEEPPINK      =  '#ff1493'
DEEPPURPLE    =  '#aa4399'


colors = {
  'green'  =>  NEONGREEN,
  'pink'   =>  DEEPPINK,
  'purple' =>  DEEPPURPLE,
}

types = [Punk::Human]+types  ## add human first

types.each do |type|
    ## get last name e.g. Orc from Punk::Orc
    name = type.name.split('::')[-1].downcase
    colors.each do |color_name, color|  
      punk_m = type.make( color, gender: 'm' )
      punk_m.save( "#{name}-male_#{color_name}.png" )
      punk_m.zoom(4).save( "#{name}-male_#{color_name}@4x.png" )

      punk_f = type.make( color, gender: 'f' )
      punk_f.save( "#{name}-female_#{color_name}.png" )
      punk_f.zoom(4).save( "#{name}-female_#{color_name}@4x.png" )
    end
end

Voila!






4x






That's it.

License

The scripts are dedicated to the public domain. Use it as you please with no restrictions whatsoever.

Questions? Comments?

Join us in the Punk Art discord (chat server). Yes you can. Your questions and commentary welcome.

Or post them over at the Help & Support page. Thanks.