Sunday, April 19, 2015

Week 14

Next week is the big week and our team is feeling confident with Senior Show. This past week our game played at a local Arcade & Bar and it went super well. This helped our teams morale tremendously. We weren't in a bad spot, we were feeling well and confident, but a nice boost is great. It allows us to be even more confident moving forward even better. As a team we are trying to implement all the updated assets and avoid feature creep as much as possible. The build currently is due in 48 hours and at least the last 24 we want to have to be bug fix and testing. The last thing we want is to add something with less than 24 hours and have something go wrong. That never ends well for a team. The least stress near the end the better people will feel going into Senior Show, which allows for less stress afterwards when they need to talk to the recruiters and have interviews. A strong show will allow great morale for all things to follow the show which will help everyone out tremendously.

Monday, April 13, 2015

Week 13

This week and for the remainder until the senior show I as the AI Engineer am going through and waiting for bugs and problematic events that the AI creates. So one of the updates was a couple more modifier values that allowed the difficulty value to be more heavily controlled other than just choice modifiers. Some of these are maximum amount of actions per turn. This will allow the AI to be create their base as well as bombard the player less than normal. With three nuke silos, instead of one nuke each every two or three turns. Now you can limit that to as low as zero for some tutorial levels. This way you can almost control the max amount of damage an AI can inflict per turn. Although now this means the AI will nuke most likely if modifiers are slightly tweaked for it to follow through with a nuke two spots behind. This can impact similarly with a one to follow up. So just by reducing this it has other features that could be avoided. Also, added a modifier on the randomness of an angle the AI will choose.

The angle on the AI has some problematic occurrences when it is it has any. Since it calculates a perfect angle and than we add this similar to noise. We were trying to keep as many hand holding as possible for the AI, however with this noise there is a chance that it will land on the planet. Since increases the max noise angle, if the noise hits that max. If it happens from the backside of the planet, the angles are so close anything over 9 degrees it looks like seems to cause it to hit its planet. However it looks as if it was just going for a trick shot some of the time and barely hit. This is similar to how a players have acted so, it seems to happen on both sides as they get more used to the limitations of the explosions. Early players stay far from even going through their buildings which explosions do not occur on. As they learn that, they test their limitations and will sometimes blow up their nuke on their planet which does happen. This way they can get the quickest and most controlled shot to where they want. As we go through this with the AI a larger noise early and slim it down, it will blow itself up early, and it will tend to happen less and less.

If this causes problems and they don't want it to happen at all, we are just going to happen to through cases in where the noise can only be positive in certain locations and negatives in other. So the top of the right planet and the bottom of the left can be only negative noise. This will take it away from the planet. As the opposite the bottom of the right and top of the left can be positive noise. We can implement this if it occurs to be problematic before senior show. We are trying to test it to see how often it happens, and what specifically are the largest negatives it causes. It's not a change we are hoping for because it is hard set parameter and if the game largely changes this is something that will not be modular and would have to be re-created or taken out if large changes happen.

Sunday, April 5, 2015

Week 11 & 12

These past two weeks our team has been running full steam on getting ready for Beta tomorrow. As a team we are a bit nervous, but who wouldn't be our final year is coming to a close. Getting ready for these presentations that can help get those who are still looking get jobs. A new world is upon everyone some are ready some fear they are not, yet you have to take the step no matter what. So with all that we have for the AI been working on getting a better difficulty scale in. When I created the AI, I didn't for see the problems people have had facing it. I knew its targeting would be good, yet I didn't allow it to boost its own building in an effort to reduce its power turn to turn. I also, currently have the faction upgrades just shooting straight at the enemy and missing from time to time. As well it doesn't use perfect angles in order to go through and tries to avoid its own buildings which a nuke can go through. However even after all of these, testers have been saying that the difficulty average is 3-4 out of 5. We were hoping for our first release for the AI that it would be underwhelming and with additions after graduation would eventually have people able to choose. So we have added a couple tweaking methods back in. Originally I had a modifier in their the designers could use. With all the progression and rushes to get others in I briefly removed the feature, when we thought everything was quite balances. I also had a max actions per turn the AI could use. This was meant to be used in the early levels as we try to walk the player through getting progressively stronger. We took them out when we thought everything was good, however with some updates we have had to revert them back into the game in order to allow players to feel more comfortable and than start to walk them towards stronger AI. As we finalize the launching and actions, we will have to use these more and more in the earlier level. As a team we feel very confidante and believe we can also have a strong release after graduation.

Monday, March 23, 2015

Week 10

We are going for alpha this week, and while talking to other teams they feel super duper nervous about going for it this week. Our team on the other hand just feels super nervous, but at the same time we feel like we are in a good position overall on our goals. Although we made a lot of our original goals, we realized we wanted more once we got closer. So this stuff added to our alpha goal about last second, but were a lot more important than other goals. For example AI vs AI was something we didn't want at all and then we realized we really did need it not only want but need it in the game. This took a week out of updating to get it working and make sure everything worked appropriately and behaved correctly. So I personally feel very confident in our project in terms of alpha and feel we actually accomplished more than originally planned. So when people are nervous about our presentation I try to tell them not to be.

Sunday, March 15, 2015

Week 8 and 9

This week started with a bang, we have been debating AI vs AI for a while, whether we wanted it or not. The AI was set up to deal with and work on either side, besides for some specific launch actions. So we finally figured out for kiosk mode that it would be nice to just have two AI players go off. This will show off our game, and in a way we think players could be playing. As well its sort of a mirror early game which is a defined goal. However once action starts happening you can see where the goal orientation really comes into effect. They nuke different targets and locations, and they start to build upgrade and launch their specific upgrades as well. This makes me happy that the goal orientation really takes into effect, as I wanted it. A similar early game always, but the reaction to the other players nukes and moves works.

As well we are working more towards this play style, because it has showed us a few bugs that we haven't noticed when the player faces the AI, just some little unwanted effects nothing that was very game breaking. Still this week is finish the AI completely and putting in the final upgrade type which is a charge effect. Going to take it out the way its done now and make the faction upgrade pieces their own class with methods for casting. This way if one is a charge it will know when to use it and I won't need to create unnecessary checks. This will drastically increase performance, as well as extension later on. If we want to create a new type just add a class and the upgrade type will know what to do when casting.

Overall we are moving into a great spot, and we have overcame a couple bumps in the road from earlier which is really good for the teams morale. As well GDC and Pax East were the past couple weeks, which we took our game to. Whats good is we got a lot of amazing feedback as well as people really enjoyed the game. That was also a huge boost in morale, and exciting for our team. It really helped push towards a release at the end of the year and maybe continue it in spare time while we start our careers in this coming May.

Sunday, March 1, 2015

Week 7 Accidents and Bug Fixes

We have been working full throttle in order to get everything in ASAP, this has caused some unannounced, bugs as well as forgotten communication, which isn't good nor bad. We have come together today and spent a large deal of time going over everything that has been modified updated and than some foreseen, bugs. Both for myself with the AI and the other Alex, with overall game-states. First there has been some clamping on the angle modification for node by node, for all projectiles and each is different. For the Nuke, it causes very specific situations where it nukes itself. Although it is very hard to predict when or how often it is a "feature" that needs to be fixed and removed. I have played the game in speed mode about 50 times, and it has only happened approx 3-5 out of about 200 nukes. However one of those ended the game because it blew up it's own shield followed by a command center hit in the following turn from one of my nukes.

This also causes problems with the faction based upgrades to which I was not expecting or had the time to fix after everything else today. Their caps are extremely small which means instead of being able to be launched from any situation I will need to figure out a degree that can be launched and than based on what can be launched a degree of targets for each location. Therefore centers towards the other planet will be the best location to launch from and moving up and down reduces the amount of space's I could actually hit.

