goblins 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8934478ccb4e270df14b0e9d19823390d2bc3f36b0e531dbf5c263160a63980b
4
- data.tar.gz: 4c46a7c81a5da2a9b44a6d5c375e32f7c5f9b5aad679113b77b42a11f2f60b5e
3
+ metadata.gz: 0fff3d61d962744105a99ce3316871afe27c4ea0b0b363d46551f7d3b5691df0
4
+ data.tar.gz: bf0133051b43b8afefaa9c4fb825773fa7250ac3eb42db262cd6282426ff1c81
5
5
  SHA512:
6
- metadata.gz: 894506428229bf434f555607a98f5b93d0f5887eaf59905b631c852b3f5039f61eac21a5fca3b4ab70f4c909f613a16ad00a36e7955f9672a93373aa58996d85
7
- data.tar.gz: 18307df6470dce85964c8b90a731cac1c61cb403acc0ae7fdf14f9298c0300255c501685c4598a7a616b52f92bd56846d7b98fefbde3a1a21d3b9218001ed624
6
+ metadata.gz: 7942e448693fe68fe28f6c142f43b2295d3b3957cf50a677e02c4afc9d241f9b4f6fe6f4fd3999a44e067bd9714295f8a2ebf1ba4abd199c5c58be1ee39c142b
7
+ data.tar.gz: 9b5a4ca431116e9288072f0379bb2660173cceb73793aadb8db0ca3ad9789e0d5d7d6f46d895b013892297bddd6bffb8ddbafeb2ccaaf1711013156904ea5513
data/Manifest.txt CHANGED
@@ -2,5 +2,9 @@ CHANGELOG.md
2
2
  Manifest.txt
3
3
  README.md
4
4
  Rakefile
5
+ config/spritesheet-20x20.csv
6
+ config/spritesheet-20x20.png
7
+ config/spritesheet-24x24.csv
8
+ config/spritesheet-24x24.png
5
9
  lib/goblins.rb
6
10
  lib/goblins/version.rb
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Goblins (Pixel Avatars)
1
+ # Goblins & Lil'Goblins (Pixel Monster Avatars)
2
2
 
3
- goblins - generate your own 20×20 goblins (pixel avatars) images (off chain) from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes and more
3
+ goblins - generate your own 24×24 goblins or 20×20 lil'goblins (pixel) monster avatars images (off chain) from text attributes (via built-in spritesheets); incl. 2x/4x/8x zoom for bigger sizes and more
4
4
 
5
5
 
6
6
 
@@ -12,11 +12,91 @@ goblins - generate your own 20×20 goblins (pixel avatars) images (off chain) fr
12
12
 
13
13
 
14
14
 
15
+
15
16
  ## Usage
16
17
 
17
18
  Let's generate some super-rare never-before-seen
