NPC Management

This forum is currently in read-only mode.
From the Asset Store
Manage time and money, plan the best strategy to make all the customers happy in your restaurant, a hotel, cafe, or any
  • Hey, what would be the best way to manage approx. 100 NPC's over different layouts?

    If any more info's needed let me know.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If any more info's needed let me know.

    Alot more info is needed!

    1. Will the NPC's be "active" on different layouts even though that layout may not have the current focus? For example, you leave a layout and move to a new area but when you return the NPC has traveled around and not where you last saw it.

    2. What does manage mean? Do you need to know NPC stats all the time in all layouts?

  • Okay, well...

    Preferably, my game will have 100 +/- ships that would run trade goods between sectors, and even fight each other. So the galaxy would evolve.

    Ambitious, I know. And probably a little ridiculous, but even if I could "simulate" that and just move NPCs between sectors whether you're in the galaxy view or the system view. Would be great.

    Any more info needed?


  • I think you are in uncharted territory here, so experimentation is probably best. It would probably take quite awhile to even start to draw up a plan for something like this. It's definitely going to be complex!

  • Sounds like it will be quite complex, indeed. While I wouldn't say that Construct wouldn't be able to handle the data storage and manipulation with it's native data structures, I would suggest thinking about using lucid's 's' plugin, or Python Classes, to deal with all of the data needed for such a game.

    I have not tried the 's' plugin. It sounds like it would fit the ticket nicely, though. Since I am quite comfortable with Python, though, I would definitely use classes for each of the components involved. Object-oriented strategy would work well for something like this. At least, one can use Python Classes as a sort of c-like 'struct' in which one can have structured groups of different types of data with meaningful names. These are also capable of pointing to each other, thus 'linking' to each other. It can be a bit tricky interfacing Python code with Construct's events, but it's not too bad...

    I'm not sure of your sectioning of the game universe, but off of the top of my head, I can see I'd want some basic data structures like so:


    • 'Health'
    • Speed
    • Armor
    • Class of ship
    • Armaments (list)
    • fuel capacity
    • current fuel
    • cargo capacity
    • current cargo (list)
    • current location


    • sector located in (link to sector)
    • Type of economy
    • population
    • crime level
    • needed goods (list)
    • surplus goods (list)

    ... etc


    • bordering sectors (list of links to other sectors)
    • ships in sector (list of links to ships)

    ... etc

    ... and much more data than that, depending upon the complexity desired. The trick is to make it as simple as possible in the hidden inner workings of the game, while making it seem complex/realistic to the player. It could be as simple as having an array/list of ships that you loop through every tick of the game, having them make decisions based upon semi-random choices.

  • You should take a look at this ... s_for_.php

    I think It will help you with your Npc AI and management.

    the info here show you how to do what you want.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)