Tuesday, June 14, 2016

A New Endeavor... 

The only reason I started this project was because I've never finished any project I've started – at least not any games, custom maps, artwork, programming projects, game mods, writing endeavors, tutorials, youtube channels, or competitive gaming endeavors. Basically I'm a failure at finishing projects centered around technology. I'm pretty good at playing guitar though, so I got that going for me...which is nice.

I want to first thank my friend Eric (SpawnZ) for providing me with a lot of help with simple tasks that I, for some reason, just couldn't wrap my head around. I want to thank him for staying up til 6 in the morning offering help despite how hard our brains were screaming at us to get some sleep. I couldn't have even started this project without the help he offered.

At the time I'm writing this, my project doesn't really have a name, and in the 2 days I've worked on it has already gone through a complete reboot, going from a Rocket League type game played with tanks and guns, to a more competitively designed BZ Flag inspired game. Yes, I said BZ Flag inspired competitive game. The design document I've written for the game – or should I say the design document I am writing – won't be released until the game is released. It's going to be my own little Doom Bible, revealing the many design secrets and many iterations and changes only after people experience the final product.

This little journal, or perhaps blog, will document my day to day workings on the game. With my track record of working on projects you can healthily assume the beginning will feature daily updates, that will later on fade to every few days, or maybe weekly. I don't think it's fair to say this will be completely due to my lack of motivation as a project goes on, but the fact that as you get further into development you seem to have less meaningful stories because you've learned a lot already, and you're familiar with the framework of your game – but I hope to make up for that with some tips and helpful articles showcasing some stuff I've learned that made my life easier.

This preamble may change in the upcoming days or weeks, but for now I'm happy with that introduction. I'll now start writing the first entry. Included will be screenshots, snippets of code both for helping others and for others to critique me (I've never programmed in C# prior to using Unity, although I know C++ pretty well, so I'm not new to programming). Enjoy.
 
 _____

Sunday, June 12, 2016



      Ahem... Needless to say, this title screen now needs reworked. The game is no longer inspired by Rocket League but is inspired by BZ Flag. The pinnacle of early 90's tank warfare! The title screen was actually inspired by another early 90's title, some people may have heard of it, and if you're as big a fanboy as I am you already know what's coming – DOOM. I love the artwork in Doom, always have and always will. The pixelated title screens and splash screens in that game are seered into my skull like a white hot shotgun slug peircing the flesh of a Cyberdemon. If you pay really close attention, you'll notice that the image behind the text "Tank Ball" doesn't relate at all to the design of the game, a conscious design choice like I said to make the title resemble those early 90's feels. The rest of the game takes on a different aesthetic, but it's by no means the Crysis 2 of tank shooters. I want to still maintain a dirty grungy arcade looking game. Or maybe not who knows I'm not good at making decisions. 
 
     As of now, day 3 of development, I've implemented the following mechanics into the game:

1. Driving forward, turning left and right
2. The turret on the tank rotates with the mouse to do fine adjustments in aim
3. The minimalistic UI interface
4. You can fire shells from the tank at the orientation of the turret

I'll go into these features a bit more in depth for anyone who enjoys the technical side of things like I do!

1. The movement mechanics are pretty basic, but there are a few design choices I chose to make "unrealistic" to improve gameplay. The first is the "slippery" feeling of movement. This actually started as a bug, but in driving around and trying to shoot towards various objects in the world, it makes for much more fun, and hopefully challenging gameplay. The tank has a fair bit of momentum due to its mass and drag settings, and this also means it takes quite a bit of force on the rigid body to get the tank to move. After acheiving full speed, you can definitely feel like a bar of soap when you do a 180 to shoot at something behind you. It's very fun and I can only imagine it becoming more fun with other players on the map and shells flying all over the place. The next conscious design feature is unrealistic, when you consider how a tank moves. Each tread rolls individually, and they roll in opposite directions to turn either left or right, so when you are in reverse you would expect the tank to turn in the opposite direction as when you're going forward (imagine you're driving a car and turn left, then go in reverse and turn the wheel left, your car pivots and faces more to the right). I actually chose to keep this opposite, because when you're driving forward and go to turn a 180 you run into some confusing controls that dont feel as fluid, same with going backward. I may end up including a gif or small video showing this more clearly to help the explanation. For now just know that I designed this game with the players in mind because I'm a good guy like that – steam greenlight plz. The rest of the movement is straight forward, you can drive forward and back, and turn with A and D.

2. My biggest grip with BZ Flag is that aiming is really hard to do with the keyboard, just like any first person or third person style game. Think how bad it is to play Doom with a keyboard! The solution I had was to make driving the tanks more like how you see them implemented in modern military shooters, where you control the turret separately from the body of the tank. This was simple to achieve as well, all I did was model the tank and the top turret separately, and parent the turret to the tank. A little bit of fiddling with the scripts made it so you can rotate everything with the keys A and D, and the fine tune the turret's rotation with the mouse. This rotation is confined to the Y axis, so you can't look up or down. This could be changed in the future, and would have been necessary for shooting at a ball that's flying all around, but for a deathmatch type game I like the idea that you have to be quicker than your opponnent and move around the map carefully to avoid being seen and shot first, rather than being able to camp in the back and shoot in 3 dimensions at any target you see. Considering the quick movement this also will make it less impossible to hit targets if everyone is confined to one axis most of the time. There are ramps and platforms so that you can move up and down, and jump through the air, but it's only for a tiny amount of time compared to how often you're on the ground.

3. I love a small non cluttered UI. Doom is even pushing the limit for me. I know it was a design choice to make the portion of the screen needing to be updated smaller, but still. It's a big gray bar of text and it's MEH. My solution is to have 3 simple panels, all transluscent, in the farthest parts of the screenspace to make it provide as little distraction as possible. All you're going to see is the current weapon you have, either the default shells or one of the power ups. This is also where your power up timer will count down. Next you'll see your stats in the match, how many kills and deaths you have. At the top of the screen will be a round timer/game timer, and depending on what game type you're playing it may show the team score (for games like CTF or TDM or KoTH). There is no crosshair, it's awkward implementing a crosshair in 3rd person games especially if your aim is limited to a single axis. This may make it difficult to aim, but the solution is ripped right from Doom – make the viewmodel centered. In Doom you aim by lining up the barrel of your gun with the target, or by firing the BFG somewhere that way. The tank turret is centered, so you can either take an extra second and turn the whole tank toward the enemy and line it up perfectly, or you can learn the subtle movements needed to rotate the turret in the correct orientation to get those fade away YY ladder stall no scope 360's for extra illuminati points.

4. The final mechanic to be showcased in this entry is my sexy shoot script. This is done via instantiation of a shell prefab. The prefab is instantiated in the correct orientation by getting the forward vector of the turret, which is updated every frame to always be where the turret is rotated. The instantiated shell then has a script attached to it which will add a force to it's rigid body, sending it off in a straight line where the turret was aimed. This means you can fire-and-forget the shell, leaving it to travel while you line up your next shot. The shell also has a timer, that counts up based on the delta time of each frame, and when it gets to something like 5 seconds, the shell will dissapear if it hasn't hit anything first. This will eventually be replaced with a mid air explosion.

These mechanics need to be fine tuned of course, nothing is final. For example, the shoot script will incorporate a minor amount of bullet drop, as long as it doesnt hurt gameplay, that way there will be a range to your weapons – and certain power ups will increase that range.

If I have anything to add before I publish this post I will, but for now that's a good bit of information about what I'm working on. I'm excited about this project and I really hope to keep working on it, future updates will include more screenshots, more information on what I'm working on that particular day or week and any challenges or solutions I've come across. I hope to also implement short video clips or gifs to the articles to make it more appealing. Thank you.

No comments:

Post a Comment