gophengine

package module
v0.0.0-...-f24390b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

README ΒΆ

GophEngine logo

🎀 GophEngine

English πŸ‡ΊπŸ‡Έ | Slovenčina πŸ‡ΈπŸ‡°

Status: work-in-progress

Go Reference Go Report Card GitHub license

GophEngine is a Go implementation of Friday Night Funkin' v0.2.7.1 with improvements and an alternative to vanilla FNF.

[!NOTE] This is a mod. This is not the vanilla game and should be treated as a modification.

Why?

I created GophEngine for several reasons:

  • To develop an easy-to-use Go modding MDK for Friday Night Funkin', similar to MinecraftForge but for FNF.
  • To fix issues in the vanilla FNF engine and add new features and improvements.
  • To foster a positive and non-toxic community around the game without the toxic community.
  • To remove violent NSFL (Not Safe For Life) content introduced in FNF v0.3.2, and create a cleaner version of the game.
  • To rewrite the game in Go, my favorite programming language.
Why Go?

Go is my favorite programming language, and I prefer it over learning Haxe.

Features

  • Enhanced privacy with no Newgrounds integration
  • Entirely written in Go with no Haxe
  • Family-friendly and welcoming to Boyfriend fans (no NSFW/L content)
  • Small tweaks and optimizations for a smoother and more enjoyable experience
  • Lower RAM consumption and overall smaller footprint
  • A proper options menu for better customization
  • Robust Go modding MDK for easy modification
  • Faster compile times

Hardware Requirements

Component Minimum Recommended
Processor Intel Core i3 / AMD Ryzen 3 Intel Core i5 / AMD Ryzen 5
Memory 4 GB 8 GB
Graphics Card Intel HD Graphics 4000 / NVIDIA GeForce GTX 600 Series / AMD Radeon HD 7000 Series Intel HD Graphics 5000 / NVIDIA GeForce GTX 750 Ti / AMD Radeon RX 560
DirectX / OpenGL DirectX 11 / OpenGL 3.0 DirectX 12 / OpenGL 4.5
Storage 256 MB 512 MB
Operating System Windows 7 / macOS 10.12 / Linux 2.6.32 Windows 11 / macOS 10.15 / Linux 5.x.x

Building & installing (from source)

Build instructions for GophEngine are available in BUILDING.md.

Naming

The name "GophEngine" combines "Goph" (representing Gopher, the Go programming language mascot) and "Engine" (representing the FNF engine). It felt more natural and fitting for this project than "funkin-go."

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details on how to get started.

License

Licensed under the Apache License 2.0 (see LICENSE)

Credits

πŸ’² Donate

If you enjoy playing GophEngine and would like to support its development, consider making a donation. Every bit of support is greatly appreciated! (pls I need money to buy Kofola)

You can donate through the following platforms:

  • Bitcoin (BTC): bc1qtykrhm2ar9jreha5rnqve72lutw02jzpu6lcgs
  • Duino-Coin (DUCO): SladkyCitron
  • Magi (XMG): 9K8GrfCGEvTK7qjDMVtkGE18UfRyUkv5QT or SladkyCitron

Thank you for your support! 😊

Homeless man holding cup

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

View Source
const (
	ActionUp input.Action = iota
	ActionDown
	ActionLeft
	ActionRight
	ActionAccept
	ActionBack
	ActionPause
	ActionReset
	ActionFullscreen
)

Variables ΒΆ

This section is empty.

Functions ΒΆ

func LoadKeymapFromConfig ΒΆ

func LoadKeymapFromConfig(cfg *config.Config) (input.Keymap, error)

Types ΒΆ

type BPMChangeEvent ΒΆ

type BPMChangeEvent struct {
	StepTime int
	SongTime float64
	Bpm      int
}

type Conductor ΒΆ

type Conductor struct {
	Bpm            int
	Crochet        float64
	StepCrochet    float64
	SongPosition   float64
	LastSongPos    float64
	Offset         float64
	SafeFrames     int
	SafeZoneOffset float64
	BPMChangeMap   []BPMChangeEvent
}

func NewConductor ΒΆ

func NewConductor(bpm int) *Conductor

func (*Conductor) ChangeBPM ΒΆ

func (c *Conductor) ChangeBPM(newBpm int)

func (*Conductor) MapBPMChanges ΒΆ

func (c *Conductor) MapBPMChanges(song *Song)

type Flasher ΒΆ

type Flasher struct {
	// contains filtered or unexported fields
}

func NewFlasher ΒΆ

func NewFlasher(width, height int, dur float32) *Flasher

func (*Flasher) Draw ΒΆ

func (f *Flasher) Draw(img *ebiten.Image)

func (*Flasher) Flash ΒΆ

func (f *Flasher) Flash()

func (*Flasher) Update ΒΆ

func (f *Flasher) Update(dt float64)

type Flicker ΒΆ

type Flicker struct {
	Sprite *Sprite

	OnCompleteCallback func() error
	// contains filtered or unexported fields
}

func NewFlicker ΒΆ

func NewFlicker(spr *Sprite, dur time.Duration, interval time.Duration) *Flicker

func (*Flicker) Flicker ΒΆ

func (f *Flicker) Flicker()

func (*Flicker) Update ΒΆ

func (f *Flicker) Update() error

