Tuesday, September 19, 2017

Anyone reading?

Just a check to see if anyone is reading. I'm getting views but somehow I think they might be bots. If I come to that conclusion then I'll start a new blog, otherwise I'll keep going on this one.

War_44 "Main Feature: Economy & Resources"

Often times in my games, I work around and smoothen out everything before adding the main features to the game. There have been a few exceptions to this rule but for the most part it as held true.

And given that we are now 44 updates in a lot of ground work has been laid for the main features, and lots of smoothing has been done. So I am proud to announce one of the main features of the game: Economy & Resources.

I've designed a system where cities now each have their own wealth that contributes to the income of your country. This means that newly captured land the cities there may be poorer or richer than your own cities.

I've also added mines (oil well, metal mine, etc.) that will add to your resource count

War_43 "Models & Research plans & Optimization & Camera update"

First I fixed the loading screen. It only showed for the Host (All other players just froze on the main menu while loading the main game).

But more importantly, I finished making the models for the majority of the games units:

These units are not currently to scale, scale is applied when they are first created (from their mod file). I've also got plans on what you will be able to research and in what order:

It's not the fanciest picture but it'll do!

I've also managed to add another 30 fps to the game by optimizing some scripts, and finally I smoothed out camera movement! With this new camera update I also changed the camera mod file! But you'll see that later.

I've also added what I call "Height based rotation" which is when in most RTS games you zoom in a bunch and your camera rotates so it's not facing straight down.

This new smooth update with the height-based rotation makes the game not only feel more professional, but just overall better. Seeing as how camera movement is the main way the game is presented, it's very important that I get these sorts of updates in.

New Model: Paramilitary 1
New Model: Paramilitary 2
New Model: Paramilitary 3
New Model: Infantry 1
New Model: Infantry 2
New Model: Sniper
New Model: Anti-Tank
New Model: Light Tank 1
New Model: Light Tank 2
New Model: Armored Tank
New Model: Assault Plane
New Model: Recon Plane
New Model: Bomber Plane
Added: new camera movement
Changed: Camera mod file

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Monday, September 18, 2017

Screw Trading.& the problem with networking & plans for the future

Screw trading
I have spent nearly a week trying to get trading to work. Currently its state is that only non-hosts can send trade requests to the host, but they can't send requests to each other and the host can't send requests to them.

Every time I feel I've isolated the issue I find that it never ends up solving it. I feel that I have a general understanding as to WHY it isn't working, but as to how to fix it so far I've been clueless, and after spending nearly a day on the internet (since all previous days of just me trying had failed) I still failed to find a solution to the problem.

The problem with networking
The current way networking/multiplayer works (using the Unity Networking extension I use called Photon) and how it works with (what i believe to be) the majority of networking solutions on most games, is that most networking is handled by a "host". It is their computer's requirement to receive data, send it to the cloud and then the cloud sends it back to all other clients. But it is still the hosts responsibility to send those messages up.

This works very well with things like spawning in units, tracking their location on the map, or keeping track of simple stats.

Users send their trade data to a component that then sends the info to the person who needs to receive the trade request. But for some reason networking has decided that only the host can send messages through this component and therefore only the host can send trade requests. It's a massive barricade in networking code and something I'm working hard to fix.

Plans for the future
(As a disclosure, all the work on this project - including models and scripts have been solely done by me - my friend observed through Skype Screen share).
In order to teach one of my friends how to program in Unity C# we began making a simple obstacle course game. In this game, you would just have a player that could hit red box's (lasers or floors) and he would take damage. You could also find purple orbs to heal you, and you would touch yellow boxes as checkpoints.

Then we said "why not add enemies to make it harder" so we decided to make some enemies that would shoot at the player.

Then we said "why not make the scene better" so instead of just taking place in a generic obstacle course, I spent a lot of time designing an underground sort-of 'hallway scene'. This scene was to be a long hallway where you had to jump over obstacles and avoid getting shot by enemies.

Then my friend suggested armor so I added an armor pickup. And then I figured, while if the player picks up armor then he might as well have to pick up his weapon too. I wanted to make an armory room for this so I added to the start of the hallway a large room which I filled with boxes and lighting.

Then I kept adding to the underground bunker until I had created a facility with lots of different models and things like doors and lockers.

At this point, I had added "seeking" to the enemy because it was no longer one big hallway so the enemy should if he loses sight of you have to "look for" you.

At this point I had also added health pickups (First aid kit) and had added magazine pickups. The world was now a underground bunker (unifnished, only like 3 rooms and the entrance hallway). It was at this point that I decided that the game had taken a new direction.

