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 17, 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 / graceful.go
Last active Oct 6, 2019
*http.Server in Go 1.8 supports graceful shutdown. This is a small example.
View graceful.go
package main
import (
"context"
"log"
"net/http"
"os"
"os/signal"
"time"
)
View raycaster.go
package main
import (
"bytes"
"flag"
"image"
"image/color"
"image/draw"
"image/png"
"math"
@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"
)
View gfx-tinykaboom.go
package main
import (
"image"
"image/color"
"math"
"github.com/peterhellberg/gfx"
)
@peterhellberg
peterhellberg / ebiten-gfx-raycaster.go
Last active Aug 5, 2019
Raycaster rendered by Ebiten using gfx.
View ebiten-gfx-raycaster.go
package main
import (
"bytes"
"flag"
"image"
"image/color"
"math"
"time"
You can’t perform that action at this time.