diff --git a/community/scrolling-background/README.md b/community/scrolling-background/README.md index 5347004..db3ae06 100644 --- a/community/scrolling-background/README.md +++ b/community/scrolling-background/README.md @@ -3,3 +3,5 @@ Created by [Sergio Vera](https://github.com/svera) This example shows how to implement an infinite side scrolling background. + +Credits to [Peter Hellberg](https://github.com/peterhellberg) for the improved background image. diff --git a/community/scrolling-background/gamebackground.jpg b/community/scrolling-background/gamebackground.jpg deleted file mode 100644 index 050632d..0000000 Binary files a/community/scrolling-background/gamebackground.jpg and /dev/null differ diff --git a/community/scrolling-background/main.go b/community/scrolling-background/main.go index b606b2f..cc9dfd8 100644 --- a/community/scrolling-background/main.go +++ b/community/scrolling-background/main.go @@ -5,7 +5,7 @@ import ( "os" "time" - _ "image/jpeg" + _ "image/png" "github.com/faiface/pixel" "github.com/faiface/pixel/pixelgl" @@ -43,7 +43,7 @@ func run() { } // Pic must have double the width of the window, as it will scroll to the left - pic, err := loadPicture("gamebackground.jpg") + pic, err := loadPicture("gamebackground.png") if err != nil { panic(err) }