Would it be better to develop a game (In this context a Third Person Shooter) with a working ‘game mode’ such as conquest (capture and hold control points to reduce ticket count) including AI bots that will run around, capture points and shoot each other AND then add in multiplayer or seeing as the game is intended for multiplayer, add in multiplayer as the game mode is created?
Depends on things like your short-term goal etc and how fast you want to scratch a prototype but generally you should develop with multiplayer (i’m assuming networked? not split-screen etc.) in mind from the start. Making your game work with multiplayer from the start is much better than having a complete game and then trying to make it work with multiplayer as you would most likely have to restructure a lot of code/nodes, even if it is relatively easy to add replication etc. at a later stage.
Every importand Event, like Health and Damage, must be handled by the Server, and some components like Damage dealing or scoring Points (based on Team) have to Reference some Classes like Team, Squad, Objective etc. I´d recommend you to build your base game including multiplayer functionality. Also you have to balance your game. Would be pretty bad to spend so much time on a working title and then realising, than it´s totally unbalanced or causes performance problems.
I booked marked your page for future use
thanks for posting.
I personally recommend you simultaneously program your game with network replication in mind. If you get too far with development (single player) and then decide you’re going to do a “multiplayer pass” on all your code- omg you’re going to want to jump out of a window.
Plan ahead with a game design doc or tech design doc and create multiplayer code as you go. You’ll be happy you did from the start, believe me.
I’m currently converting my single player code to work online and I can’t highly recommend enough starting your project with online in mind. It’s an absolute nightmare converting it as its a completely different way of doing things. The fact blueprint functions don’t replicate is the biggest headache. You have to start replacing everything with events and your previously lovely clean event graph which all ran off lovely neat functions is now a mess of spaghetti.
hahaah that sums it up pretty good lol
Can someone post a quick list of bullet points of the major differences between offline blueprinting and online blueprinting. For example functions not replicating, need to do things with just events is nice to know. Any other main difference bullet points that stand out like that?
Thats kind of funny though because as a noob to blue printing all my code is messy and uses very little functions. I know how to use them but I always just end up creating long strings and copy pasting the strings around instead of creating the functions. I was going to go back and re-create it all as functions so it wasn’t such a mess but maybe my noob’ness worked out for once.
Is there any difference in Casting when doing online programming from offline? Or a difference between “Hidden In Game” and “Spawning”. I am kind of torn between turning effects on and off or spawning then destroying. Both seem to give the same results at this point in development but I have a fear that that could come back to bite me in time.
well functions are still a good idea and would recommend using them as much possible to keep the main event graph to a minimum. You just end up calling the event and connect your function to it. It’s more when you end up having to break a function up into separate parts because one bit needs replicating whilst another needs to be called on the client where is starts getting annoying.
for example a problem i ran into last night, when my vehicles get destroyed, it destroys the vehicle blueprint and replaces it with another blueprint that spawns a destroyed version of it. On the client when the vehicle was destroyed it was spawning two destroyed mesh’s whilst the server only spawned the one. I assumed the problem would be when the spawn for the vehicle gets called and spent a few hours changing ‘run from server’ to ‘multicast’ ‘run on client’, different authorities, nothing made sense. Then I realised that the destroyed blueprint actually spawns the mesh in a function in it’s own event graph as it spawns multiple mesh’s. So I’d set the destroyed blueprint to replicate which actually was only spawning once, the problem was within that blueprint where it was causing spawning on the server and the client. It’s very easy to get completely lost and start doubting yourself, the engine, your own sanity.
After tracking down at which point in the function was causing the problem and fixing it, fixing that broke the particle effects spawning on the client.
so basically a function that ran perfect on single player or from the server, had to completely rewrite to get it all working. I had to split the function up to run the spawning of the destroyed vehicle from the server and then create another event to run the create the particle effect as a multicast as particle systems (non blueprint) don’t replicate.
it’s a brain melter sometimes. As soon as you fix something it then breaks something else
Plus all the things I’m not even sure that are working or not that I havn’t probably tested yet, lots of it seems like it works fine but I havn’t even set half the variables I need to replicate yet so it’s kind of in some mutant half online/half offline state at the moment where it actually looks like it’s working, i get hit i lose health, i reckon the server doesn’t have the same value as my client though as i havn’t replicated it yet or done anything with the health, i still take damage though on the client. Basically i’m going to have to go through every line of code in there.
So yeah, don’t follow what I did
What I try to do now is still create functions, but being aware that the function will need to be called by an event. If functions were able to be replicated life would be a million times easy in regards to coding in blueprints.
In regards to your questions. Casting is no different to my knowledge.
Spawning is more intensive on the engine than setting an object to visible from hidden, pro’s and con’s to both approaches really. Best thing to do when spawning things like enemies or player actors, spawn them with an event set to ‘run on server’ and make sure you’ve ticked the ‘replicate’ and ‘net load on client’ settings on the actor blueprint itself. This way the server spawns the actor and it automatically gets replicated to the client. Took me a while to get my head round that
You can just box select your mess of Blueprint nodes and off the right click menu collapse it to a function.
There are a lot of times even in a Single player game where it’s much better to call an event that then is wired to the function. That can improve the framerate a lot, if you do a little bit, then call an event. It can spread the cpu work out over time instead of having to do it all at once. It can fix hitches that you find in framerate sometimes, at least it has for me.
ah I did not know that, that is actually very interesting as I’ve taken the complete opposite approach and tried to have as few events as possible and everything in functions.
good to know, I thank and curse you for that information
I would get a minimum viable product produced first, I am mainly a landscape artist but from what I’ve picked up some systems should be built with multi player in mind so either integrate as you go (best choice I’d think), or implement at a later date and backtrack and rewrite code
We are programming the single player first, and then totally reprogramming the multi-player as a separate game using similar values. In much the same way that modern shooters are made.