I’ve written a simple 2d multyplayer platformer. The client is coded in C++ with the use of sfml to draw everything to the screen. The server is written in C++ with the boost asio library for the network part. The client is a really simple version of the thing I would like to make, no animations, basically its just a map with a squar moving inside of it. Now, since it would be to much work for me to keep going like this I did some research for some engines. I tired both unity and unreal, but I prefer ue. Well my problem is, I can’t get my head how I should the class design work with unreal. As far as I can see, every game has a GameMode and a level etc. Let me explain how my old client worked.
There was 1 class, let’s call it CGame (I never use the C, but ye easy). This class knew if the game was running or the login screen or any future scene. If the game was running, it would send all messages to lets call it CIngame, if user is trying to login, the class would be CLogin. The second classes made a connection to one of my servers, since I seperated the login/game server from eachother. In the CIngame class, I would load the right map that the server sends to me, and load all other players etcetc.
Tho how would I implent something in unreal? Is this a wrong idea on how to use the engine? I have been thinking about creating 1 gamemode class that was basically my old CGame, which managed which GameState(?) to use, CLogin or CIngame. And in then in one of those classes load the right level? So for example the CLogin class would also have a level which only has a UI to let the user choose the character/channel etc.