I'm now working on an "outside of the bunker" and I've decided that the game is going to be an open world first person shooter where the supplies you needed (medical, attachments, ammo, guns) would have to be acquired yourself by going to various locations or doing various tasks.

Currently, I've added a single attachment you can pickup (Flashlight attachment) and there is still only one gun and one ammo type in the game (AK47 - 7.62)

But it has great potential. This is all still being used to educate my friend, but I've decided to pick this up as a full game project.

The majority of my efforts are still to be focused on the war game. All this just means that once the game has released on Steam tha I will have my next project to work on. And don't worry about me giving up on the war game, it's almost done - it just needs a few core features implemented (as well as some networking fixed) and it'll be ready for Steam!

Thanks for reading (especially if you actually got this far), feel free to leave a comment, and I'll see you in the next one!

Friday, September 15, 2017

Explanation for the delay

Its been awhile since the last update, and this is still not an update. I've been working very hard to fix one of my previous implemented features (Trading). It works locally but not over the internet. For some reason players are having difficulty communicating with the server in order to receive trade information (Who sent it, what resources are being requested, etc.)

But I've done a lot of other work as well. So when I finish this trading problem there will be some big updates already written and lined up to release afterward. But right now thinks are on hold as I try to fix the trading problem.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Monday, September 11, 2017

War_42 "Research & UI"

I've changed the way the game displays manpower and population. Rather than displaying an exact value the game will round & use letters to represent the number.

Now rather than showing
342,600,000 It will say 342.6M
And if it's less than 1,000,000 (for example: 500,000) it would say 500k.

But the most important thing I've added is: Research!

Like all other parts of my game it is heavily based around mod support. Research tiles are generated based on the .txt files and then put into a window:

Then you can click on the research and it will give you general info about the research (defined in the .txt files) like the description which includes unlocked units and buildings, as well as other details. And finally you can then start research.

You have two research slots to use (AKA you can be researching two things at any given time).

To make writing mod files easier I made so you don't have to directly list what research does. In fact a research mod file you only really need a name, description, icon, and the time it will take to research.

The units will have "Research requirement" parameters themselves so rather than you having to list off and search for units and buildings from the research mod file, you just have to list it as a requirement under the affected item (be it building or unit).

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Saturday, September 9, 2017

War_41 "Notifications & Trading Part 1"

Removed 'food' stat from countries. Originally it was going to be that you had to keep your population fed but I still want to keep things somewhat simple, so I decided to remove it.

Now as for trading, I've got a great new system setup called 'Notifications'. Similar to Sid Meier's Civilization V, notification are circles with icons to the right that do things when you click on them. In this case when you sent a trade request it gathers all the info from the trade. Once you click on the trade notification a window will pop up where you can view the two sides of the trade (What is being requested and what you are getting in return). You can then click trade and it will happen! Currently, I've yet to make so you can trade territory, but you can trade all other resources (Cash, rubber, oil, metal, support equipment, and infantry equipment).

Original icon (then realized gold doesn't make any sense)

Current trading icon

I plan on making a "Territory viewer" or something along those lines soon for trading territory.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Friday, September 8, 2017

War_40 "More Mod Support & Changes to the UI"

I've added a "color bar" under two of the 'flag displays' in the game. At the top, you'll see a small bar that shows the color of your country (under the flag), and in diplomacy, it'll show a bar below their flag showing the color of their country.

And second, I dug a little deeper in making my game have mod support! The camera! Now even the camera can be given custom settings:

This file (camera.txt) is located inside of the mod folder.

You can adjust things like Field of View, how fast the camera moves and zooms, and even what the camera's boundaries are (when it's not allowed to move left/right/up/down anymore). There's also a few other cool features in there like the cameras starting position, the angle is rotated at, you can even change the cameras 'projection' from perspective to orthographic (doesn't work very well, but it's a work in progress).

It had never crossed my mind to add something like this to mod support, but after messing with the camera's settings a lot (adjusting mostly movement) I thought it would be neat if players would have the same customization options for their own mods. Perhaps an entire mod dedicated to just making the camera overall better.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Thursday, September 7, 2017

War_39 "Diplomacy - Theory - Trading"

I write these updates in advance and this one got erased, so all information written is more-or-less 'guessing' at what was meant for the original update.

  • Added a 'Trade UI'. The plan is to make a trade system where most diplomatic things can be done, such as trading territory, asking for peace, etc. This is all in theory, but right now I have a nice UI for it.
  • Reduced the amount of population a territory tile is worth (from 3,000,000 to 300,000).
I've thought about it, and it seems like two friends could join a game and then one person give all their territory immediately to the other person. So for the sake of balancing I will be implementing a timer (when I have the actual trade system designed) that blocks you from trading entirely until X amount of time into the game (To be revealed because I haven't decided)).

I've also found a 'diplomacy glitch' that I don't know how to fix. Randomly it seems that if you spawn in and right click on a tile that it won't know who owns that tile and therefore wont let you trade, but most the time it does work. It's very confusing as I have no idea what's causing it.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Wednesday, September 6, 2017

War_38 "Flags"

I've thrown all the old South America flags into a folder called "Legacy". These will be included with the game in case any modders want to use them, but I've designed a series of new flags for the new countries. So here they are, the countries and their names:

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Tuesday, September 5, 2017

War_37 "Optimization & Anti-cheat"

I've changed how territory transparency (from zooming) works. This script was originally causing nearly 32% of all lag in the game due to it constantly searching for and doing unnecessary things. After removing and re-writing the script it now only accounts for 5% of game lag.

I also added Occlusion Culling to the camera which will un-render visual tiles that the camera cannot see, and re-render them when the camera can see them again. This will (hopefully) reduce up to 10% of the strain on the graphics card. That percentage will go up as things like units and buildings get added to the map, but the simple terrain tiles that exist now have been (proudly) made well enough that they do not cause much lag on their own.

I've updated the anti-cheat for modified data. It was telling me I had modified game data because it was still trying to compare my new country files to the old South America ones.

And finally, I re-designed the multiplayer lobby UI. But you can't see that yet :)

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Monday, September 4, 2017

War_36 "Territory - Part 4"

This update (because territory has actually been created) is to confirm how I want to divide the world up along with a few misc. changes.

  • Increased LOD distances so objects stay detailed at further distance
  • Added "Zoom transparency" that makes so territory is more transparent up close than further away (Was a feature on the last map but had to re-add it)
And now I've got a new system for representing territory. I've decided that I should show the border between territorial tiles to make territory capturing more obvious (in terms of where to target and what territory equals what).

As it stands right now, modders would have no way of knowing which territory has what ID and lots of other useful info they need for modding. Which is why I'm planning on creating under Singleplayer a "Tools" window that will put you into the game in what I call "Mod Mode".

Mod Mode - The idea is a dedicated tool for modders to access all the useful information they need to successfully mod the game

*Territory Designer
Easily select out territory that you would want your mod-country to own and it will generate a list of ID's, or hover over a single one to see its ID.

*Model Viewer
View a list of models you'll be able to use in your mods (Buildings, and Units).

*Unit Testing
Spawn in units to fight it out so you can simulate battles - This will support custom units you create

And other useful tools. This is all theoretical, and planned for 'after release' and will hopefully make modding easier!

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Thursday, August 31, 2017

Small wait

I won't have access to my computer for a couple of days so there won't be any updates for a little bit.

War_35 "Territory - Part 3"

The world has its territory made:

I'll be aiming for a time lapse release within the next few days, however, the time lapse version will be slightly different from this one. I've made several changes to the map since finishing recording (minor things like dividing what used to be bigger tiles into smaller tiles, fixing some boundary bugs, etc.)

And I've decided how I want to divide the world:

