GAMEDEV.NET
[Ynamar Engine] #4 - Weekly Update [Map's, Npc's]
Repository: https://github.com/Zotesso/YnamarEngineServer - ProgressSend the map to the client via TCPDid it using the protobuf contract previously established, stiil I'm feeling that the packet is too large, using a two dimensional array to the tiles, and having the same amount of tiles in each layer of the map, so it is a mxn matrix, in a 250x250 map I will have 62500 tiles multiplied by the amount of layers in the map, so I will have over 100K register in the database for each map, and will need to send it through the network.May be a huge problema later, but I'll implement ways to reduce this problem, like a cache in the server and in the client, in order that I just need to send the map the first time and when there is some change in it.Thinking about to load the map in batches when the player moves, but even that solve the performance problem this may bring problems with network.Npc'sCreated the model of Npc's, and MapNpc's.Created the method to control the Npc movement in all Maps.Game LoopCreated the main Game Loop in server, that will control all the game logic, update the maps, update the npc's movements, everything that needs to be automated.Client - ProgressHUDWas using Myra to draw UI, but I find out that Myra is very limited as I needed more customization started searching other options.So find Gum: https://docs.flatredball.com/gumGreat support, active project, fully open-source and works very well with Monogame, and even better very customizable.The only problem is that, using Gum in my project increased the Client Memory Usage from 60MB to 122MB, so I am kinda worried about it because I just used it for the login screen.In case it turns out to be a problem, I will have to create my own UI Components Library.But for now, Gum is being amazing.Npc'sCreated the handler to Npc movement, and included npc movement check in the main client loop (need to refactor, I think that loop is wasting resources, but there is no other way to control the npc movement animation) Draw the map based on the package received from the ServerNext StepsServer Side: Refactor the TCP and UDP stream to have a graceful failoverStart to work in Npc/Player combat.Start to work on the inventoryStart to work on the AccessLevel (Implement some type of authorization level)Client Side (Didn't change):Refactor the TCP and UDP Classes.Add some type of local database (SQLite) to save information like MapStruct, NpcStructRefactor the login/register system to be more secure.Draw Items in the mapCreated the Player/Npc combatDraw Player HUD (to open inventory, see status etc…)Thank you for reading again, I'll be even more thankful if you could give me some advice to accomplish that journey.Thanks again,Zotesso
0 Commentarios 0 Acciones 46 Views