Skip to content

Instantly share code, notes, and snippets.

💙
Coding Go

Peter Hellberg peterhellberg

💙
Coding Go
Block or report user

Report or block peterhellberg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@peterhellberg
peterhellberg / jetpack-level-parser.go
Last active Oct 16, 2019
Level parser for Jetpack levels
View jetpack-level-parser.go
package main
import (
"encoding/binary"
"flag"
"image"
"io"
"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"
@peterhellberg
peterhellberg / gui-experiment.go
Last active May 12, 2019
GUI experiment with two routines drawing parts of the window (foo draws the upper half, bar the bottom half)
View gui-experiment.go
package main
import (
"image"
"image/draw"
"github.com/peterhellberg/gfx"
"github.com/peterhellberg/gui"
)
@peterhellberg
peterhellberg / gui-xor.go
Last active May 12, 2019
XOR image drawn by gfx, and displayed using gui
View gui-xor.go
package main
import (
"image"
"image/draw"
"github.com/peterhellberg/gfx"
"github.com/peterhellberg/gui"
)
View gfx-ASCII-color-ramp.go
package main
import "github.com/peterhellberg/gfx"
const w, h = 16, 16
const ramp = " .:-=+*#%@"
func main() {
m := gfx.NewGray(gfx.IR(0, 0, w, h))
You can’t perform that action at this time.