This was the last picture of the previous post (with the Country ID's added), and it's the one I've chosen to use.

Now I'll be spending the entire day writing the country files to turn this into reality.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Wednesday, August 30, 2017

War_34 "Territory - Part 2"

I've figured out how I want to divide most the world, but I'm iffy on how I want to divide North and South America. I've drawn up some more maps:

So far I'm aiming toward the last one. I've also got more of the territory mesh done (Finished Africa & North America).

I should also do well to mention that I've been recording me making the mesh so a time lapse will be available of it sometime after I finish it (because it will take awhile to edit because this is taking a LONG time).

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Tuesday, August 29, 2017

War_33 "Territory - Part 1"

The plan is simple now, I'm going to do territory similar but not quite the same to how I did it last time.

There will be a bunch of territory meshes that overlay the world. These mesh's instead of following custom random borders like last time will follow tile borders so that way a tile can't be partially owned by multiple territories. There may be some slight glitches to that rule here and there, but none intentionally.

The basic mode I'm thinking will feature 12 countries. I've drawn up several maps on how the world should be divided but I'm having trouble deciding:

But in the meantime, I'm making the actual territory tiles in Blender and it's going great! All of South America is done as well as some of North America.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Monday, August 28, 2017

War_32 "Creating the world: Asia & Ocean"

After testing I found that a lot of the old lag that existed when I had made South America was due to the ocean. It had a lot of moving vertices and special materials and such, and I tried using it at first but it just lagged things up too much so I went with a simple color to be the ocean.

Also, I did Asia.

Now that I've created the world, I need to figure out how I'm going to divide up the land.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one! Stay awesome

Friday, August 25, 2017

Plans for the future

I've decided a few things, and a few ideas.

1. No real-world countries to begin with
When the game releases because I already made the flags, all already-existing real-world flags will still come with the game, but real-world countries will not exist. This is because I want to work on my own balancing and when it comes to online lobby's all a player would have to do to have an advantage would be to pick a world superpower or large country. I hope that someone in the future will make a mod that makes the game use real-world countries, but for the time being it'll all just be made up for the sake of balancing.

2. Slight changes to the map for the sake of balancing & visuals
You may have noticed in these timelapses that I've added things that aren't actually there, and ignored some things that are - This is because which the games cartoony graphics I want to focus a lot on making the game look good, and work well.

3. Generated maps
I've been recently coming up with a formula for generating maps. This definitely won't come with the game when it releases, but this generation system will be useful for 'random matches'. The only problem is assigning territory and creating countries, so the initial plan is to just divide the map (programming wise) into sections and then assign territory accordingly. In the future I'll have something for balancing resources, and other such.

4. Larger than originally planned warfare
The size of units and other things are going to be increased. Originally you could fit a squad into a single tile, but it'll be much more larger-scale. Due to the large amount of tiles in the world, this game to complete would take a similar amount of time as in Hearts of Iron (the game this game was originally based on). And because I want this to be a casual alternative, I've decided to balance it for the sake of faster gameplay.

So those are some ideas, and suggestions.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one! Stay awesome :)

War_30 "Creating the world: Europe"

It took a few reuploads (and re-rendering which took about 2 hours each time) but finally the video doesn't have a copyright claim and can be uploaded!

So here's Europe:

Thanks for reading, feel free to leave a comment, and I'll see you in the next one! Stay awesome :)

Tuesday, August 22, 2017

War_29 "Creating the world: North America again"

How this is even possible I have no idea (seeing as how almost every 15 seconds literally I press Ctrl+S to save) but somehow me making North America didn't save. So I made it again.

Added tiles:
Plain Hill
Plain Mountain

Modified so Mountain does not become flat at distance (furthest LOD), but rather a very simple spike

Also, I added an 'Ice barrier' to the entire world.

I know this one took awhile, but stay tuned because I'll have another continent ready for you tomorrow!

Thanks for reading, feel free to leave a comment, and I'll see you in the next one! Stay awesome :)

Wednesday, August 16, 2017

War_28 "Creating the world: North America"

I added a new tile: Forest Hill.

And, North America! This one oddly didn't take as long as the other two, but it still took awhile!

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Monday, August 14, 2017

War_27 "Creating the World: Africa"

When making Africa I started getting so much done that I had to start taking notes!


Added borders to grass and desert to make the transition between other tiles look much smoother. The only problem with this is that there are more triangles on every grass and desert tile. But at the same time, it not only makes borders look nicer but it makes the rest of the map look more detailed. I'll play around with it, and if it doesn't create much lag then I'll keep it the way it is.

*Added desert river tiles, since many of the rivers in Africa ran through the desert it would be odd to use the grass river tiles.

