Discord
Login
Community
DARK THEME

Questions about making an RPG

  1. Is it best to use the built-in maps for the overworld or use something like a JSON file to store the maps?

  2. What should I use for events?

  3. What should I use to store other data, like player/enemy stats?

use this example made by TwiceUponATime, https://microstudio.dev/i/TwiceUponATime/rpgtest/

  1. It depends on how complicated you want the map to be. You can probably get away with a few tilemaps rendered on top of each other. You could add code to turn certain tiles into entities, such as enemy tile becoming a moving enemy. However, you may want to use a chunk-based system so that the entire world doesn't need to be loaded at once. If you want things like entities that don't align with the grid integrated into the world data, it's better to use JSON or a plugin that generates code.

  2. You can adapt the JavaScript EventTarget to work MicroScript, or write or find a simple event library that keeps track of each event as a list of event listeners such as GameEvents.

  3. For data used in initialization such as max HP and movement speed, it could be stored in a JSON file or coded into the player and enemy class constructors. With JSON, it would be easier to swap out different data. Changing attributes such as current HP and position can be stored as part of the class.

TwiceUponATime, you did not check to my project. You promised. :(

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community