Handle game configuration more dynamically

Open
#35 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp, unity
Domain
game-dev, tooling

Research direction

Start by reading the per-game classes in VisualPinball.Engine.PinMAME/Games and the registration and dropdown logic around line 65 of VisualPinball.Engine.PinMAME.Unity/Editor/PinMameGamelogicEngineInspector.cs. Done means both the non-Unity solution and Unity package can load JSON game data with inheritance, support the listed metadata and mappings, and provide searchable game selection.

Written by the indexing model from the issue text.

Description

help wanted

Right now, for every game, we create a class here and register them here. This is sub-optimal, because this configuration needs to be compiled, and it sits outside of Unity, so it needs to be compiled manually on every change.

A better approach would be to serialize the data as JSON and add the possibility to load them from anywhere. Since at some point there will be many games, the existing drop-down should be replaced by a more user-friendly search field.

The data should be the following:

  • Metadata about the game
    • Name
    • ID (short name, but unique)
    • Year
    • Manufacturer
    • IPDB Number
  • Available ROMs
    • ROM ID (name of the zip file of the ROM)
    • Version (readable name of the ROM)
    • Description (optional notes)
  • Aliases (common items that we globally identify by name)
  • Switches
  • Lamps
  • Coils

Depending on the game's system, some configurations are identical across multiple games. Thus, there should be a way of inheriting data, where a config can extend another, overriding existing values.

We need to be smart about how to set this up. The long-term goal is that if a table author works on a game that hasn't got a configuration yet, it can be easily created in the editor, and at some point submitted back to the repository for other authors to use.

Note that this issue applies to both the non-Unity .sln solution as well as the Unity-specific package.

Dominant language
C#
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from VisualPinball/VisualPinball.Engine.PinMAME

All issues in VisualPinball/VisualPinball.Engine.PinMAME

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.