Skip to main content

DevBlog #31 - Game

     We are back!!!

    After several months of not wanting anything to do with my game due to the sudden and unfortunate realization that I would have to restart everything, and also have to figure out how networking worked, I am back! I have done a lot of thinking, a lot of school, and a lot of everyday life things, but now I am back, and I have made some progress that I am wanting to share.

    First things first, Steam Multiplayer...

    Multiplayer is a very difficult thing to do for Unity, even more so on a very small budget ($0), and a very small amount of networking knowledge. In total, I have probably watched somewhere around 100-200 hours of networking tutorials for Unity, and I have only just scratched the surface of what I need to know and do. However, that does not mean that I have not made some progress, because I have. I just completed the most basic implementation of Steam matchmaking/multiplayer/lobby systems in the world. You can either create or join a lobby. If you create a lobby you are given a lobby ID (which you can share), and then you can start the game. To join, you add said given ID to the main menu, and then you are added to their lobby. The current network architecture that I am using is a peer-to-peer system where the person hosting the server is also a client on that server. This means I do not need to host a fleet of servers in the cloud for a crazy amount of money, and I have also found a way for multiplayer to scale. Normally quality multiplayer games try to stay away from this model due to concerns over latency, and power, but this works well with my game since it is a turn-based strategy game and not a graphics-heavy FPS. 

    Unfortunately, I now have no idea what to do. I am going to have to essentially rewrite all of my code to allow for both single and multiplayer systems. Additionally, I am going to need to make it so that the clients can talk to each other (not chat or voice, but metadata). Furthermore, I have to figure out how to make it so that cheating can't occur, and fix other network considerations such as: what happens if the host leaves? What happens if one of the players leaves? so on and so forth.

    I will get to this down the road as I learn more and more about networking and how to best do it for gaming. Right now though, I will share the specs.

    I am using Fish-Net as my networking solution paired with Steamworks Steam Haven and Fishysteamworks. This allows me to use Steam as a relay system to allow for secure and protected peer-to-peer multiplayer systems. I will need to create some sort of matching system based on rank and location, but that is for another day. I have also decided to stick with Unity and not move to another game engine like Godot, Unreal, or a custom even with the recent pricing drama. This is mainly due to me wanting to complete this project, and not wanting to have to go learn something new all over again.

    This is all for now, I will try to keep working more on this project, but network/multiplayer development is frustrating and very irritating. However, I will do my best to write at least one blog article a week until this is done.

    Thank you for your time, bye!

Comments

Popular posts from this blog

DevBlog #41 - Game

    More progress has been made, and I feel like a million bucks because of this game.     1) Tech Tree Restructuring: I have switched my 1D list to a 2D list so that I can store all of the data about the branches and their different techs in each era. I have made it so that you can smart scroll through eras and through each tech category. Once researching the first tech, settlement, you can then get access to all other tech categories (Military, religious, education, industrial, etc), and each tech in that tree for each era. At the bottom, you can press a button to increase or decrease the era that you want to view. However, you can only increase up to a certain point, either the max of era 3 or the furthest era that branch goes to. This makes the tech tree feel a lot more advanced and less crowded.     2) Auction House: I have now got the viewing system working for all of the cards in the auction house, as well as the system to reassign who it is that is ...

DevBlog #18 - Game

      Today, I spent 10 hours working on the ability for a user to select a card, then a tile, the hit the card again in order to use it if it is tile specific. However, this idea sucks, and I don't like. Tomorrow I am going to go back and change the entire system. Instead you are going to drag the card to where you want it to go, then release it on the tile you want the effect to take place. This will then apply the effect to that tile. This way it is one click and not 3, and is also more interactive for the users. Furthermore, I wont have to convey to the user that certain cards are tile based, and some are not.     I also rewrote the terrain hex map generator script. I made the script completely modular, meaning that in the editor you can create an object to spawn on the terrain just by clicking a plus. You then plop in the model, the name, the description, the spawning frequencies, and the tiles that it can spawn on. Then for each tile that is generated it c...

DevBlog #5 - Game

      Hello, found out a solution to the problem that I was having yesterday. I have discovered the fabled perlin worms. We will use them by starting them off on high terrain values, and going to low terrain values changing every tile it touches into water tiles. This will create the effect of rivers.     Easy money!     Thats all for now, bye!