Multiple Weapon Types

 Posted by Paul Thomas  Blogs  Comments Off
Oct 242011
 

I decided to give myself a break from web-based development/programming to get back to game programming. I use to provide web-development services under subcontracting but I got out of it roughly four years ago due to my lack of passion for web-development. The passion was slowly destroyed by my passion to make and program games.

Beretta 92FS

Beretta 92FS - Facing the sky for better lighting in this dark test map

It’s time to go back to the weapons and tackle a problem I honestly didn’t predict like I should have but I was so concentrated in all the mechanics before going right into producing another promotional video/demo that I simply didn’t have the time to predict this potential problem. Multiple weapon types or styles.

Functionality is extremely similar between all weapons, it’s only the small details that have to change, such as a semi-auto fire mode only for pistols instead of fully automatic like a rifle. However, there is one huge difference between even a pistol and a rifle. The arms, hands, and their positioning. Drastic differences. For first person view this isn’t much of a problem since each weapon can define it’s own animation sets but third person is a different story. You don’t change the player just because they changed a weapon.

The way I’m going about this so far is just by swapping out the Pawn animation sets based on the weapons style (Pistol, Rifle, Submachine, Lightmachine, SniperRifle, Shotgun, and Melee) and may possibly even swap animation tree’s for more flexibility. I have this swap taking place immediately when the weapon is replaced (usually through equipping and unequipping). There are still tests that need to be done to ensure this method works properly without further improvement but I have my plans set to a different task at the moment.

Beretta 92FS Third Person

Beretta 92FS Third Person

Beretta 92FS Third Person Aiming

Beretta 92FS Third Person Aiming

This issue I didn’t notice until I started adding the new Beretta 92FS and it had it’s own set of animations (including it’s own animation set for organization purposes and what proposed the weapon type/style changes discussed above). There are/were several mechanics that relied on timing before performing another action. An example would be firing the weapon and then returning to weapon idle (weapon idle is “injected” so no matter what type of idle; walking, iron-sight aiming, etc., going back to idle works perfectly fine). It technically needs to wait until the end of the firing animation before going back to idle or you’ll notice a hiccup or snap when switching animations.

My overall plan is to eliminate timers all together (except for a few that rely on timers, such as reloading, or equipping weapons) and rely on a few things. In place of “SetTimer” I use instead “AddDelayedAction(AnimationName, FunctionName).” This custom function simply works with a dynamic array which is then used within the “OnAnimEnd” event and then triggers the correct action based on what animation has ended. This makes these delayed types of actions reliable since they are executed at the correct time and it’s no longer guessed with timers.

No more time to blog now, I have to get this weapon class rewritten, because there is more I have to do than what I’ve explained, but the hardest part is finished (the overall planning on how to eliminate this situation).

 

Finished and an Update

 Posted by Paul Thomas  Blogs  Comments Off
Oct 212011
 

I just finished moving all the older blogs over to this new system, which had taken me most of the night and most of this morning. I didn’t want to simply move the blogs but also move the images to this system so when I decided to destroy the other website the images wouldn’t go with them and basically ruin the blog posts here.

The last blog post was on September 2nd, which from then until now, the framework/game has had a lot of edits and progress. I skipped from adding the blog post over here because it was a couple simple posts about Hurricane Irene, and that the blog was temporarily at a halt. The reason for the increase progress speed was to get everything ready for the second promotional video. With that finished, the next deadline a couple months away, there is more time again. I will start blogging more about progress, plans, and so forth.

I believe a new video is in order which will demonstrate multiple mechanics that have been developed so far. Once I have the time to make the video I’ll update this blog post with the video. Uploaded and now shown below. At the moment I’m still slightly stuck in web development mode and desperately would like to get back to game programming.

A lot of new features coming up due to Jamie’s hard work, such as the upcoming Beretta 92FS, multiple new animations for first person and third person, and animation edits all around. All of that is coming up within the next week. In the next progress or planning blog post I’ll mention any mechanics that haven’t been blogged and explain them without going into major detail.

Development Blogs

 Posted by Paul Thomas  Blogs  Comments Off
Oct 202011
 

We’ve now settled into our new home, finally finished this website enough to be some-what presentable, and now it’s time to post our first development blog. I use to blog at another website about development progress on R.A.T.S. because I felt the need to blog (to basically put my thoughts down) and we had plans to do this but hadn’t started yet at the time. Well, now I get to start blogging again, and at the correct location for the topic. This is much better.

