Slide 1

Slide 1 text

Ebitengine ϓνConf #1 1/9 aethiopicuschan 2023/09/22 EbitengineͰGUIπʔϧ ࡞ͬͯΈͨ

Slide 2

Slide 2 text

Ebitengine ϓνConf #1 2/9 aethiopicuschan 2023/09/22 ؆ܿʹࣗݾ঺հ ීஈ͸ҩྍܥϕϯνϟʔͰαʔόαΠυΤϯδχΞΛ΍͍ͬͯ·͢ɻ ࢓ࣄͰ͸PythonΛ࢖͏͜ͱ͕ଟ͍Ͱ͕͢ɺϓϥΠϕʔτͩͱGolang͹͔ͬΓɻ X(Twitter)΍GitHubͳͲ͢΂ͯ aethiopicuschan ͱ͍͏໊લͰ΍͍ͬͯ·͢ɻ วྺ HSP -> ncurses -> Akashic Engine -> Ebitengine

Slide 3

Slide 3 text

Ebitengine ϓνConf #1 3/9 aethiopicuschan 2023/09/22 Odori

Slide 4

Slide 4 text

Ebitengine ϓνConf #1 4/9 aethiopicuschan 2023/09/22 Odori ύϥύϥອըͷΑ͏ͳܗͰγϯϓϧͳΞχϝʔγϣϯΛ࡞੒͢ΔGUIπʔϧɻ github.com/aethiopicuschan/odori ݟͤͨํ͕ૣ͍ͷͰσϞΛ͠·͢ɻ

Slide 5

Slide 5 text

Ebitengine ϓνConf #1 5/9 aethiopicuschan 2023/09/22 GIFग़ྗ GIFϑΝΠϧ͕ѻ͑Δ৭ͷ਺͸256৭·Ͱɻ ebiten.Image͔Βcolor.Paletteͱimage.PalettedΛ࡞Δඞཁ͕͋Δɻ ͍͍ײ͡ʹݮ৭͢Δ͔ɺimage/color/paletteʹ͋ΔPlan9/WebSafeΛ࢖͏ɻ OdoriͰ͸ github.com/soniakeys/quant Λར༻ɻ

Slide 6

Slide 6 text

Ebitengine ϓνConf #1 6/9 aethiopicuschan 2023/09/22 GIFग़ྗ img := ebiten.NewImage(100, 100) img.DrawImage(hoge, op) q := median.Quantizer(256) p := color.Palette{image.Transparent} p = append(p, q.Quantize(make(color.Palette, 0, 255), img)...) paletted := image.NewPaletted(img.Bounds(), p) draw.Draw(paletted, paletted.Rect, img, image.Point{0, 0}, draw.Src) ͱΓ͋͑ͣ image.Paletted Λ΍͍ͬͯ͘ɻ

Slide 7

Slide 7 text

Ebitengine ϓνConf #1 7/9 aethiopicuschan 2023/09/22 GIFग़ྗ outGif := &gif.GIF{} outGif.Image = append(outGif.Image, paletted) outGif.Delay = append(outGif.Delay, 100) outGif.Disposal = append(outGif.Disposal, gif.DisposalBackground) ࡞ͬͨ paletted Λ gif.GIF ʹ٧ΊΔɻ Delay͸ 1/100ඵͳͷͰɺ࣮ࡍʹ͸ TPS Λݩʹม׵ͨ͠Γ͢Δɻ Disposal͸ DisposalBackground ʹ͓͚ͯ͠͹ͱΓ͋͑ͣ҆৺Ͱ͖Δɻ

Slide 8

Slide 8 text

Ebitengine ϓνConf #1 8/9 aethiopicuschan 2023/09/22 GIFग़ྗ ͓·͚: Disposalൺֱ DisposalNone DisposalBackground

Slide 9

Slide 9 text

Ebitengine ϓνConf #1 9/9 aethiopicuschan 2023/09/22 GIFग़ྗ Ԡ༻ ebiten.ImageΛݩʹGIFΞχϝ͕࡞ΕΔ͜ͱ͕Θ͔ͬͨɻ = ήʔϜʹ࿥ըػೳΛ෇͚Δ͜ͱ͕Ͱ͖Δʂ (ߟ͑ͳ͚Ε͹͍͚ͳ͍͜ͱ͕͍ͩͿ૿͑Δ͕…) σϞΛ΍Γ·͢ɻ