Skip to main content

DevBlog #9 - Game

     Hello everyone, today I have been hard at work fixing and debugging my card dealer script. Now the script it 100% modular and can scale with the additions of new cards, new techs, and new card holder slots on the UI. I have made it completely modular and controllable through the UI and unity editor.

    First I created 2 arrays, one for the action cards, and one for the event cards. The action cards then need to be sorted by their tech categories in order to make the percentage buffs assigned by the government the player has be taken into account. So in order to do this I sorted all of the action cards into their own arrays based on category. Then I have giant math system that chooses a random number and the ranges that these categories falls into change if/when the player has a government type. Then once the category is chosen, a random number between 0 and the length of the array is used to pick a random card that the user has. This card is then added to an array to temporarily store the card that was drawn. The process is repeated for as many available holders there are in the scene. BTW the holders can be assigned by simply dragging and dropping them into the public array in the unity editor. Once all of the action and event cards have been drawn a new function puts them into the correct location. For every holder we get its position, then we assign a card to each of the locations in the scene. Once again this is modular and scales with the amount of holders than you assign.

    I also added some changes to the card script and unit script. Now you can select the type of unit it is. Ranged, Naval, Siege, Land, or Religious. I also did a bunch of other quality of life updates making it so that the infrastructure behind the scenes was solid.

    However, so far I haven't been able to test it to see if it works as Nick has yet to send over the necessary game files meaning I can only build, and not test. However, I have been chugging hard and working on making these systems work well.

    To conclude, I also wrote a simple script that will be in charge of connecting everything together. Its called the player script and will be in charge of handling the drawing of cards, the picking of governments, the building of buildings, the training of units, and much more. Although, i still have to create a script that will allow the player to build, then I have to add to the script to make it so that the player can train. But after that we will have a MVP of our little game. Yay!

    Good bye, see you soon!

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!