master-of-magic

module
v0.0.0-...-4bf0284 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause

README

build linux build macos build windows

Master of Magic clone

Online demo

Play a wasm build of this game https://kazzmir.itch.io/magic

Also try the combat simulator, which lets you test different battle situations https://kazzmir.itch.io/magic-combat-simulator

Build:

Extra packages needed for ebiten https://ebitengine.org/en/documents/install.html

$ go mod tidy
$ go build -o magic ./game/magic

or

$ make

Run:

Put the master of magic lbx files in one of the following places

  • in the same directory as the game executable
  • in any subdirectory of the directory the game executable is in
  • in a zip file in the same directory as the game executable
  • in a zip file in any subdirectory of the directory the game executable is in
  • in a zip file and replace data/data/data.zip, then rebuild the game. This embeds the data into the executable. You can also put the unzipped lbx files in data/data/

Or use the -data <path> command line option to magic to specify either a directory that contains the lbx files or the <path> can be a zip file of the lbx files.

$ ./magic

or to run without building first

$ go run ./game/magic

Music:

To hear the music you must have a midi synthesizer running separately. On linux and macos you can use fluidsynth. Simply run fluidsynth on its own, and magic will automatically connect to it.

Screenshots:

new wizard

Directory layout:

  • game/ Contains go code that implements the game functionality
  • lib/ Supporting code used to load data/fonts
  • util/ Extra utility programs for development purposes (sprite viewer, font viewer, etc)
  • data/ Put a zip file with the game data to embed the data in the final binary
  • test/ Test programs for executing small pieces of functionality at a time

Directories

Path Synopsis
game
lib
colorconv
Package colorconv provide conversion of color to HSL, HSV and hex value.
Package colorconv provide conversion of color to HSL, HSV and hex value.
lbx
midi
Package midi helps with reading and writing of MIDI messages.
Package midi helps with reading and writing of MIDI messages.
midi/drivers/midicatdrv
Package midicatdrv provides a Driver to connect via the program midicat (from the tools).
Package midicatdrv provides a Driver to connect via the program midicat (from the tools).
midi/drivers/portmididrv
Package portmididrv provides an Driver to connect via portmidi.
Package portmididrv provides an Driver to connect via portmidi.
midi/drivers/portmididrv/imported/portmidi
Package portmidi provides PortMidi bindings.
Package portmidi provides PortMidi bindings.
midi/drivers/rtmididrv
Package rtmididrv provides a Driver to connect via rtmidi.
Package rtmididrv provides a Driver to connect via rtmidi.
midi/drivers/testdrv
Package testdrv provides a Driver for testing.
Package testdrv provides a Driver for testing.
midi/drivers/webmididrv
Package webmididrv provides a Driver to connect to MIDI ports in the browser (via webmidi).
Package webmididrv provides a Driver to connect to MIDI ports in the browser (via webmidi).
midi/gm
Package gm provides constants for instruments, drumkits and percussion keys based on the General MIDI standard.
Package gm provides constants for instruments, drumkits and percussion keys based on the General MIDI standard.
midi/mmc
Package mmc helps with reading and writing of MIDI Universal Real Time SysEx Commands.
Package mmc helps with reading and writing of MIDI Universal Real Time SysEx Commands.
midi/smf
Package smf helps with reading and writing of Standard MIDI Files.
Package smf helps with reading and writing of Standard MIDI Files.
midi/sysex
Package sysex provides helpers when dealing with system exclusiv messages
Package sysex provides helpers when dealing with system exclusiv messages
set
voc
xbr
xmi
test
util
xmi

Jump to

Keyboard shortcuts

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