Is it possible to have one of the players hosting the game directly on the client or do I have to create a server in addition to the client ?
What you could do is setup what is called a Listen Server. What a Listen Server does is allows you to be the Host while still playing the game on the same machine. Take Halo CE for example. You could go to the multiplayer screen and hit Host Server. It would then allow you to set up different options, you could then host the server and give the IP for your friends to join. That is called a Listen Server. You were the server, but you were also connected to your own server as a client. A dedicated server as the name implies is dedicated to only running the functions necessary for the server. While you could run a Dedicated server in the background while running a separate instance of the game (depending on how heavy the game is [heavy or light are terms used to describe how hardware intensive an application is]) could severally bring down performance. Again depending on how hard your game is to run. Mainly how much RAM and CPU it uses. For what you describe, a dedicated server would most likely be over kill. (Also depending on where your friends are. If you are in the same house, you can simply run off of LAN. However if they are across the world you may want to look into running a dedicated server on another computer if you have one just to improve performance a little.)
One way of setting up a simple multiplayer listen server would be to make a main menu UI and add a Host button (you can call it whatever you want). Once you’ve made the UI you could do a OnClicked command. From the OnClicked you could run it into a console command where you tell it to open a map and run it as a listen server.
Also set up a Join button that will allow the player to join your listen server once you’ve hosted it. You could add a
text box or something that tells your friends what your IP is. (127.0.0.1 is the default IP for LAN) If you do not know what your IP address is, you can use a website like ipchicken.com .
Add this to the OnClicked for the Join button:
Add this to the level blueprint. You’ll have to do this to all your maps:
If you want an actual tutorial on that let me know and I can make one.
After you’ve done that, click the little drop down button next to the Play and change the players to 2. Click play and it should open an extra window. If you look around you should see a second player there. You can also press what ever key you set in your input for your main menu (in this example I used P). It’ll open that UI. You can press Host, and it will load a new level as a listen server. Or you could press Join as the other player and it will join a new server. Note: This was set up for running LAN, if you want multiplayer across different networks that is a little more complicated.
how does a server work ?.. I think most of the actions should be processed by the server and not the player (to prevent cheating for example) but… how ?
You are correct in saying that most actions should be taken care of by the server. That is where Run on Server and Switch Has Authority come into play. You can use those functions to give authority to the server only. Also one piece of information you would need to know is that the Game Mode is server only. Meaning anything you put into the game mode will be accessible to the server only. I think [This][5] document will help you a lot.
As far as using blueprints only, yes you can! It may be a little harder and you will have some limitations, for example it probably won’t run massive Battlefield like maps with 64 players on it. (I don’t know, as I’ve never done a multiplayer game with blueprints with more than 8 players.) If you can, I would recommend learning C++ as it is faster and easier to setup once you’ve learned it. However, that is not for everyone. But from the sounds of the type of game you want to make, you shouldn’t have any problem.
You may also want to check [This][6] out on the marketplace. It has multiplayer already setup and two different game modes already handled. I used it to learn how Networking works with blueprints back when I only used C++. You may also enjoy watching [These][7] tutorials. They may help you a lot.
Making a game, especially an FPS is a very hard task with a lot of things that go into it. I wish you the best of luck with your project, if you have any other questions or would like help with your project let me know! Happy coding!