type IntroText ΒΆ

type IntroText struct {
	// contains filtered or unexported fields
}

func NewIntroText ΒΆ

func NewIntroText(fsys fs.FS) (*IntroText, error)

func (*IntroText) AddText ΒΆ

func (it *IntroText) AddText(text string)

func (*IntroText) CreateText ΒΆ

func (it *IntroText) CreateText(text ...string)

func (*IntroText) DeleteText ΒΆ

func (it *IntroText) DeleteText()

func (*IntroText) Draw ΒΆ

func (it *IntroText) Draw(img *ebiten.Image)

func (*IntroText) Update ΒΆ

func (it *IntroText) Update(dt float64) error

type MusicBeat ΒΆ

type MusicBeat struct {
	LastBeat float64
	LastStep float64

	CurBeat int
	CurStep int

	StepHitFunc func(int)
	BeatHitFunc func(int)
	// contains filtered or unexported fields
}

MusicBeat is basically MusicBeatState in vanilla FNF.

func NewMusicBeat ΒΆ

func NewMusicBeat(c *Conductor) *MusicBeat

func (*MusicBeat) BeatHit ΒΆ

func (mb *MusicBeat) BeatHit()

func (*MusicBeat) StepHit ΒΆ

func (mb *MusicBeat) StepHit()

func (*MusicBeat) Update ΒΆ

func (mb *MusicBeat) Update()

func (*MusicBeat) UpdateBeat ΒΆ

func (mb *MusicBeat) UpdateBeat()

func (*MusicBeat) UpdateCurStep ΒΆ

func (mb *MusicBeat) UpdateCurStep()

type Scene ΒΆ

type Scene interface {
	io.Closer

	// Init initializes the scene. It's called once before the scene is displayed.
	Init() error

	// Update updates the scene by one tick; dt is the time since the last update (aka delta time).
	// dt is only used internally by gween (the tweening library), otherwise don't use this. It could be omitted if not necessary for your case.
	Update(dt float64) error

	// Draw renders the scene onto the screen for the current frame.
	Draw(screen *ebiten.Image)
}

Scene represents a game scene.

type SceneController ΒΆ

type SceneController struct {
	// contains filtered or unexported fields
}

func NewStateController ΒΆ

func NewStateController(state Scene) *SceneController

func (*SceneController) Close ΒΆ

func (sc *SceneController) Close() error

func (*SceneController) Draw ΒΆ

func (sc *SceneController) Draw(screen *ebiten.Image)

func (*SceneController) SwitchScene ΒΆ

func (sc *SceneController) SwitchScene(newScene Scene) error

func (*SceneController) Update ΒΆ

func (sc *SceneController) Update(dt float64) error

type Section ΒΆ

type Section struct {
	SectionNotes   [][]interface{} `json:"sectionNotes"`
	LengthInSteps  int             `json:"lengthInSteps"`
	TypeOfSection  int             `json:"typeOfSection"`
	MustHitSection bool            `json:"mustHitSection"`
	Bpm            int             `json:"bpm"`
	ChangeBPM      bool            `json:"changeBPM"`
	AltAnim        bool            `json:"altAnim"`
}

type Song ΒΆ

type Song struct {
	Song        string    `json:"song"`
	Notes       []Section `json:"notes"`
	Bpm         int       `json:"bpm"`
	NeedsVoices bool      `json:"needsVoices"`
	Speed       float64   `json:"speed"`
	Player1     string    `json:"player1"`
	Player2     string    `json:"player2"`
	ValidScore  bool      `json:"validScore"`
}

func LoadSongFromJSON ΒΆ

func LoadSongFromJSON(rawJson []byte) (*Song, error)

type Sprite ΒΆ

type Sprite struct {
	Position       image.Point
	Img            *ebiten.Image
	Visible        bool
	AnimController *anim.AnimController
}

func NewSprite ΒΆ

func NewSprite(x, y int) *Sprite

func (*Sprite) Draw ΒΆ

func (s *Sprite) Draw(img *ebiten.Image)

func (*Sprite) DrawImageOptions ΒΆ

func (s *Sprite) DrawImageOptions() *ebiten.DrawImageOptions

func (*Sprite) DrawWithOptions ΒΆ

func (s *Sprite) DrawWithOptions(img *ebiten.Image, opts *ebiten.DrawImageOptions)

Directories ΒΆ

Path Synopsis
Package assets provides access to the embedded FNF assets.
Package assets provides access to the embedded FNF assets.
cmd
internal
anim
Package anim implements animations.
Package anim implements animations.
anim/animhcl
Package animhcl allows loading from external HCL files (see `assets/images` for examples).
Package animhcl allows loading from external HCL files (see `assets/images` for examples).
character/boyfriend
Package boyfriend implements Boyfriend as defined here: https://github.com/FunkinCrew/Funkin/blob/v0.2.7.1/source/Boyfriend.hx
Package boyfriend implements Boyfriend as defined here: https://github.com/FunkinCrew/Funkin/blob/v0.2.7.1/source/Boyfriend.hx
config
Package config implements a simple key-value store used to securely store game save data and high scores in a non-human readable binary format.
Package config implements a simple key-value store used to securely store game save data and high scores in a non-human readable binary format.
scene
Package scene implements the scenes.
Package scene implements the scenes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL