July 31, 2012

Top Down Shooter Update July

So to recap minor or less official updates I've removed the wheel scrolling spell concentration in favor of pre-defined sets and more upgrades. I've added stat tracking and a final level or end game. I've been doing a lot of balancing. There have been some graphical overhauls I'm now around 3 or 4 times better graphics from where they were without any increases in processing power or memory needed which I was hoping to reduce but I'll settle for breaking even. It's still not amazing graphics because I am trying to do massive mobs. I think you'll enjoy it though it's not bad looking.

Finally I've started working on the dungeon crawler part of it I'd thought about and played with for so long. I've started adding loot drops and random extensions on various levels. I've added an inventory system and a merchant you visit between levels. The same crystals you use for upgrades will be used as a form of currency. You'll have to buy and upgrade staffs for some spells to be unlocked like upgrading the fire spell to the lava spell. Staffs will be of certain types which determine some of the summoning spells you'll be able to use as you may need an earth type to summon Titan for example not that I have such a summon yet but I may in the future. I'll be working on adding more items and grades to keep things balanced. This next week or two I'll primarily be working on the upgrade system for equipment. It's likely you'll be using more of the crystals though I'm not sure yet if I want it available in the upgrade menu or at the merchant or both. I'm also not sure if I should put a cap on the upgrades to equipment considering I don't have caps on the other upgrades, it's a simple algorithm based simply on how many crystals are allocated.

Speaking of which the auto-allocation system got a  minor update adding a little more control. I also updated the mana system a little due to some issues caused by charging a spell in which it would stop generating mana. The concept for the charge spell is while it drains the existing mana first then relies on incoming mana it eventually hits a peak and stops drawing it's capped and the mana would start to fill the bar again. What would happen is the charge spell was still looping the drain mana as long as it was held even after it reached its cap. This was a minor problem because I do have a line of code to drain a small amount of mana to sustain the spell I just didn't set it up to transfer the remaining mana to the bar it was just getting dumped. All good now.

I also made the mana bomb non-automatic to avoid some cheating. Now it will auto fill over time and you'll have to manually release it. I also added a cool down on it to avoid spamming it through another cheat.

I also had a draft for a different update that I never posted so I'll include the details of that below.

The right click spell system is completely redone. For starters it now when clicked rapidly throws a small bomb type spell and if you hold it it now directs energy into a ball where it's being aimed and the explosion ring identifying how big the blast will be grows steadily. I removed the previous system for scrolling the mouse wheel to make lines and cones for your currently selected spell etc. The local  wave spell is still in effect which is similar to the held right click bomb spell though it's focused with the player as the epicenter. I have a new upgrade for the right click bomb section of spells for making their explosion larger based on how many enemies they kill and infecting any they damage. Infected enemies explode when killed damaging and infecting other enemies. The explosions from this don't hurt the player. I finished implementing those summoning spells and the stat tracking. I have a set number of levels and a special event for the final level 1000 with a unique boss and the spawn count of every enemy you've ever killed you now have to kill again to beat the game which can now be done. You can save and load progress which is autosaved every other level. I added 3 more spell types and 2 manipulators for all spells. Still no spell combining.

July 28, 2012

Dynamic Destruction

My eventual plans on destruction include terrain deformation, dynamic rule based destruction of ALL objects, and added into the rule set a kind of hierarchy stress system. Simply put if it's in the game and you shoot it it will break apart the only question being how much which will primarily be determined by velocity. More on projectiles in my next post.

