Best approach to multiplayer online campaign games?

EDIT: I’ve made a more refined post. This one is just for referencing some stats below, otherwise I may be looking to get this one locked.

I’ve been brewing up ideas for a multiplayer-online campaign story game and I’m not too sure of what proper approaches I should be taking as per crafting the main game code.

I’ve seen a couple of multiplayer online games that work close to or exactly how I envision one would; being able to start at specific chapters or the beginning of the game, stopping the game and starting over with a game over and having conditions to be met before the story progresses. The thing is, I’m not too sure how I should approach it all. The ability to loop the game when its over or finished, stopping the game if all players are dead, checking conditions or any of that.

I was wondering if anyone had any tips for how I could approach this best? I know of some methods I could apply (might take a while since I’m not good with making actual games, just assets for a game) but I’m concerned with a couple of factors, such as
- How the code looks
- If players will be kept waiting
- If I can get the game to advance only if conditions are met and with an anchored timeline
- How to end the game if it is finished or a game over is reached, then restart that over


Some examples of multiplayer online campaign games I have encountered before (funny that they’re mostly all zombie games) (I know how some work and some I don’t):

Contamination
Function (direct or from what I observe):
- Uses nested if statements and waits to advance the stages and check if people have died or not
- Waits some seconds before advancing to the next stage
Problems:
- Nested if statements, not a good thing to do
- Game continues advancing until a certain point where it checks the number of players alive; check performed every “chapter” or so
^ Doing it so often means mass nesting and keeping players waiting for a while
- Can’t begin at a specific point of the campaign if I want chapters to save and for them to restart the whole chapter or a part of it upon game over
- To restart the game, an archived game script is cloned, pasted into the workspace and has its disabled property turned off, while the current running script ends all its processes and deletes itself

Reason 4 Life 1
Function (direct or from what I observe):
- Puts while and for loops inside while and for loops for various stages
- Time value counting up; every “benchmark”, game progresses
- Value inside main script called “Running”; determines if the game is up or not
- If running value set to (2?), while loop for progressing the game stops and prompts the “failed” screen
^ Running script in a while loop allows it to be stopped at any time if all players have died and it can reset itself over
Problems:
- Relatively messy with many if statements checking the time of the game and progressing based on that value. Personal nitpick when I want to read the code (no one else will see it)
- Becomes a mess when I want to integrate conditions that must be met before the game progresses as opposed to based on time
- Time anchors the gameplay to a specific timeline and not based on if players can solve puzzles or clear areas of enemies
- Can’t begin at a specific point of the campaign if I want chapters to save and for them to restart the whole chapter or a part of it upon game over

Undead Nation
Function (direct or from what I observe):
- Players select chapters, get teleported to a specific area of the map for that chapter
- Conditions can be met before the game progresses (i.e. zombie boss must be killed before opening an area and announcing that chapter x has begun)
- Gameplay is not anchored to a timeline; depends on how quickly players solve puzzles or clear conditions
- Game ends immediately if all players die as it should
Problems:
- Exploiters
- Poor management of the game can result in misplaced events (clicking a button in Chapter 2 of map while others are in Chapter 1)
^ Results in lots of checks, variables/value objects
- Game advances via ClickDetector MouseClick, Part.Touched, Humanoid.Died, EnemiesInArea(.Value) = 0 (ties in with Humanoid.Died) and other flags
- Prone to becoming messy

Mission, Series! → Campaign Mode(s)
Function (direct or from what I observe):
- Advances story based on time line; dedicates some time to getting the intro moving and such
- Reaching a part of the story, no new dialog is spoken until all enemies are cleared from the area or everyone reaches a certain area
- Game ends immediately if all players die as it should; restarts itself
- Has mostly everything I’m looking for
Problems:
- Can’t begin at a specific point of the campaign if I want chapters to save and for them to restart the whole chapter or a part of it upon game over

Boss Fighting Stages
Function (direct or from what I observe):
- Refer to “Mission, Series!” (since that’s more or less exactly how it works)
Problems:
- Can’t begin at a specific part of a chapter; not important as it can begin the whole chapter again and I can split the game into multiple chapters as an ugly and long workaround


also can we get more campaign games on roblox and not round-based ones plz

1 Like
  • Much harder to make
  • Less socialising (unless the campaign requires crazy tactial coordinate, in which case it’s not suitable for the majority of users
  • Less trading
  • Less time for people to buy stuff (without completely ruining the game)

Ultimately it’s not worth it from a business perspective. Only ‘cultured’ Roblox players will play the game unless you make it appeal to the younger audiences.

The one exception would be a game like that Zombie Attack, except it has a storyline and isn’t just surviving waves.

The biggest tip I can give you is try to your hardest to keep the game from being tedious.
Organise like crazy. Don’t let anything slip your notice.

3 Likes

I understand that, yet I want to do it anyway. I consider it a for-fun side project so I can actually get something done, since I don’t necessarily have the time on my hands to make any full-fledged games and maintain them due to outside interferences (groups and school).

1 Like

Yep. In that case - just remember to keep it simple. You probably already know that haha.

Do the same with your game’s mechanics - try not to complicate them unless you know you have the time and motivation to do it.

e.g don’t implement some crazy mathematical system to do detect when the game should end. If someone leaves, and there is < 2 people left in the game, end it just like that with no additional checks, etc. There really isn’t any need to make it perfect for a side project (at least during development).

1 Like

I know that bumping on the DevForum is generally discouraged and against the rules, but I’m going to go ahead and necrobump this thread. I’ve become increasingly interested in making a multiplayer campaign game, whether or not it makes money, so I’m interested in how I should organize my coding for it all to work.

Also don’t want to start a new thread.

I have not had any real success in making a good game yet, so take my word with a grain of salt.

I would say that the first step is to sleep on it.

After you wake up the next day, ask yourself if you still have the enthusiasm.
If you do, continue. Otherwise, give up.

Groups are really helpful for organization in a project.
Seeing as you want to have a series of pre-prepared levels, a group would be especially useful to you when organizing places. Speaking of which…

Take advantage of places. Having multiple places inside your game is pretty much the easiest way to create levels.

Next, create modules. Because your game has multiple places, copying and pasting scripts from place to place would be impractical.

Having to manually update a script in every place, every time you fix a bug, is annoying.
Instead, have the majority of your code be inside modules.

If a ModuleScript object is has its Name property set to ‘MainModule’ and is uploaded to Roblox as a model to your account, Scripts can use require with the uploaded model’s AssetId instead.

(Roblox Wiki)

One of the first modules you will have to create is a datastore module.

To keep track of

  • player’s weapons
  • player’s saved levels
  • player’s cash
    etc.

The rest is pretty much up to you.

A key thing to remember is to try to stick to a
minimum viable product
at first, and work from there.

Get the bare minimum done to
make the game playable.
Only then should you add extra fancy pizazz.

After you have a nice playable game, polish it.
Make sure your color scheme is consistent, make sure your fonts are consistent, make sure your game feels nice.

The last step would be to release and advertise.

Make a few ads. Spend a little money on putting up the ads.

If you want a free alternative to photoshop, get Paint.NET.
(Although, it should be noted, photoshop has a lot more premium features that are well worth the investment)

I have yet to make any real quality games, but I have done a lot of research into game and software development as a whole.

These are my “cliff-notes”.

I realise this post is kind of going a little overboard, but I hope this helped.

3 Likes