Nokorpo / LibreAim

Free and open source FPS aim trainer made with Godot.
https://discord.gg/u2Hm8sMagF
Apache License 2.0
71 stars 14 forks source link

Allow for custom scenes in gamemodes #35

Open antimundo opened 6 days ago

antimundo commented 6 days ago

⚠️ This task will be a huge milestone, and will also need an important rewrite of some core systems.

Summary

A very powerful feature of other aim trainers, is the ability for the users to completely customize each gamemode/scenario/task.

Right now, LibreAim allows players to modify a .cfg to customize some parameters of the game. But this has quite a lot of limitations.

Instead of just a .cfg file, users should be able to use a completely custom Godot scene, in which they can do whatever they want, model whatever 3D scenario they want, and even add custom scripts to modify things as they please.

Implementation

Currently, the game loads a scene called game_world.tscn which loads everything, including the scenario.

Instead of directly loading the 3D map, this scene should have a container that loads whatever 3D map and stuff that specific game mode has.

There are two things to take in mind:

  1. Users are currently able to customize the world texture. This functionality must keep working.
  2. The way targets are spawned and moved is currently hardcoded and will need to be completely rewritten.

Gamemode file structure

Currently the game loads .cfg file, inside the gamemodes folder we have this structure:

horizontal.cfg
moving.cfg
random.cfg
tracking.cfg

Users should be able to load custom resources for their custom scenes. So each gamemode should have it's own folder. Something like this (implementation might be different, this is just an example):

/sample_gamemode/
    scene.tscn
    icon.svg
    a_custom_resource.png