/mage-city

Mage City, render Tiled maps in Elm and WebGL

Primary LanguageElmMIT LicenseMIT

Mage City

Mage City was my first foray into the Elm world and aimed to recreate the aesthetic and some gameplay elements of 90's Nintendo RPG action games like Secret of Mana. This project is no longer maintained and I keep it only for historical purposes.

If you are into Elm game development I've written Sunny Land which, I believe, is a much better introduction to the topic.

Try it out.

Mage City screenshot

Run locally

Clone the repo and run:

elm-package install

Elm will ask for confirmation and download all the necessary packages. Then run:

elm-reactor

and point your browser to http://localhost:8000/index.html.

Project status

The following features have been implemented:

  • Terrain rendering on the GPU, with support with multiple layers
  • Basic WebGL shaders for most common use-cases like static textured quads and animated quads
  • Obstacle detection, currently used to block player on map bounds
  • Keyboard input
  • Player walk movements
  • Game assets loading (textures only)
  • Game entities (initially just collectable items and triggers)

Possible roadmap

  • Text rendering
  • Player inventory
  • Dialog system
  • Non-playing characters (NPC)
  • Enemies and simple AI
  • Weapons and player melee attack
  • Mouse input
  • Pathfinding
  • Background music and sound effects

Tiled integration

Levels in Mage City have been designed using the open-source Tiled level editor and converted in Elm data structures using the elmify command line utility.

Game art credits

Code credits

Mage City contains portions of: