Skip to main content

DevBlog #42 - Game

     I kinda don't like networking and having to deal with it. It is a really big pain. Here are some of the realizations that hit me when working on this, and how I dealt (I think) with them.

    1) Networking Object Instantiation: I realized late last night (~2 am) that when a player was creating a building, the data was not being shared with other clients. All buildings were being created locally which is not good for an RTS multiplayer game. I then had to figure out how to create network objects, and how to pass that information/creation event to other clients and the server. This involved some RPCs and some code reworks, but I think it works. Tomorrow, I will be doing the first-ever multiplayer test, so I hope the gods are smiling down on me.

    2) Networking Data Creation and Management: Next up is how to pass/update information when it is created or needs to be changed. I needed this for the terrain management system. The creation of the tiles, along with the updating of tile occupancy needed to be networked so that when the map is created it properly functions, additionally ensuring that multiple people can't place multiple buildings on the same tile.

    3) Client-to-Client Interactions: I also needed to create a system for the auction house that would allow people to discard their cards, and have them appear on the other client's screen. This is very important as part of the game is managing what you play as well as what you allow other players to play.

    I also then worked a bunch on some game features. Here are the following:

    1) Settlement Systems: Leveling up settlements is a big part of the game as your cities need to grow as they thrive and develop. I made a system that upgrades the cities and then expands them. Expansion involves claiming new tiles, checking population stats, and building stats.

    2) Map Generation: I believe I reworked the map generation system to just have the server create the map, then have the server tell the clients to create the same map as the server does while the server is creating it in real-time. This works better than passing the tiles one at a time after the server generates it, therefore removing the theoretical advantage the server/starting client would have.

    Thats around it, I am going to keep plugging around in the code, but I wont bother with another update tonight. Good night, and fare well.

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 #17 - Game

      These past couple of days have been exceptionally rough. I accidently destroyed my temporary file backup system for the game, and pushed the bad code to GitHub. I then spent 20 hours trying to get everything back. Olex and I where up until 1 in the morning trying to fix everything. Then we shut it down, picked it back up at 6 and continued work. We finally got everything working again, but it was a grind. I then had to redo all of the work and progress that I had made in the past week and a half. In the end though we got it back, and I learned a lot about source control.     I also made a bunch of progress on the card effect manager script, and realized something about scriptable objects.     Firstly, the card effect manager. I created a system that would allow us to in the editor customize the exact impact and effect the card would have on the player, and on the board. Then I created a system that would track how long the cards where active...