*Increased Mountain LOD Height. This is because it was hard to tell the difference between hills and mountains at a distance (Because their LOD's were identical) so I increased the height of mountains to make it more obvious which was which.

*Added stone hills, this is because Madagascar had hills that weren't tall enough to be mountains and weren't sand enough to be considered dessert.

*Changed color of furthest jungle LOD. For some reason, it was the same color as normal grass, and so at a distance, you couldn't tell the difference between jungle and grass tiles.

*Make so a lot of tiles furthest LOD's don't cast shadows or receive shadows - There's no need to render shadows when you're that far away from the tiles.

Oh yeah, I also added Africa:

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Saturday, August 12, 2017

War_26 "Creating the world: South America"

When I was making the South America map I had lots of problems with updating the tiles to the new versions I had made, so that's why I've been fine-tuning all the tiles before I make the map so hopefully no problems will come up.

Added tiles:
  • Island (3D beach)
  • Jungle Hill

  • Beaches now have depth (the grass is slightly raised, and the beach/sandy area slopes downward)
  • Reduced triangle count on Military Base LOD's

I finally finished giving all the tiles their scripts, and collisions, and other such that they need to function. But that's not all, I used those tiles now to create the first continent: South America.

That's right! 1/7 complete!

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Wednesday, August 9, 2017

War_25 "Tile Update"

I was planning on working on the map, but I figured I should finish my list of 'to-do' tiles before-hand so I have as many to work with as I need when developing.

New Tiles:
  • Training Camp
  • Rubber Refinery (Improvement on Grass)
  • Oil Well
  • Civilian Factory
  • Military Factory
  • Added LOD's for Swamp
Changes to tiles:
  • All River tiles are now 3D instead of being flat on the ground
  • Added hill to River Curve
  • Reduced Swamp triangle count from 128 to 26
  • Reduced River T-Intersection triangle count from 98 to 58
  • Reduced River Curve triangle count from 98 to 67
  • Cities only renders grass (no buildings) at further distances
  • Forest only renders grass (no trees) at further distances
  • Jungle only renders grass (no trees) at further distances
  • Completely redesigned the River's last LOD
  • Reduced Paramilitary Base LOD triangle count from 180 to 152
  • Reduced Paramilitary Base Furthest LOD triangle count from 108 to 90
  • Reduced all city triangle counts by up to 10%

Oil Well
Civilian Factory

With the completion of these tiles, this means that all the tiles on my to-do list have been completed!

Here's the full list of existing tiles:

Landscape Tiles:
  • Desert
  • Desert Hill
  • Desert (Oil)
  • Swamp
  • Snow
  • Shallow Water
  • Forest
  • Grass
  • Grass Hill
  • Grass Hill (Metal)
  • Grass (Farm)
  • Grass (Farm without houses)
  • Snowy Mountain
  • Mountain
  • Desert Mountain
  • Stone
  • River
  • River Curve
  • River T-Intersection
  • River 4-way
  • Jungle
  • Beach
  • Beach Curve
  • Beach U Curve

Special Tiles:
  • Small Town
  • Town
  • Large Town
  • City
  • Metropolis

Improvements (Harvesting Resources):
  • Rubber Refinery
  • Metal Mine
  • Oil Well

  • Military Base
  • Airbase
  • Paramilitary Airbase
  • Paramilitary Base
  • Training Camp
  • Civilian Factory
  • Military Factory

And for 90% of them, there are 3 versions of the tile (Normal, LOD a bit away, LOD far away)

Sorry, this update took up the entire day so I didn't get the chance to work on the map! Stay tuned for tomorrow though!

Thanks for reading, feel free to leave a comment, and I'll see you in the next one! Stay awesome :)

Tuesday, August 8, 2017

War_24 "Improving tiles & making the game mod ready"

This update I've made so countries generated are dynamic. Originally there were 13 countries in the world, and no matter how many were written there would only ever be 13. Now I've written a script so it will generate countries based off of the number of countries that actually exist in the mod folder or in this case the Default folder.

I'm also re-doing all tiles (not visually but I'm re-doing their colliders and scripts). Here's a changelog:

Added tiles:

  • Paramilitary Base (Improvement for Grass)
  • Mine (Improvement for Hill)
  • Metal Deposit (Modified Hill)
  • Desert
  • Oil Deposit (Modified Desert)
  • Desert Mountain
  • Desert Hill

Changed Tiles:

  • Reduced triangle count of grass tile from 32 to 6
  • Changed height of Mountain LOD's
  • Changed height of Hill LOD

I'll be working on more tiles as well as starting on the first continent! Stay tuned for tomorrow :)

Thanks for reading, feel free to leave a comment, and I'll see you in the next one! Stay awesome :)

Monday, August 7, 2017

War_23 "Tiles"

I've began working on the optimization of tiles which meant making a bunch of LOD versions of already existing tiles (which wasn't very hard). I've also re-classified some other tiles, gotten rid of some, and added new ones.

To make things simple, here's a list:
LOD = Level of Detail, its an object that is less detailed than the main object at a distance

Added tiles:

  • LOD's for almost every tile
  • Military Base
  • Airbase (And their LOD's)
  • Paramilitary Airbase (And their LOD's)

Removed tiles:
  • Ocean
  • Blank tile
Changed Tiles:
  • Farm is now considered an improvement for grass
  • Mountain is now Snowy Mountain
  • Mountain2 is now Mountain

Military Base and its different LOD's

Paramilitary Airbase, Airbase, Military Base

All currently existing tiles

Ocean tiles were removed because since the ocean is free movement and not tile-based movement it would be pointless to lag the game with a bunch of tiles across the entire ocean, instead it will just be one giant 'ocean object' that will act as the visible ocean. I also removed the blank tile because it served no purpose (it was a test tile that I never ended up using).

What a tile is classified as is dependent on their Z order

-12: Furthest LOD for the improvement at -4
-8: LOD for the improvement above it
-4: Improvement of the tile above it
0: Normal Tile
+4: LOD for the tile below it
+8: Furthest LOD for the tile below it

Thanks for reading, feel free to leave a comment, and I'll see you in the next one! Stay awesome :)

Sunday, August 6, 2017

War_22 "The World"

If you put things into perspective, it was sort of stupid to do South America based off of a single reference image. This is because maps differ in shape and so doing north and central America would have been a pain to make due to differences:

That's a map of what I had done, versus everything that I have to do. It will be a shame too, but I'm going to have to remake South America to fit this new world map. It may look s though it's a perfect fit, it's not even close. I also plan on redoing territory and cities to be more accurate.

Originally I did territory with the same reference image, but getting it to actually match the game engine was challenging, so I've got a new tactic for combating that. I've also got new tiles to work with that I'll use when making South America this time.

This means that I'll now begin making the world continent-by-continent with better accuracy of borders and landscape.

I also will be introducing more "LOD" tiles which are basically flatter less detailed versions of the already existing tiles, so when you zoom out you won't experience as much lag due to the large amount of tiles your PC will have to render. The already existing tiles will only be seen when you're zoomed in.

This isn't really an update, more of a game-plan, but I plan on recording the entire development of the world and posting a blog update after every continent is finished. Then when the continents are done, I'll have to go back and re-do each one with detail (adding forest, and jungle and such) because those are things I won't be able to add with this map. And then finally, I'll have to make territory for each continent and make a .txt file for every country in the world.

No biggy.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one! Stay awesome :)

Friday, August 4, 2017

War_21 "Fundamental Saving"

As a side note, so there's no confusion on who owns a unit, each unit icon now displays its owners country flag below it:

That's a cool feature and all, but the real feature is saving! Yes, the game will now generate a save file for every country in the match. The save will go inside the folder running, so if you want to find your save files you have to look inside of the right folder (By default its default, but if you're running a mod then saves would be found inside your mod folder). Each country generates a .txt with their ID being the name, and all their information is inside it.

I'm hoping soon to make so it will generate unit saves so your units across the map will save!

*This save file though does not include what territory the country owns, so more has to be added. Other things will be added in the future too like who the country is at war with, what have they researched, etc.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Thursday, August 3, 2017

War_20 "Unit Ownership"

Units now change their icon color based on their relationship to the players country

Owned by the player
Green icon

Neutral to the player
White icon

Ally to the player
Blue icon

At war with the player
Red icon

Also, last update I made so units could be ordered somewhere and that meant anyone could order the unit. I've now made so the unit can only be ordered by the owner of the unit.

I'm also considering making so ally relationship color could be changed, but it seems like extra work for a feature that people won't end up using.

Sorry about these last two updates being so short, I've been working hard for tomorrow's update, so get ready!

Thanks for reading, feel free to leave a comment, and I'll see you in the next!

Wednesday, August 2, 2017

War_19 "Commanding units"

You can now command units! Units spawn into the world based on the parameters you set and you can select them with box select (drag from one spot to the screen to the other). And you can right click and they will go to the spot you right clicked.

Units also display an icon:

Since the icon matches the country that it belongs to, it looks a bit weird when inside its own territory. So I'm considering doing things differently (White icon for 'you own it' red for enemy, and blue for ally). If I do this then the white should stand out perfectly inside your own territory.

Sorry that this update seems a bit short, but it took the whole day restlessly working. If you consider it, you have to draw a 2D square on your screen, find all 3D objects in that square, and then filter out the ones that are units, and tell those units they've been selected. It's really complicated. But the unit also uses some of the stats from the .txt now, so we're closer to full modding.

Added a few parameters to the .txt:

Unit Icon
The unit icon (located under Icons/)

Model Rotation (3 numbers - x,y,z)
How the model should rotate when first created (Created because infantry model would always spawn facing downward)

Also I fixed a glitch where everyone in the room could see the Room ID, except for the host. This somewhat defeated the purpose of having the ID display because it's mostly for the hosts sake (the host can tell people what the ID is so they can direct connect) but that doesn't do the host any good if the host can't see what the ID is!

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Tuesday, August 1, 2017

War_18 "Modding Units"

I regret to inform that the modding system for units right now is somewhat pre-determined in terms of which units can get picked. So Units will be able to be loaded in to the game, but in terms of modding you'll have to edit the already existing ones, the game does not yet support adding new ones.

Custom models are also not yet supported. You will have to pick from a list of already created ones until I can figure out how to get unity to properly import models from outside folders.

Now for those of you interested, here's the official parameters you'll have to tinker with:

The display name of the unit

What model the unit uses (Currently must be selected from a list - the only model on the list atm is Infantry1)

Unit Count:
The number of units to spawn in (ex. there are 6 in an infantry squad)

The scale multiplier for the size of the units when spawning them in

Currently does nothing, all units will exist in their default position until further notice

What the unit fires (Bullet or Rocket)

The type of unit (Land or Air)

How fast the units can go

Damage Minimum:
The smallest amount of damage the unit will deal

Damage Maximum:
The largest amount of damage the unit will deal

How often the unit can attempt to fire again

From 0~100, the lower the number the greater chance the unit will hit their target

The minimum distance before this unit can engage/attack an enemy

The research needed for this unit to be deployed

Production Type:
The resource needed to be produced in order to create this unit

Production Use:
The amount of the above resource needed to be produced in order to create this unit

Manpower Cost:
The amount of manpower this unit will need when being deployed

None of this does anything as of yet, but I've designed a script that will read the .txt containing all this info and converts it into variables that the unit will eventually actually use. In the next few updates I'm hoping to make the units actually work, and add resources.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Monday, July 31, 2017

War_17 "Diplomacy"

When you right click in a nations territory it will now display their country name, flag, and username.

That's it. Stay tuned for tomorrow when you can actually do something with this.

Sunday, July 30, 2017

War_16 "Making multiplayer work"

This update was all about the title. Making so nultiplayer actually worked. The result has been now when you join a lobby and the host pressed launch, a few things happen.

1. The selected map will successfully load for everyone in the room
2. All players are assigned to the country they selected in the lobby
3. The host computer will select the files used to determine countries (Currently will only use Default) then all clients will load territory accordingly
4. Population will be assigned to country according to the territory they own, and the cities inside that territory
5. Manpower is calculated for each country depending on population and government type.

As it stands:
Democracy: 8% Recruitable population
Monarchy: 10% Recruitable Population
Dictatorship:14% Recruitable Population

You will be able to change how your country recruits population in the nation's tab later, but for now it's pre-assigned according to your country's government type.

And remember that manpower isn't everything as government types affect a whole lot more (like research speed, and other bonuses).

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

War_15 "New Models"

I've been gone for a couple days so I wanted to get something out to you guys:

Since I accidentally deleted the original war game models I have to make new ones, and that started with infantry (Tier 1, tier 2):

I also made an I.C.B.M for when I had nuclear weapons to the game:

That's about it for this update, sorry it's so short just wanted to get something out since it had been awhile!

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Friday, July 28, 2017

War_14 "More networking & direct connect fix"

For the past couple of days I've been working on something that sounds simple in practice (and is now that I know how to do it) but took forever to figure out.

Simply said: You can now select a country and when the game starts you will become that country.
*there are also a few 'error checkers' like the game has error text and won't launch if:
A) Someone hasn't selected a country
B) Two or more people have selected the same country

Also, I've fixed the 'direct connect' feature. I hadn't actually tested (because I had mistakenly been very confident in my code and forgot to do so) but it actually was glitchy because it would connect you to the room but wouldn't show the lobby. So you would be in the room technically but stuck on the servers list GUI.

Lotta programming, not a lot of explaining.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Thursday, July 27, 2017

War_13 "Modding, More data Anti-Cheat & I dun goofed"

Delete's a funny button. It's even funnier when used with Unity.
Short but annoying story short, all tank and infantry models are gone and have to be remade. But I have some plans for modding, so lets move past that.

First and foremost, I'm having great difficulty allow custom models (this sadly might mean that those who make custom buildings or units may have to use the ones already included in the game). As for unit and research modding, I've got new API written up for them that I've yet to test but the basic principle is there so far:

Note: Some stats are not yet decided so its left at 0

There's no guarantee that this will be what modding will look like in the end, but this is the plan so far. There's also a 'settings' file that needs to be included with every mod folder:

The version part of the Settings is the most important part by far. Using a mods version I'll be able to separate multiplayer matches and let people playing with the same mod play multiplayer together. Although this won't be supported, to begin with, this will probably be something added later down the road.