As well the upgrade for the radiation tower of the Ruskies faction is in. This is the current faction the AI has originally been designed for and swapping out for specific faction upgrades will be consolidate to new classes with specific functions. The radiation tower upgrade is a projectile you launch, but hope misses the enemy planet and shields, but you follow up with a nuke that hits it and causes a large explosion. So next week getting that to work is my overall goal followed by timed events, that have a charge. Since these are both similar turns later they will be best to be done in a generic way that the set-up is the same and by ending different upgrades in the future will be easy. For example just to add the Radiation drill to launch, was extremely easy. I just added the specific faction upgrade and the upgrade building function took care of the rest for me even when I wanted to launch it generically it took care of it. Where it launches the specific event I will need the check, so that it doesn't do a generic launch event. I have it set to a launch for generic's before they are added just for ease and most of the special upgrades are just launching events that can and will be used by both sides no matter who launched them so it is up to the prediction to figure it out.

Overall we have also come to a UI finalization after one more go at getting feedback. However testers are thoroughly confusing on their responses. They had a ton of complaints about one and said it would never work for x, y, z and more. Yet when asked which their favorite was they chose it. So it won't work and we can't use it, yet we want it in the game. From people who are looking forward to playing the game it seems weird to want something they know and can predict will not be useful at all.

As well this week has been dedicated to AI bugs and updates. I have gone through and found a lot of mistakes, by just watching the AI play those 50 or so games. None of them were actually game breaking, and were never noticed by testers in any of the last 15 or so testing sessions. This means personally, it was pretty efficient I feel but it could and is better. There were random times for example where it wouldn't fully use the resources, they were extremely weird and situational. The same side it would refuse to build buildings if certain chain effects happen. Although their wasn't any logical errors almost different checks. However if you blew up the buildings it caused no problems at all and rebuilt appropriately. The bug was actually if it built in a very specific order it would leave two building slots wide open. This was because it was accidentally being saved as full slots that read as a full empty slot. The check for all of the adding wasn't being caught and switching a couple orders fixed this bug. As well the upgrade bug was figuring that it could upgrade and wanted to, yet it chose not to which was a bit fishy, but of a similar problem. When it was upgrading one, it would sometimes believe that by doing one it did them all and said everything had an upgrade. Although it was also very situational and in 10 games played it could happen at random times or never at all. Sometimes you got all buildings upgraded and sometimes just the first one it chose to do. Even though each building type, and building itself was being checked by itself it had some weird problems with lists and set them all to true accidentally even when the check for if the building type. Happily though all of these were fixed today atleast in my testing. I will be having people running QA for our team watching for weird situations in the building and upgrades because since this all seems to be weird situations, even though I wrote it with what I thought no specific situations in mind and tried to keep it as abstract as Alex and I thought would be cohesive compared to coupling, it still needed certain weird situations where it broke just to fix itself. Remove the full empty slots, and the upgraded non-upgraded spots.

Sunday, February 22, 2015

Week 6 - Trick Shots

This week I went back into the Nuke launch system as well as spruce up the goal orientation. Originally with the original Path-builder it was safe to create nukes from a specific area of the planet. This week I went back at made it possible to nuke from any location and it will avoid shooting  itself and is ready. However due to the ability to only move the first three node and the remainder go in that direction there are some slots it can never hit. So in future weeks I will need to go back and have some checks based off of the angle the missile would need to go at launch time. So technically if the angle from initial launch to the desired location would be about Pi / 4 or 45 degrees it wouldn't be able to make it if its to the right side of the planet. However that's an estimate, of course I would write something to figure that out at run time if the nodes would change and it can figure out where it can hit. Also I added in the faction upgrades this week and set the goal for being able to use those actives. Specifically to get it tested I put in the Ruskie chrome upgrade. For two reasons, one it just takes one turn to use its upgrade, and second its the only one in the game atm, the others are being programmed and implemented this upcoming week or two.

It works very nice except for the fact it cost nothing. Therefore as long one chromium drill is upgrade to that, it will cast on that turn. This has two effects. One it can always cast this event. Since currently we want the AI to use up all resources and possible events so it ends with as close to no resources as possible. Eventually before it ends it turn, since the goal it will only be able to shoot straight. I will have a modifier that checks if it is in a spot that will even hit the enemy planet. This will decrease the automatic uses, however it will also make sure something get hits. Currently it will go through the enemy planet, since its a drill it makes sense.

