Skip to content

Small example of usage of Yaegi with ebitengine to allow hot reload

License

Notifications You must be signed in to change notification settings

Gandalf-Le-Dev/ebitengine-yaegi-hotreload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ebitengine engine with hotreload thanks to yaegi

How to use

Run the project

go run .

You will see the default debug text on screen

Now you can update the debug text in the file src/debug.go.

Example of update:

package src

import (
	"github.com/hajimehoshi/ebiten/v2"
	"github.com/hajimehoshi/ebiten/v2/ebitenutil"
)

func DrawDebugString(screen *ebiten.Image) {
	ebitenutil.DebugPrint(screen, "THIS IS AN UPDATE")
}

After saving press R in game and you will see you updated text.

Demo

DEMO-hotreload.mov

About

Small example of usage of Yaegi with ebitengine to allow hot reload

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages