danilko / topdown-2d-multiplayer

top - down 2D multiplayer base on godot
MIT License
26 stars 7 forks source link

Allow player and bots to select spawn base from available base instead of always fixed ones #24

Closed danilko closed 2 years ago

danilko commented 2 years ago

As a player, I wanted myself and AI to select spawn base for new units from available base instead of always fixed ones to improve game play strategy

Right now the agent spawn is always from the initial base (unless that base is being taken) which makes the gameplay kind of predicable and less strategic

One proposal will be:

When the agent is about to be spawn, has a threashold (like 5 seconds) to let player/AI to decide the base to be used, otherwise default to the default calculated base

danilko commented 2 years ago

Latest logic allows player and bot to have a fixed time to select before the respawn of unit happen, right now is fixed in length, but will eventually expose in the setting

In AgentSpawnManager.cs, where the allow time (ALLOW_UNIT_CONFIG_TIME) to config must always be smaller than total allowed unit config time (UNIT_CONFIG_TIME) as leave 1 - 2 seconds for server to save and update the setting (otherwise the setting maybe in, but the unit is already spawn)


    public static int UNIT_CONFIG_TIME = 12;

    public static int ALLOW_UNIT_CONFIG_TIME = 10;

    public static int DEFAULT_DELAY = 20;
    private void _notifyAgentConfigServer(String unitID, Team.TeamCode team)
...
danilko commented 2 years ago

Close the issue for now as initial implementation is completed, future UI improvement will open as a separate issue. image