So for this week a neat thing the AI can figure out is a shot that goes up over a couple buildings than comes back. On a plus once it hit the command center perfectly which it would have missed if it went straight for it because it would have collided with another building first. However most of the time, it still does it sometimes even when there are no buildings and because it has a slight offset, it has also come turned around and gone all the way to its on planet and blown up its own command center. So for this shot that it can select its 1 win and 1 loss for its own nuke. Of course for this to work, it has to select the target and launch from a very specific rotation where it figures out the amount of turns is the right amount. Although it is still very neat it figured this out without any specific type of ray casting at the moment. Since we have no rigid bodies or anything unity related tied to the objects they are not on the ray casting layer. In the upcoming weeks, I will need to find a way to raycast and only set its planet on it. Since nukes only blow up enemy buildings or either planet. Players can shoot nukes through their buildings. However this will also take some ray casting which I will create this week. It will allow for better shots in less turns. Thus being more accurate as well as taking one or more turns less in order to get to a location.

Sunday, February 15, 2015

Week 5 Fun with Nukes

This week I have had fun trying to figure out what we want to happen with nukes for the AI player. For now the main target is the command center and this week has a first pass on a new way to create nukes. Alex created a new method to create nukes paths overall to help with the transfer from mouse click to touch. The old method tended to work one way or the other and had problems switching back and forth. So I took this and developed a method on top. Initially missiles automatically shoot out a distance directly from the center of the planet. This way unless you try hard you can't nuke your planet accidentally on the first turn. You can turn it back, but that is a problem for another date. So, my method uses just a little bit of trig. Missiles have a launch distance that they go for each rotation and each rotation the planet moves one away. So when you check if a missile could hit you check with the adjacent 5 spots to the direction its rotating. So if its the left planet you search its left location 5 times.You check how many turns it would take going directly from the first place out to each location. You add one for the original launch which happens automatically by creating a nuke. if this number is within -1 to 1. Say it takes 3 turns and either and the location is either 2, 3, or 4 it will blow up. So if its 3 its 100% chance. 2 or 4 its put at 60% chance. You don't add perfect straight to location, that would be too predictable as well as easily countered. When it confirms which of those spots its going to nuke it figures out at each point the angle from the center of the spot to the last nuke location. It has a hypotenuse which is the full vector length, as well as an x so you can use cos^-1 to get the angle in radians, which our system uses. Than you have to add an offset so its not likely to fly straight at it, and add zig zag similar to a real player. This can cause it to miss, as well causing the enemy to have a hard time hitting one of their nukes into the computer players. This path on the first go is working well. As expected hits target about 60-70 percent of the time which is decent and not to high. However about 10% of the time it does seem to shoot of the screen for an unknown reason. We will be looking in this week to figure out if its a math or logic error. Or a weird new pathbuilder error. As well, we are looking to do a similar goal orientation for the enemy nuke selection as its building. This way it all works goal orientated which is how the game has been developed to be seen. The command center being the biggest object, both to explode and secure. We will than work our way down based on some small changes. This being how the AI wants to win. Starve the opponents resources, go for shield generators, kill all nuke paths etc. Each will have a multiplier to help decide and create AI that have a variety of goals in different games. This way they aren't too easily predicted game after game. These numbers can and will change in the midst of games if that Player changes his gameplay as well, but that is to be added in the much later stages. We are currently quite happy with the initial AI both for its nuking and its building and survivability. The last piece to be added is the boost resources which the intro AI won't do a hundred percent of the time. In the later and more difficult will use all resources to its advantage every turn.

Monday, February 9, 2015

Week 4

Moving towards this week the goal was to get the basic works for everything into the game. The AI now has total control over everything. As we move forward now I can focus on using a different Algorithm in order for the AI player to be a little less easy to guess. To get it all going I gave everything just and importance value and left the modifier alone at so it would not effect at all and I could check everything. This week I will push for getting the Computer to choose a building or building slot it wishes to nuke and figure out where it will be in the amount of turns a nuke will take to get to a location. Exactly how I will be going about this I am uncertain. For the first attempt, I will most likely be picking a spot than checking the following 4 and seeing how long each takes to get nuked. If the spots away is the same as the time, I would choose that location because it will collide quite well. However since we will want levels of perfection for the AI, I will also add a chance to pick the one before and after. As well as it won't use a perfect path at each section. So there is a chance it will miss, just like a player could miscalculate. After the Missiles are done, I will be sitting down with a designer and figuring out the importance values of every ability or action, and than modifiers in situations. This way they can also plan future events based off of what we have chosen. As well it will be made so the designers can go back in and change them when they want. Most likely to be loaded from an XML document that they can easily swap in and out for testing.

