I want to make a wave-based game but

Warning: Do not write/send me any scripts as it is not allowed + i want to learn for future projects. You have been warned

To clarify things first, im a beginner so lets just get straight to the point.

I wanted to make a Wave-based game like DVN and Combat initiation but i have a problem, i dont know how to… So i decided to make this post for feedback on what “requirements” i would need have to starting making a Wave-based game.
As i said before, do not write/send scripts for me,it is not allowed + i want to learn for future projects, instead you could give feedback on what i should learn first, ** by sending me links to other posts, videos or just comment explanations on what this or that does.

It may be best to send me like a list of things that i should learn then send a link or explanation for me to understand and keep that knowedge in my head to be able to create a wave-based game** (and when i mean “requirements” and " things i should learn", i mean like functions, if statements etc…)

Lets clarify a few things.
I could watch Videos but i wouldn’t be able to learn anything + there is someting that its missing from there that i will talk soon… I could try seeing posts on they’r own experience, that could work right? Well, here is the catch…

Enemy Varities, the name explain’s itself and i wanted to add enemy variants like in the games like Zombie rush, combat initiation, DVN and much more that uses enemy variants but no other video has taught us how to make enemy variants and the posts, i would require to make scripts by my own way and since im only a beginner, and it would be hard because i would need to make simular lines of code like that script with my own and im still not ready to script by myself without problems that require a entire dev forum’s community to help (also they are hard to understand without knowing the context).

So im asking for feedback on what i would need to learn (like functions, if statements etc…) so i could be prepared to make a wave-based game with enemy variants.

Here is a list of things i know

  • If statements
  • Functions (including local functions)
  • RemoteEvents (only including remote events and no other type)
  • Tables (from server scripts, only know how to print them)
  • Task.Wait() or wait()
  • Else Statements
  • Changing properties through scripts (ex: part color, lightning etc…)
  • Loops
  • String,Bool,Number Values
  • FindFirstChild() and WaitForChild()
  • Local scripts (ex: Part color is red only for this specific player but not for the rest of the server or players)
    I will probably add more if i can remember

Now im gonna say it for the last time but DO NOT send/write me scripts for me to use.

(had to rewrite this again eogh)

when i started from a basic game to a wave based ones, i just started to write the structure of the game, you’ll basically need to find out what value instance class a client needs to read so for example i had 2 integers value, 2 boolean values and string for displaying status of the game.

Since you’re going for an endless wave, while loops will be useless to check for the game over, instead you’ll just need every players to die or until game ends in a happy ending, most of the time the handling will almost came from connecting such events by the value objects, so the structure im currently using in my game is like this.

  • Create 2 functions, both are intermission and they’ll do it’s job, one for the lobby and one for in round, and because there is no check if the game is over or winning, this is where 2 boolean values come into play.

  • I use those 2 booleans instance by connecting an event with Changed, since normal datatypes don’t have a signal events provided and only possible way is using the if statement which in some cases code logic changes for no reason (where my expected code behaviors would change, resulting in strange magic or code not working at all) this is why i tend to have 2 of them.

  • now in this part here i’ll need a way to make a game do something else whenever it’s over or they won, if player alive is counted at 0 then turn both booleans value off, This will trigger the Changed event from one of the booleans, reset everything back to normal and it’ll return to restart the game.

  • In server side, i would also need a value to check too, much like setting it for both the client and server, the remaining value where only a server can see will change it, along with player alive table where i store any players alive, and once again there needs to be player alive value if you’re debugging how many players are alive but you can hide this in a server side, i used the hashtag from the start of the table name to get the amount of indexes and set value property to the amount of table indexes.

  • the rest is to add components you like e.g Music, events, rewards etc.

and here it comes when it’s about NPCs, apparently in DVN i assumed sensei uses FSM and this was also implemented in my game aswell, To make NPC handling easier, i need to use a FSM structure which is essential role to the game where i can script the state easily, FSM allows you to swap the state based on scenarios for example, an NPC spots a player within 100 studs and it’ll begin to swap to the run state in order to catch them, If you’re starting with a basic simple script using CollectionService without FSM, chances are that you’ll struggle to find where you would need to put the actions they’re doing.

there’s a video about FSM structure in lua by b. ricey, he explains that a lot right than me.

if you’re already familiar with tables then im pretty sure you can make some wave pool system where each waves you’ll spawn NPCs and the more wave players progress, the more powerful enemies start to appear

So with that being said, wave based game if it’s endless with no timer during the game active, use the boolean and some game data to detect and change state of a game, NPC, use FSM to store behaviours of NPC and let it handle, it is optional to use OOP.

1 Like