*Oh and the data anti-cheat (to make sure people with modified default data can't cheat and join default games) now checks for missing files so people missing default files will also not be allowed to play normal multiplayer.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Wednesday, July 26, 2017

War_12 "Data Anti-Cheat, Popups & Direct connect"

Rather than having a name each server is given an ID when it's created. This ID is a random number between 0 and 9,999,999. This way servers won't ever have the same ID (unless you're so lucky that you actually get the same ID which is, of course, a 1/9,999,999 chance to happen so pretty much the odds of winning the lottery).

(Although technically in programming terms a servers name is it's ID, but it's easier to just say server ID).

Since there could be a lot of servers available at any given moment it might be easier to give your friend the ID and have them type it in rather than having to search the servers list for the correct one, so I made a direct connect feature (displays on the servers list screen):

The next part of this update is a 'Data Anti-Cheat'. Since this game is moddable it only makes sense that players could modify game data to their advantage when starting a multiplayer match. This is why I've created a system that checks your games data then compares it to what it should be. If it finds any variations (AKA the data was modified) then it will not let you join multiplayer. Period.

(The code behind doing this, by the way, is so far over 650 lines of code, and 21,000 characters). The more countries that are added the higher that number will go, and soon it will include other things like research, units, etc.

Before joining multiplayer you (will) be able to select a 'mod folder' so if you want to play with mods or make your own, just don't edit the default folder and make a new one.

For now though, it creates a popup:

Eventually, there will be a link where I'll put the default folder that you can install (It's for those who want to just get a copy of the correct data rather than having to reinstall the entire game).

You may also notice at the top left it displays the game version. This version dictates what servers you can and cannot join. Your game version has to be the same as the host of the server in order to join them.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

War_11 "Menu & Networking"

Simple yet elegant. The main menu.

Now complete with:

  • Ability to connect to the master server
  • Creating and joining rooms with other players (and displaying their names on the side)
  • Adjusting max players for a room when creating it
  • Picking a map the lobby will host (Only map at the moment is South America)

*You cannot yet start the game

Doesn't sound like much but the networking I did live on my twitch for about two hours, and the main menu scene was done tile-by-tile and the main menu UI design was made on-the-fly.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Tuesday, July 25, 2017

War_10 "Territory"

It took awhile of doing but remember that previous mod support I made that included what territory countries own? While now it finally works! It took all day, and then it caused a lot of lag so it took even longer, but it's finally done:

All territory ownership means right now is a change in color but in the future it will result in changes to resources, population, city ownership, ability to build, etc. But for now it just changes a color.

Doesn't sound like much but it's about 60 or so lines of code. Which also doesn't sound like much but it was my first time making a script that could read a .txt file and then convert all the numbers into territory ID's so it was mostly hours of figuring things out.

after edit:
I forgot to add a label for Paraguay (the grey between Uruguay and Bolivia)

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!

Monday, July 24, 2017

War_9 "Mod Support & new interface"

The progress of this game exceeds expectations. This update is a big double-whammy introducing mod support and a new interface!

First lets start off with the interface:

Beginning on the left we have the country flag and all the main buttons you'll be using in-game:
  • Nation - Access government, politics, economy, and other stats
  • Trade - Pretty self-explanatory
  • Research - Also self-explanatory
  • Production - Used to produce equipment for your country (Infantry Weapons, tanks, etc.)
  • Building - Used to build things like factories, bases, forts, etc.
  • Recruit - Used to recruit parts of the population and place them in reserves for deployment at bases

It also at the top displays a number of key stats for your country:

  • Name - Very important
  • Approval - How your citizens approve of you
  • Population - Your total population (Civilian and military)
  • Manpower - Total military population (Reserve and active)

Then it displays your resources which are key to production, building, and trade:

  • Rubber
  • Metal
  • Oil

So not only does this interface update give us a new interface, but it provides you with some detail on how the game will work. And this interface already works in terms of taking which country the player is and assigning the values up there to be equal to the country's stats.

But the update doesn't end there. Introducing: Mod Support!

The game is just about ready to support modding! Right now modding just means editing existing countries, but soon that'll be turned into creating new ones and other things like editing what models units use and even adding new units.

Right now modding is just editing existing countries, but it works like this:

Inside of the game data is a folder called 'StreamingAssets'. Inside this folder you will find a folder called 'Default'. This will contain the default game info (Countries, flags, units, etc.). You can create a new folder, name it whatever you want, modify/add whatever you want, then you can tell the game to read that folder instead of the default one. Pretty cool, huh?

Best of all, as you can see from how simple it is up there, modding will be really easy so I'm expecting lots of great mods!

As a side note:
The game (will) have a built-in feature that prevents players with modified default data from playing multiplayer. So if you're going to modify/add things do so in another folder.

Thanks for reading, feel free to leave a comment, and I'll see you in the next one!