18
- goblins (pixel avatars)...
19
+ goblin monster (pixel) avatars (24x24):
20
+
21
+ ```ruby
22
+ require 'goblins'
23
+
24
+ goblin = Goblin::Image.generate( 'Green', 'Teeth',
25
+ '3D Glasses', 'Blue Sweater' )
26
+ goblin.save( "goblin1.png")
27
+ goblin.zoom(4).save( "goblin1@4x.png" )
28
+
29
+
30
+ goblin = Goblin::Image.generate( 'Gold 2', 'Eyes', 'Frown',
31
+ 'Horns', 'Suit Open' )
32
+ goblin.save( "goblin2.png")
33
+ goblin.zoom(4).save( "goblin2@4x.png" )
34
+
35
+
36
+ goblin = Goblin::Image.generate( 'Blue', 'Eyes', 'Smile',
37
+ 'Hoodie', 'Bow', 'Bojangles' )
38
+ goblin.save( "goblin3.png")
39
+ goblin.zoom(4).save( "goblin3@4x.png" )
40
+ ```
41
+
42
+ Voila!
43
+
44
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/goblin1.png)
45
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/goblin2.png)
46
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/goblin3.png)
47
+
48
+ In 4x:
49
+
50
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/goblin1@4x.png)
51
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/goblin2@4x.png)
52
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/goblin3@4x.png)
53
+
54
+
55
+
56
+
57
+ Let's try some lil' goblins (20x20):
58
+
59
+ ```ruby
60
+ lilgoblin = LilGoblin::Image.generate( 'Green', 'Orange Beanie',
61
+ 'Earring Silver', 'Blue Sweater' )
62
+ lilgoblin.save( "lilgoblin1.png")
63
+ lilgoblin.zoom(4).save( "lilgoblin1@4x.png" )
64
+
65
+
66
+ lilgoblin = LilGoblin::Image.generate( 'Gold', 'Cool Shades',
67
+ 'Horns', 'Suit Open' )
68
+ lilgoblin.save( "lilgoblin2.png")
69
+ lilgoblin.zoom(4).save( "lilgoblin2@4x.png" )
70
+
71
+
72
+ lilgoblin = LilGoblin::Image.generate( 'Red', 'Chef',
73
+ 'Orange Shades', 'Hoodie', 'Earring Gold' )
74
+ lilgoblin.save( "lilgoblin3.png")
75
+ lilgoblin.zoom(4).save( "lilgoblin3@4x.png" )
76
+ ```
77
+
78
+ Voila!
79
+
80
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/lilgoblin1.png)
81
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/lilgoblin2.png)
82
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/lilgoblin3.png)
83
+
84
+ In 4x:
85
+
86
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/lilgoblin1@4x.png)
87
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/lilgoblin2@4x.png)
88
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/lilgoblin3@4x.png)
89
+
90
+
91
+
92
+ ## Bonus - Ugly, Uglier, Ugliest - Yes, You Can - Design Your Own Goblin (Pixel) Monsters - Original 1/1 Goblin Monster Starter Kit
93
+
94
+ Is ugly the new beau / belle? Yes, you can. Design your own goblin (pixel) monsters.
95
+
96
+
97
+ ![](https://github.com/pixelartexchange/pixelart/raw/master/goblins/i/goblins_originals-24x24@4x.png)
19
98
 
99
+ To get you started find a series of original 1/1 goblin monsters (see above in 4x zoom) and a script to (auto-)generate some variants (with horns, cap forward, hoodies, golden earrings, & more) in the [**goblins/sandbox »**](https://github.com/pixelartexchange/pixelart/tree/master/goblins/sandbox)
20
100
 
21
101
 
22
102
 
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ Hoe.spec 'goblins' do
13
13
 
14
14
  self.version = Goblins::VERSION
15
15
 
16
- self.summary = "goblins - generate your own 20×20 goblin (pixel avatar) images (off chain) from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes and more"
16
+ self.summary = "goblins - generate your own 24×24 goblins or 20×20 lil'goblins (pixel) monster avatar images (off chain) from text attributes (via built-in spritesheets); incl. 2x/4x/8x zoom for bigger sizes and more"
17
17
  self.description = summary
18
18
 
19
19
  self.urls = { home: 'https://github.com/pixelartexchange/pixelart' }
@@ -0,0 +1,35 @@
1
+ id, category, name, more_names
2
+ 0, , green,
3
+ 1, , brown,
4
+ 2, , gray,
5
+ 3, , red,
6
+ 4, , gold,
7
+ 5, , bojangles,
8
+ 6, , Earring Gold,
9
+ 7, , Earrings Double Gold,
10
+ 8, , Earring Silver,
11
+ 9, , Earrings Double Silver,
12
+ 10, , black_shades,
13
+ 11, , blue_shades,
14
+ 12, , orange_shades,
15
+ 13, , cool_shades,
16
+ 14, , blue_flipped_cap,
17
+ 15, , red_flipped_cap,
18
+ 16, , Charcoal Flipped Cap, Flipped Cap
19
+ 17, , chef,
20
+ 18, , halo,
21
+ 19, , horns,
22
+ 20, , orange_beanie,
23
+ 21, , red_beanie,
24
+ 22, , straw_hat,
25
+ 23, , blue_hoodie,
26
+ 24, , hoodie,
27
+ 25, , blue_shirt,
28
+ 26, , white_shirt,
29
+ 27, , green_shirt,
30
+ 28, , blue_sweater,
31
+ 29, , white_sweater,
32
+ 30, , white_turtleneck,
33
+ 31, , suit-blue_tie,
34
+ 32, , suit-open,
35
+ 33, , suit-purple_tie,
Binary file
@@ -0,0 +1,52 @@
1
+ id, category, name, more_names
2
+ 0, , Green 1, Green
3
+ 1, , green2,
4
+ 2, , Brown 1, Brown
5
+ 3, , brown2,
6
+ 4, , Gray 1, Gray
7
+ 5, , gray2,
8
+ 6, , Blue 1, Blue
9
+ 7, , blue2,
10
+ 8, , Red 1, Red
11
+ 9, , red1i,
12
+ 10, , red1ii,
13
+ 11, , red2,
14
+ 12, , red2i,
15
+ 13, , red2ii,
16
+ 14, , red3,
17
+ 15, , Gold 1, Gold | Golden 1 | Golden
18
+ 16, , Gold 2, Golden 2
19
+ 17, , Eyes,
20
+ 18, , Mouth 1, Teeth | Mouth w/ Teeth
21
+ 19, , Mouth 2, Mouth
22
+ 20, , Mouth 3, Smile
23
+ 21, , Mouth 4, Frown
24
+ 22, , 3d_glasses,
25
+ 23, , big_shades,
26
+ 24, , heart_shades,
27
+ 25, , regular_shades,
28
+ 26, , Bojangles 1, Bojangles
29
+ 27, , bojangles2,
30
+ 28, , Earring Gold 1, Earring Gold
31
+ 29, , Earring Gold 2,
32
+ 30, , Earrings Double Gold 1, Earrings Double Gold
33
+ 31, , Earrings Double Gold 2,
34
+ 32, , beanie,
35
+ 33, , bow,
36
+ 34, , cap,
37
+ 35, , cap_forward,
38
+ 36, , horns,
39
+ 37, , knitted_cap,
40
+ 38, , top_hat,
41
+ 39, , pipe,
42
+ 40, , blue_hoodie,
43
+ 41, , blue_shirt,
44
+ 42, , blue_sweater,
45
+ 43, , green_shirt,
46
+ 44, , hoodie,
47
+ 45, , suit-blue_tie,
48
+ 46, , suit-open,
49
+ 47, , suit-purple_tie,
50
+ 48, , white_shirt,
51
+ 49, , white_sweater,
52
+ 50, , white_turtleneck,
Binary file
@@ -3,8 +3,8 @@
3
3
  module Goblins
4
4
 
5
5
  MAJOR = 0
6
- MINOR = 0
7
- PATCH = 1
6
+ MINOR = 1
7
+ PATCH = 0
8
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
9
9
 
10
10
  def self.version
data/lib/goblins.rb CHANGED
@@ -12,24 +12,23 @@ module Goblins
12
12
  class Image < Pixelart::Image; end
13
13
  end
14
14
 
15
+
15
16
  ###
16
17
  ## add convenience pre-configurated generatored with build-in spritesheet (see config)
17
-
18
18
  module Goblins
19
19
 
20
20
  def self.generator
21
- @generator ||= Pixelart::Generator.new( "#{root}/config/spritesheet.png",
22
- "#{root}/config/spritesheet.csv",
23
- width: 20,
24
- height: 20 )
21
+ @generator ||= Pixelart::Generator.new( "#{root}/config/spritesheet-24x24.png",
22
+ "#{root}/config/spritesheet-24x24.csv",
23
+ width: 24,
24
+ height: 24 )
25
25
  end
26
26
 
27
-
28
27
  class Image
29
28
  def self.generate( *values, background: nil )
30
29
  img = Goblins.generator.generate( *values, background: background )
31
30
  ## note: unwrap inner image before passing on to c'tor (requires ChunkyPNG image for now)
32
- new( 20, 20, img.image )
31
+ new( 24, 24, img.image )
33
32
  end # method Image.generate
34
33
  end # class Image
35
34
 
@@ -56,6 +55,59 @@ Goblin = Goblins
56
55
 
57
56
 
58
57
 
58
+
59
+ ## forward define superclass for image
60
+ module Lilgoblins
61
+ class Image < Pixelart::Image; end
62
+ end
63
+
64
+
65
+
66
+ ###
67
+ ## add convenience pre-configurated generatored with build-in spritesheet (see config)
68
+ module Lilgoblins
69
+
70
+ def self.generator
71
+ @generator ||= Pixelart::Generator.new( "#{Goblins.root}/config/spritesheet-20x20.png",
72
+ "#{Goblins.root}/config/spritesheet-20x20.csv",
73
+ width: 20,
74
+ height: 20 )
75
+ end
76
+
77
+ class Image
78
+ def self.generate( *values, background: nil )
79
+ img = Lilgoblins.generator.generate( *values, background: background )
80
+ ## note: unwrap inner image before passing on to c'tor (requires ChunkyPNG image for now)
81
+ new( 20, 20, img.image )
82
+ end # method Image.generate
83
+ end # class Image
84
+
85
+
86
+ class Spritesheet
87
+ ## note: for now class used for "namespace" only
88
+ def self.find_by( name: ) ## return archetype/attribute image by name
89
+ # note: pass along name as q (query string)
90
+ Lilgoblins.generator.find( name )
91
+ end
92
+ end # class Spritesheet
93
+ ## add convenience (alternate spelling) alias - why? why not?
94
+ SpriteSheet = Spritesheet
95
+ Sheet = Spritesheet
96
+ Sprite = Spritesheet
97
+ end # module Lilgoblins
98
+
99
+
100
+ ### add some convenience shortcuts
101
+ LilGoblins = Lilgoblins
102
+ LilGoblinz = Lilgoblins
103
+ Lilgoblinz = Lilgoblins
104
+ ## add singular too -why? why not?
105
+ LilGoblin = Lilgoblins
106
+ Lilgoblin = Lilgoblins
107
+
108
+
109
+
110
+
59
111
  ###
60
112
  # note: for convenience auto include Pixelart namespace!!! - why? why not?
61
113
  include Pixelart
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goblins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-03 00:00:00.000000000 Z
11
+ date: 2022-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pixelart
@@ -58,9 +58,9 @@ dependencies:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '3.23'
61
- description: goblins - generate your own 20×20 goblin (pixel avatar) images (off chain)
62
- from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger
63
- sizes and more
61
+ description: goblins - generate your own 24×24 goblins or 20×20 lil'goblins (pixel)
62
+ monster avatar images (off chain) from text attributes (via built-in spritesheets);
63
+ incl. 2x/4x/8x zoom for bigger sizes and more
64
64
  email: wwwmake@googlegroups.com
65
65
  executables: []
66
66
  extensions: []
@@ -73,6 +73,10 @@ files:
73
73
  - Manifest.txt
74
74
  - README.md
75
75
  - Rakefile
76
+ - config/spritesheet-20x20.csv
77
+ - config/spritesheet-20x20.png
78
+ - config/spritesheet-24x24.csv
79
+ - config/spritesheet-24x24.png
76
80
  - lib/goblins.rb
77
81
  - lib/goblins/version.rb
78
82
  homepage: https://github.com/pixelartexchange/pixelart
@@ -99,7 +103,7 @@ requirements: []
99
103
  rubygems_version: 3.3.7
100
104
  signing_key:
101
105
  specification_version: 4
102
- summary: goblins - generate your own 20×20 goblin (pixel avatar) images (off chain)
103
- from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger
104
- sizes and more
106
+ summary: goblins - generate your own 24×24 goblins or 20×20 lil'goblins (pixel) monster
107
+ avatar images (off chain) from text attributes (via built-in spritesheets); incl.
108
+ 2x/4x/8x zoom for bigger sizes and more
105
109
  test_files: []