Skip to content

Instantly share code, notes, and snippets.

💙
Coding Go

Peter Hellberg peterhellberg

💙
Coding Go
View GitHub Profile
View gui-twisting-column.go
package main
import (
"image"
"image/draw"
"time"
"github.com/peterhellberg/gfx"
"github.com/peterhellberg/gui"
)
@peterhellberg
peterhellberg / gfx-cubic-bezier-curve.go
Created Mar 1, 2020
Cubic Bezier Curve using gfx
View gfx-cubic-bezier-curve.go
package main
import "github.com/peterhellberg/gfx"
var (
p = gfx.PaletteAmmo8
dst = gfx.NewImage(256, 256, p[1])
p0 = gfx.V(16, 192)
p1 = gfx.V(32, 8)
p2 = gfx.V(192, 244)
@peterhellberg
peterhellberg / coders-of-the-caribbean.go
Last active Jan 31, 2020
Coders of the Caribbean in Go
View coders-of-the-caribbean.go
package main
import (
"encoding/json"
"fmt"
"image"
"io"
"math"
"os"
"strings"
@peterhellberg
peterhellberg / jetpack-level-parser.go
Last active Nov 6, 2019
Level parser for Jetpack levels
View jetpack-level-parser.go
package main
import (
"encoding/binary"
"flag"
"image"
"strings"
"github.com/peterhellberg/gfx"
)
@peterhellberg
peterhellberg / lbm2png.go
Created Oct 15, 2019
lbm2png converts LBM to PNG
View lbm2png.go
package main
import (
"flag"
"image/png"
"log"
"os"
"github.com/textmodes/parser/image/ilbm"
)
@peterhellberg
peterhellberg / ebiten-gfx-submarine.go
Created Sep 16, 2019
Submarine SDF with fake 3D effect, rendered by Ebiten
View ebiten-gfx-submarine.go
package main
import (
"github.com/hajimehoshi/ebiten"
"github.com/peterhellberg/gfx"
)
func main() {
s := NewSubmarine(112, 112, gfx.PaletteAmmo8)
@peterhellberg
peterhellberg / gfx-color-emulation-gbc.go
Created Sep 13, 2019
LCD Color Emulation for Game Boy Color using gfx, based on https://byuu.net/video/color-emulation
View gfx-color-emulation-gbc.go
package main
import (
"bytes"
"image"
"image/color"
"github.com/peterhellberg/gfx"
)
@peterhellberg
peterhellberg / gfx-sudoku.go
Created Sep 13, 2019
Sudoku board drawn by gfx
View gfx-sudoku.go
package main
import (
"math/rand"
"github.com/peterhellberg/gfx"
)
func main() {
board := gfx.NewPaletted(9, 9, gfx.Palette15PDX)
View generate-screenshots.go
package main
import (
"encoding/json"
"os"
"strings"
"github.com/gocolly/colly"
)
@peterhellberg
peterhellberg / gui-d2.go
Created May 13, 2019
D2 menu using gui/gfx
View gui-d2.go
This file has been truncated, but you can view the full file.
package main
import (
"bytes"
"image"
"image/draw"
"github.com/peterhellberg/gfx"
"github.com/peterhellberg/gui"
You can’t perform that action at this time.