Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fall Banner 2023 Idea - Dev Diary
#4
It makes sense to start with the pumpkin.

But before I do that, I want to take a hot minute to think about modular design and reusability.

I think by listing out what I need, I have identified a few things that could work for modularity and reuse:
  • A shape area
    • rect_x, rect_y, rect_w, rect_h - determines where the shape can be drawn. (the bounding box for the entire random shape)
    • shape - one of line, box, triangle, or ellipse
    • shape_jitter - 0-100 range in which points are humanized or randomized for each point in a shape, or line.
    • shape_rect_offset_x - determines where to draw the shape within the rect - x coord
    • shape_rect_offset_y - same but y coord
    • shape_min_w - minimum width of shape
    • shape_max_w - maximum width of shape
    • shape_fill_color
    • shape_line_color
    • shape_is_filled - boolean
    • shape_is_outlined - boolean
    • shape_visibility - string - "always", "sometimes", "never", "25%" - when do we draw the shape? random % 25%, 50%, etc.

Now if I look at just a pumpkin, it could be composed of the main shape area (the ellipse for the body), the eyes, the nose, the mouth

pumpkin-body
  • shape area: rect_x:0, rect_y:0, rect_w:200, rect_h:100 (because rect_w is 2x height - ellipse could be short and wide)
  • shape: "ellipse"
  • shape_jitter: 0
  • shape_rect_offset_x: 0 (body has no offset)
  • shape_rect_offset_y: 0 (body has no offset)
  • shape_min_w: rect_w\3
  • shape_max_w: rect_w-2
  • shape_min_h: rect_h\3
  • shape_max_h: rect_h-2
  • shape_fill_color: orange
  • shape_line_color: n/a
  • shape_is_filled: true
  • shape_is_outlined: false
  • shape_visibility: "always"

pumpkin-eye-left
  • shape area: rect_x: pumpkin-body.rect_w \ 4, rect_y: pumpkin-body.rect_h\4, rect_w:20, rect_h:10 (wider triangle than taller)
  • shape: "triangle"
  • shape_rect_offset_x: 5 (eye can have offset 0 to n)
  • shape_rect_offset_y: 5 (eye can have offset 0 to n)
  • shape_min_w: rect_w\2
  • shape_max_w: rect_w
  • shape_min_h: rect_h\2
  • shape_max_h: rect_h
  • shape_fill_color: yellow
  • shape_line_color: n/a
  • shape_is_filled: true
  • shape_is_outlined: false
  • shape_visibility: "80%" (i don't want the eye always there - pumpkins could have 1 eye)

pumpkin-eye-right
  • shape area: rect_x: pumpkin-body.rect_w \ 2, rect_y: pumpkin-body.rect_h\4, rect_w:20, rect_h:10 (wider triangle than taller)
  • shape: "triangle"
  • shape_rect_offset_x: 5 (eye can have offset 0 to n)
  • shape_rect_offset_y: 5 (eye can have offset 0 to n)
  • shape_min_w: rect_w\2
  • shape_max_w: rect_w
  • shape_min_h: rect_h\2
  • shape_max_h: rect_h
  • shape_fill_color: yellow
  • shape_line_color: n/a
  • shape_is_filled: true
  • shape_is_outlined: false
  • shape_visibility: "80%" (i don't want the eye always there - pumpkins could have 1 eye)

pumpkin-mouth
So here is where the shape choices break down and we need a composite shape. I think I will need to put more thought into this.

I will also need a way to composite shapes in boolean so I could have a grin with a half circle, and some rects for teeth, etc.

WIP... Smile
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply


Messages In This Thread
Fall Banner 2023 Idea - Dev Diary - by grymmjack - 09-02-2023, 12:59 AM
RE: Fall Banner 2023 Idea - by grymmjack - 09-02-2023, 01:11 AM
RE: Fall Banner 2023 Idea - by grymmjack - 09-02-2023, 01:17 AM
RE: Fall Banner 2023 Idea - by grymmjack - 09-02-2023, 01:45 AM
RE: Fall Banner 2023 Idea - by grymmjack - 09-02-2023, 02:01 AM
RE: Fall Banner 2023 Idea - by grymmjack - 09-02-2023, 02:07 AM
RE: Fall Banner 2023 Idea - by grymmjack - 09-02-2023, 02:33 AM
RE: Fall Banner 2023 Idea - by grymmjack - 09-02-2023, 02:40 AM
RE: Fall Banner 2023 Idea - by grymmjack - 09-02-2023, 02:49 AM
RE: Fall Banner 2023 Idea - by grymmjack - 09-02-2023, 03:18 AM
RE: Fall Banner 2023 Idea - by grymmjack - 09-02-2023, 03:29 AM
RE: Fall Banner 2023 Idea - Dev Diary - by dbox - 09-02-2023, 03:37 AM
RE: Fall Banner 2023 Idea - Dev Diary - by dbox - 09-02-2023, 02:02 PM
RE: Fall Banner 2023 Idea - Dev Diary - by bplus - 09-02-2023, 03:29 PM
RE: Fall Banner 2023 Idea - Dev Diary - by bplus - 09-06-2023, 01:59 PM



Users browsing this thread: 2 Guest(s)