Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple NPC Monsters & AI #30

Open
bdjewkes opened this issue Aug 4, 2019 · 0 comments
Open

Simple NPC Monsters & AI #30

bdjewkes opened this issue Aug 4, 2019 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@bdjewkes
Copy link
Collaborator

bdjewkes commented Aug 4, 2019

Currently all entities are players, but we want the world to be filled with NPCs for the player to interact with and struggle against.

Proposed implementation:

  • AI entities can use the same action_queue that players currently use. During process_tick, any AI actions in the queue can be evaluated using the same behavior as for players.

  • as a separate step in process_tick, loops over each monster entity in the world, and decide what action to put in the queue. In the long run, we'll what to have customizable behavior for different monsters, but an initial implementation could use very simple rules, such as:

    • if there is a player adjacent, attack it
    • if there is a player in view, move towards it
    • if there is nothing in view, wander randomly
  • for the initial implementation, a monster could spawn every x ticks if there are less than y monsters in the world

@bdjewkes bdjewkes added the help wanted Extra attention is needed label Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant