How can I create a tower defense entity system that is optimized?

I’m trying to make a tower defense game, but i don’t know how to make an optimized entity system.

3 Likes

Use tables.
If you’re confused about the scripting part of it.
I suggest Youtube videos you can lookup via the platform as they can help a lot.

I would probably avoid using humanoids. I think large numbers of them will cause clumping and a loss of performance potentially.

I might try animating normal models (using AnimationControllers) and body movers to enable them to move. You could also assign network ownership of these entities to the client so the physics aspect is smoother.

2 Likes

How would i move the enemies though? Tables are for stats aren’t they?

There are probably tutorials online for how to make a TDS game. Don’t expect the devforum to write an entire system for you, please.

No, there aren’t and there is one from GnomeCode, but it’s far from optimized. And i’m not expecting, just need tips.

Alright well, I suggest making the game modular. Modular games are always better. You would require these things in your game:

  • Folder containing Configurations for each type of enemy
  • Each configuration would contain the rig, maxhealth, reward per 100 damage (suggestion), reward when killed, and it’s walkspeed
  • Folder or an array of waves
  • Each wave would contain the amount of each type of mob which spawns
  • A list which contains the order of which enemies spawn. For example, Zombies first, then Slow Zombies, then Fast Zombies, etc. This means the ones first in the list, always spawn first.
  • Anything else you want to add
  • A map which contains a start point (enemy spawn) and end point (home).
  • System which lets you place heros that cost money

There’s a lot of things you need, but once you start, it’s easy to continue adding stuff. These are just things I thought of, there is still more small things like animations and sounds to use!

You can watch a tutorial on how to make a TDS game to get an idea of where to start, you don’t have to use their system if you don’t want to.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.