My concept is that I'll be issuing a "type" to environmental objects that are given numbers based on their weight and how much weight they can sustain and overall mass which acts as a multiplier for each. Then including a top down addition of all weight to see if an object can hold it if not then it acts as a low level impact and the objects all start breaking apart to some degree. This is a far cry from some of the tech I've seen out there but sad truth is I simply don't have the skill to make the next red faction system. Though I must say that considering my mid-range talents it's not a bad concept. The great part about it being rule based is how easy it will be to update later not only tweaking what's already there but adding in new sets of rules. For example if I suddenly think of a way to add in stress or directional weight which I hope to. Why you may ask? because while an object may handle all the weight coming down on it directly it might fall over or if one side of it weighs too much and the weight isn't being calculated like it should. For in an example of this a building with half the base floor blown out is calculating the rest of the weight on the top floor then evenly distributing it among the remaining base floor evenly to see if it will stand when it should transfer most of the weight on one side to the first couple remaining pillars or more accurately most of the building weight in a steel frame structure should actually be focused on the center pillar/s. Other things to consider is that an entire building doesn't have to collapse sections of it can collapse on their own though in the existing plans this may already happen to some extent. Because it's top down each floor is calculating if it can hold what's above it, my next plan is to probably implement sectional calculations and weight distribution so that the top down is only calculated by relative location rather than as an entire floor. So while some weight will be transferred to the sections of the same floor around it most of the weight will go into the section below it. Still not as clean as it could be or as direct as directing the weight to specific supports but it should do nicely. Now that I think about it (and this is really more of a note to self situation) I could also make it so that sectional weight transference works from the outside in directing most of the weight to the central pillar which only calculates top down and doesn't spread outward...

By terrain deforming above what I meant was if you plant explosives on the ground you can make little pot holes big enough to crouch in or lay down in or if there's something beneath them then blow a hole in the ground and drop down into a subway tunnel to traverse the level.

One of my BIG hopes for the next iteration of consoles is multi screen output because I'd love to put in 4 player co-op but 4 players on one screen has always been a problem. I'd also like 4 player local competition but screen watching is equally annoying. I remember the first time I did a system link to play halo with my buddies and everybody found a way to bring an extra TV and some friends it was a small LAN party in my house. We used to do that almost every week at least once on the weekends and sadly those days are kinda gone. We still play all the time online but that's only because there's not much we can do locally anymore.  Do you remember the first time you did 4 player local? What game was it and would you be interested in seeing a return of local multiplayer?

 The Edit: In my previous post I mentioned this post, and turns out it didn't really need much revising just some spelling and continuity issues. Yes continuity, it doesn't make sense now but it would if you'd seen it. Anyway what the major update to the above system was the first implementation of the rule system. Right now it's under object interaction and it works surprisingly well I didn't think it would work so well I'd planned on switching it over to like the physics system alone, now I'm thinking the physics just might be an extension of it to handle weight transference and similar. With that in mind my estimated time for completing the system just dropped significantly here I thought it was going to take me a year or two now I'm thinking maybe by the new year or march before I have something launch ready. Not that I would launch anything by then but it's nice to know I'd have a milestone completed way ahead of schedule.

For those of you interested in the numbers. I went from tens of thousands of objects to a few hundred. I then when shooting at them managed to increase object count into the thousands rapidly without any lag. My fps were running smoothly between 42 and 46. The poly count during the object increase also increased by about 60% something I hope to reduce further. My memory usage compared to the previous method of instancing is now less than 16% of what it was, and I am still using instancing for common objects. To clarify I went from tons of bricks that were split in two into a solid wall and back but now the brick isn't split by default it splits as necessary. Right now it's only functioning on predefined environmental object types but that basically boils down to anything that's been labeled a building which works out nicely for me considering they're the focal point of what I want to destroy. Overall processing however went up from where it was something I was hoping wouldn't happen. The entire purpose of this method was to reduce memory and processing necessary right now I'm just trading off one for the other. Right now I'm thinking it's likely how much the poly count is increasing during the fracturing process. Perhaps I can reduce the poly increase and object increase for something a little more block like and see what happens.