Sunday, February 1, 2015

Week 3

This week our team is getting ready to push for Greenlight presentation. On Monday we discussed during class what left was needed in order to achieve what we set for our Greenlight goal. For Greenlight you were to take what you had last semester and make changes and push for new concepts. In order to pass Greenlight you needed all these new features into the game in some shape or form, that would look reasonable. Our team chose to push for several; Tablet usage of the game was the first priority as its what we wanted the game to end on. Next we were moving away from the multiplayer basis of the game and creating a single player campaign. In order to move towards that we needed to have a faction system, level progression, and an AI implementation. So to show the designers needed to come up with the faction system, and I came up with a goal orientated AI implementation in the first few weeks which will get built farther upon in the semester. Later in the week when we had a basic form of everything we wanted I met with Alex and we went over changes in the next week. Since we believe we will pass Greenlight, we have pushed towards refactoring some of the Unity wrapper we are using. When Alex created the wrapper and system, it was built for player vs player and played on a pc. Since these are completly different from our new goals being single player and tablet, a lot of the organization of systems is no longer appropriate or reasonable to progress at a steady rate. We have already had some problems switching, and we have discussed many more. So this next week, we will start to get the system written for our new end goals. This will allow us to progress not only at a quicker rate, but our code will be much more legible.

Friday, January 23, 2015

Senior Production Week Two

This week we accomplished a lot during our Monday meeting and Wednesday meeting. We started to get ready to nail out some green light final details. So far the game has been built for multiplayer and so far that has been what is shown off. So since the game has been moved to tablet and that is the final end goal the decision for the single player has been the most important. We hammered out details about the map, as well as how a player will play through the campaign. This has been good and we have started to get ready to show it off. I personally am learning all of Alex's code and the level on top of Unity still. Since the game was built primarily for multiplayer, the code is as well. We are starting figuring out everything that will be added and needed before we refactor the code. This will allow us to plan for everything instead of changing it to change it again. Normally it wouldn't be a problem to just fix and update as needed. However we have a lot to add in such a short time. This means that we have to use every hour efficiently and going back to keep changing things is a waste of time. However we have started to get the single player in motion. The hardest part looking forward will be sending nukes. We have a nice system for the AI to plan which buildings it will create and which to upgrade. Those are based off values of importance then sent through to check which will be most necessary at that turn. For instance Chromium is needed more than Uranium for buildings, upgrades and nukes. So not only will it be higher on the list of importance. If they are about the same max amount the multiplier for Chromium will also be higher.This way the AI player will purchase a Chromium drill over a Uranium if those are the only two available. Of course if overall something comes out higher it will look and see what it can do and what it should do. We will have to work closely with designers to see how they feel the importance of nukes, chromium, uranium, and shields should be and work out balance as we move forward.

Friday, January 16, 2015

Senior Production Week one

Sadly my team didn't go forward semester, but I joined a great team WeLoveNuclearArmageddon and in this first week have gotten straight to work. I originally met with programmer Alex a couple days ago to start to look at how he encapsulated unity. As the group uses Unity as what is played the calling uses almost no Unity calls rather a layer on top of it that Alex wrote. With this I need to familiarize myself with the code and been meeting and fooling around within the project itself. This week I have fully tackled the event system and how to use specific calls. Some that send events just to its group and other that send to all active classes and object. This allows events to be sent for multiple reasons and have a couple reactions. As well we have just got the AI character to realize its his turn and end it. Now it has been started to move in the base AI class before we get into the factions having different weights and objects. Now looking forward in the week to come I want to start working with its decisions on buildings the locations and why. I am currently most excited to work with the missile targeting, which I believe will be a several week process. Overall I am very excited to get underway.