Skip to main content

DevBlog #32 - Game

     Progress has been made. I have done a couple of things today that are pretty amazing (for my skill set), and in the following paragraphs. Enjoy!

    1) Client Scene Movement: I am now able to send clients to certain scenes based on a string of the scenes that I want them to go to. This should work for all networked/lobby clients, but I have yet to test the system on anything other than the host system (my PC).

    2) Terrain Generation: I have swapped out the old outdated hexagons for the fresh and new squares. I mainly did this so that when I was working on networking and pathfinding for roads and canals I would not have to make art combos for 2^6 but instead 2^4 for each transport type (ex. plain and stone roads, plain and stone walls, plain and stone canals, etc). This will end up saving me hundreds of hours on Blender, are will give me a bit of a more unique art style (imagine a hybrid of Polytopia and a board game). Terrain generation was very difficult to do since it is random and procedural (based on Perlin noise), and was multiplayer. I had to find a way to generate the same terrain with all of the same values and noise for every client and the host. The easy part was designing a system, the hard part was building it and understanding not only what network functions to use, but why I needed to use them and how they worked. I created a design where the host would create the tile map, and then store the position and tile element ID (id's: grass, desert, sea, etc). Once created the server would pass this array of data to each client, and they would reconstruct it through a simple for loop. Placing the tile specified by the element id, and in the position provided by the array. This only works because each client is "shipped" a pre-existing dictionary of tiles that is the same for everyone since all players need to be able to be both the server and the client at any time. I still need to make myself more familiar with the systems that power this solution (RPCs, Broadcasts, and other networking tools), but I think I have made some progress in understanding it. This solution is also untested, but I should find out tomorrow.

    3) Camera Controller: I have moved the camera controller over from the previous version of this game, but have found that implementing it is a bit more difficult than I first thought. Since I can not attach game objects to the client, or create any new ones specifically for the prefab (client), I need to alter the code. This should just be a matter of testing and fixing the code, iterating through it, and figuring out what works, but that does not mean it won't be annoying and time-consuming.

    Conclusion: Overall, not a huge amount of gaming changing progress, and the progress that has been conde is untested and unproven, but I think that this is a great step in the right direction. I have begun my networking adventure/journey, and I hope to learn more and push my limits for this project. Goodnight, and good 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!