A note on a prior post about the top down shooter spell concentration isn't gone. I've arranged it so that concentration is now in pre-defined sets. The cone, the line, the immediate area, the ball, and a larger area effect spell. The right click now makes a charge shot for each that is quite powerful and does more damage the longer you charge. The left click is still stream and does constant damage. You can increase the power of the stream from the upgrade menu. I'll talk more in my next post on the subject.

July 25, 2012

Found It

I was looking around the larger game realizing I made all this content, the entire city, every building and every street. Then I realized based on the missions that the players would likely only ever visit less than 1/3 of the city unless they actually felt like exploring. Well I just can't have that, you need to be taken by the hand and shown every amazing part of this city or at least most of it. So now I'm working up those side missions we all love. Nothing storyline critical where you have to complete it, but when it's done you'll have all the filler you could hope for hopefully. This will also be nice to compare city destruction later on. To see who destroyed what and to what extent is always fun. If you have no idea what I'm talking about I have a follow up post on the rule based dynamic destruction system which I'll post sometime this week, it's already written but I'm going to revise it probably because I just finished a major update to it.

July 16, 2012

Free Movement Update

One of my goals for my main title was to include a method for advanced movements you don't normally see in an fps. I'm finally finished with the major work and now only have tweaking left to do freeing me up for my next major overhaul of a key feature, really the selling point. First though I'll cover some detail of the movement.

The basic idea is to include natural feeling magnetism on edges of doors and objects of a height in which you might logically seek shelter behind in a firefight. This was accomplished fairly quickly for a basic result but getting it into a natural state that's easy to automatically get into and out of was the tricky part. Then there's manipulation of that state for using grenades or abilities, items, weapons, etc which was vaguely similar in nature. Then I built on it for grabbing hold of ledges and moving along them for example jumping up to a window and pulling yourself up or grabbing the edge of a building as you're falling then moving over to an escape ladder, as well as jumping between these ledges. Basically bringing a little free roaming to fps. Then I went from thinking free roaming to free running and started working on the system for running up walls to get to ledges, jumping off a wall while running up it bouncing between to close walls, etc. I also for little kicks threw in the ability to do standing and crouched running which wasn't a bad add on if I do say so myself. The difficult part of adding on to that though was sliding and kicks while sliding and rolling then making it easy instead of overly complicated. In the end most of it is automated and based on timing of button presses. For example, using an xbox controller, tapping A jumps while holding it runs vs holding it while moving sideways for a sideways roll. Once you begin a run you can stop holding A and you will continue to run as long as you hold the left stick in the direction you want to run. While running you can click the left thumb stick to go between standing and crouching or click and hold to go into a slide. While running you can also tap or hold A to jump or roll forward. While sliding if you come into contact with another player you'll just automatically kick seeing as it just works out better that way than leaving it up to the player. While hanging from a ledge you can pull yourself up slightly or completely to peek over the edge or climb into it, useful for surveying a room before infiltrating. If you run into a wall you'll automatically run up it if you tap A while running against a wall you'll jump off it or if you're already in air from another jump and you're near a wall you'll kick off it. If you run up a wall and come within arms reach of a ledge you'll automatically grab hold of it. All of these are conditional on the fact that you're not currently taking damage and if you are then you'll instead automatically take cover against the wall. Which you would also do if you walked into it. As you see there were a lot of details to work over, and you'll likely hardly ever notice any of them in the final game...

The next overhaul is to the destructible objects. Right now I've been relying heavily on instances of fractured mesh objects to create my buildings and make them destructible. However it's extremely resource intensive and generally not conducive to what I had in mind for the game. Thus I'm now working heavily on creating a dynamically fracturing rule based event system to destroy objects. More simply having a solid object break apart as it's supposed to based on how it's supposed to determined by what two things are impacting at a time instead of breaking them apart in advance and having them just sit together loosely until they're pushed apart which is basically what the current system is. The new system will be implemented probably as just code making it infinitely easier and faster to work with. That having been said I must get back to work these things don't just make themselves... or do they? More details on the destruction system plans in my next post.