Well, I’ll start from the beginning. My name is Paul, as you’ll notice from the author information, and I’m the Lead Programmer for R.A.T.S./Magic Stone Studios, LLC. I’ve been programming for a total of thirteen years, from web-based to software based, and nothing is more visually rewarding than game programming. Especially for people like me whom have grown with games since the Atari. It’s my job here to build R.A.T.S. from the ground-up and that’s what I’ve been doing.

Most people don’t know, or wouldn’t even notice, but directly after E3 I had started the R.A.T.S. project from scratch. Jamie (owner of Magic Stone Studios and R.A.T.S.) had been on the project by himself for roughly three years before I joined. My first task was to prepare a demo for E3 and we had two-and-a-half weeks to do just that. I had extended the Unreal Tournament 3 framework to save time and that isn’t exactly ideal for a final product. Therefore, after E3, I began creating the new framework, and planned around multiple features that we would need (not only for R.A.T.S. but for future projects as well). After almost a month into the process I had started blogging the progress.

And that’s the brief history. Time to begin blogging.

 

Artificial …Intelligence?

 Posted by Paul Thomas  Blogs  Comments Off
Aug 262011
 

I had decided to put weapons down for the moment, along with third person, and additional third person camera edits, to begin on multiple things. First, artificial intelligence. Which basically means AI behavior, navigation mesh based path-finding, and in turn begin working on how AI is added to a level.

Before I’d address how AI is added to a level (as of right now I simply drag-n-drop the AI into the map) I should at least get some AI tests going and the classes started. That’s what I’ve been spending the past couple hours on, as well as, refreshing my memory with all the available functions, events, states, etc., within the dozens of provided classes.

This screen-shot shows some of the process and this AI is simply trying to find a path to the target, which is basically always me. If it cannot reach it’s target directly then it uses the “NavigationHandle,” “NavMeshPath_Toward,” and “NavMeshGoal_At.” Returns true if it can find a path to the target and processes the move (using “MoveTo”).

AI: Path-Finding

AI: Path-Finding

AI: Path-Finding 2

AI: Path-Finding 2

This is all fine and dandy but isn’t exactly the type of “intelligence” we’re looking for in this game. Sure, AI will eventually have to do this, but there are multiple “behaviors” that need to be established. Not to mention attacking the player and anyone associated with the player.

In order to do that we have to go beyond just AI and work with our “GameInfo” classes, establish teams, possibly character profiles, squads and so on.

I’m thinking of posting a video going to the extreme, instead of a single bot chasing me, using multiple bots. My problem with taking video (besides the fact that I didn’t realize until later I had all sound disabled instead of just my mic, which I’ll use eventually) is the conversion. It just absolutely kills the quality and if I try to keep as much quality as possible I would have to upload a 90+ mb video.

On towards more work.

Weapons: Dynamic Crosshair

 Posted by Paul Thomas  Blogs  Comments Off
Aug 232011
 

Today I worked more on the weapon cross-hairs. Overall there is more work to be done but how everything is working right now isn’t bad. The hardest part is trying to work with the bullet spread value, convert that to pixels for flash, and then try to match those together. I guess it doesn’t have to be extremely accurate but close enough should work just fine. At the moment it falls under the “almost close enough” category.

Dynamic Crosshairs

Dynamic Crosshairs

Dynamic Crosshairs: Spread

Dynamic Crosshairs: Spread

After this I need to move on, I’ve already sidetracked myself doing these cross-hairs but I also considered them “normal mechanics,” at least enough to convince myself that it’s standard mechanics and belongs into the framework by default.

A few blogs back I talked about using a different way of performing the aiming trace from the weapon to it’s range. It was to increase accuracy and allow us to manipulate the weapon in any way and the aiming would change automatically. Well today I realized that it had another benefit that I didn’t see until now.

Due to how everything works, accuracy with range is varied, between all weapons. If you were to “sight” your weapon for medium-range, then long-range would be inaccurate for the cross-hairs. Not by much but technically a realistic amount. One day I’ll have to demonstrate this but for now I think it’s cool. It means we can allow players to adjust their weapons sights for specific ranges.

Figured I’d post a screen-shot along with a short video that is shown below.

Right now the cross-hairs only move when shooting or moving your mouse. I still need to add when you sprint, jump, and more importantly, walk. The plan is to have the cross-hairs disappear when they cannot be used, such as when jumping, sprinting, reloading, and when using iron-sights.

I’ll be working on that once again when Jamie returns to help out with the Scaleform.