Answer the question
In order to leave comments, you need to log in
Online game development?
How painful would it be to integrate a game engine, say libGDX , into a self-written wrapper for multiplayer interaction, which includes:
1. A list of snapshots of game state changes. So that when receiving a command from a client, depending on its ping, it could be attributed to a specific snapshot (the moment in time when it performed some action on the client) and apply the command to the world.
2. Binary state update protocol based on UDP
3. Hierarchy of user classes for network interaction (Session, encryption, and so on)
For example, is it difficult (in O( 1 ) ) to get a list of state changes for the current tick, on each of which (for example, player coordinates ) store them in the snapshot sheet node object, and after the current tick add this node to the head of the sheet
. provides for any non-trivial physical effects, except for collision detection, which, in principle, can be implemented by yourself using Quadtree, of course, you will have to rack your brains on how to make the tree efficient in using the processor cache, but I don’t think that this will become a stumbling block
Question : does it make sense to deal with libGDX to integrate into a wrapper for a multiplayer gameOr is it still worth developing your game architecture by including a small physics engine in it?
Answer the question
In order to leave comments, you need to log in
Yes, it’s worth figuring it out, if only for the reason of finding the kind of network client that you need to later come to a decision - what requirements should be for the engine - there you will already choose from a whole zoo, or rewrite the prototype on libgdx into a minimal engine.
It all depends on the logic of the backend, because out of the box libgdx only requires:
1) binding to the main events of the context of the platform on which the game is launched
2) a certain game loop
Everything else you write yourself.
The network part is perhaps the most difficult part in game development (if it's not a browser, of course).
I have not yet heard about the integration of engines into existing projects. Usually , an engine is first chosen, and a project is built on its basis, then the engine can be added or not added to the project if necessary. So, IMHO, it's better to develop your solution further. Although if the project is still small, then you can consider how to integrate your project into libGDX, and not vice versa.
Or write from scratch - then immediately choose Unity (rewriting from scratch, having experience, will be a little easier, but as for C #, it's better to lose 1 day, then fly in 5 minutes). Now new games are written specifically on Unity for many reasons, there is practically no competition in this regard.
If you need some great functionality, then you can look at the individual libraries from which game engines are built.
Physics is presented, respectively, in the form of Box2D , you can take it. (Other physics engines can be googled, a review of all is beyond the scope of the question).
As for the online part, you will have to make painful decisions about how to implement it in the best way, so that the players enjoy the gameplay in non-zero lag conditions. It depends entirely on what kind of game you have and what kind of fan you are.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question