Tuesday, June 14, 2016

 Updates, Discussion, and a Tutorial!

Tuesday, June 14, 2016

I had a well deserved day off on Monday – at least that's what I'm telling myself to keep from seeming lazy. During that day off I actually did a bunch of stuff around the house to help out the family, but it was a needed break from programming and tweaking public floats in Unity to get things how I want them. A few things I added on Sunday after writing the previous article:

- Power Speed powerup no works with a time limit
- I added a dodge mechanic, a little sidewards boost
- Some movement variables were tweaked making the speed boost not so OP, by reducing normal move speed a bit, and also making movement less "slippery" feeling by increasing drag.
- Added a (temporary?) grass material to get an idea of art style

The point of this article is going to focus on the art direction I'm taking mainly, although as I get some more work done I may branch out and talk about some other things but who knows. The art style I've gone with is going to be pretty standard pixelated "old school" textures. I like the way they look, but also I think not using pretty HD textures sort of aleviates any pressures of having a super polished game. That might sound like I'm taking the easy way out, but let's face it here I'm no pro modeler or texture artist, I need all the leverage I can get. Also these kind of graphics still stand up and give the player a sense of nostalgia, and I want to stress that the biggest reason I chose to go with this style is just because it fuckin' looks good. I mean who doesn't love the look of epic low res grass? <insert grass picture> So I'm going to get started creating a brown dirty metal camo looking texture in photoshop and sort of walk you guys through how I'm making it, on the off chance I help anyone out. I'm no good with photoshop, but filters are powerful tools, especially for lower res video game texture artwork. Let's see what I can come up with! 


It's not the best looking thing I've ever seen, but it works! I doubt you'll see this in the final game, unless I'm really lazy, which is actually pretty likely. So. Yeah maybe you'll see this in the final game. Regardless, let me show you what I did to get the effect so maybe someone can take my failed attempt and make it work – just like Edison said, "I didn't fail, I just discovered how not to do it!"
I started by deleting the background layer, nobody wants that shit. I filled the screen with brown and used the difference cloud filter to get some kinda texture down on the canvas, you can really do it with any color since you'll be fine tuning the color with image>adjustments>hue and saturation (check the "colorize" box).
<hue/saturation screenshot>

Next we need some more "grit" on the image to make ower magic "convert to epic pixels" filter to be more pronounced and to add a bit more depth to the image. For this we just simply add noise, not too much, but make sure you can see it fairly well as it will not appear like noise spots anymore after our next filter. Somewhere between 2 and 4 percent should be plenty.

Our next filter pass is my favorite effect in photoshop – crystallize. It takes your image, chops it into a zillion little sections of various orientations and it makes your image look like it's straight out a cartoon. It's useful for achieving the effect of a sort of camo pattern since it has little splotches within your image's color spectrum. Set the crystallize parameter to around 6 or 7, you dont want these to be too large because the texture will end up being stretched in-game to achieve an even more retro pixelated look! It should look like this:


Our last filter pass for this layer of the image will be a mosaic filter. This just basically makes your image look like it was taken with a camera that has a resolution of 10 pixels. So basically don't use this filter unless you're deliberately trying to make your image look like garbage. I happen to love that look. Set the parameter to 4 or 5, and watch your image step back in time right to the late 80's! People say HD textures now days look good, but how much more detailed can you really get than seeing individual pixels? 


Almost done! Now we just need a bit of color depth variation. This is easy, create a new layer and make sure the background is transparent. Grab a uniquely shaped brush from the brush presets and select a dark green color and put 5 or 6 single clicks around the image, do the same with one more color like tan. Use your critical thinking skills to place the splotches spaced out around the image a bit. My second favorite filter, gaussian blur does a good job at taking these blotches and spreading them out a bit, do this to taste, and you can duplicate this layer a few times to get a desired intensity of color. I would run one more mosaic filter over this layer with the same settings as you did for the previous layer, to make the pixelation line up and look nice, and you're done! Now you have something that looks like this: 


Just to give you an idea of how simple it is to apply these techniques to other images you have made to achieve that awesome pixelated low-res texture without even being remotely good at pixel art, here's a metal texture I made for the barrel of the tank/treads, literally in like 30 seconds. I just applied a fibers filter to the image, desaturated it to make it black and white, darkened it a little in the same step, and added the mosaic filter. Straight outta Doom'pton!

So if that helped anyone (doubt it) you're welcome. I'm trying to share as much of my experience with this game as possible, and I'm not so good at remembering to screenshot/record things and remember things as I'm doing them, but hopefully I'll get better at it as I go on. I think that does it for today, I may end up expanding this greatly because as I'm writing this it's only 10:30 in the morning, and I have the rest of the day more or less to get stuff done with the game. I'll try to get another few paragraphs of updates into this article at the end of the night, as well as a brief list of things I want to get done. Spoiler alert: I want to have a playable deathmatch by the end of the week, or earlier – complete with bots! Thanks for reading!

BONUS MATERIAL :D

It's now 2:59 in the afternoon and I've gotten a few more things implemented into the game. The most exciting thing is now when you shoot at another tank, it turns into a pile of rubble and starts smoking via particle effects! You can drive into the pile of rubble and push it around a bit, which I might actually leave as a mechanic for certain game modes as a way to block off paths or slow enemy tanks from reaching a certain area...not sure. I'm going to make an effor to slow down development – not the development of the game as a whole but the development of these shooty-killy mechanics, I'm implementing them sort of quickly and with my goal for this being a multiplayer game, I don't want to overlook anything that may make it harder to start networking later on. So I'm going to take a break from those mechanics and start focusing on re-modelling and finishing some more texture work to get the visuals where I'd like them to be. This way I have a solid foundation for at least howI want the player deaths to function. I'll also need to implement some basic AI in order to test the gameplay mechanics and make sure the player dying and respawning works well. I don't want to feel overwhelmed so I think I'm going to just focus on basic deathmatch for now, with the most basic set of mechanics to have the game function...so movement, shooting, all power ups and weapon pickups, score system, round timer, win/lose/max score reached type of thing...which shouldn't be difficult at all seeing as I've implemented at least one of all those things at one time or another in a piece of code within the game. This update seems kind of boring, not a lot of technical details and most of it was filled with a poor excuse of a photoshop tutorial, but writing this helps me clear my mind and defrag it, so I hope the read was enjoyable anyway. The next article should be much more in depth with some video footage because I'm on the verge of getting all power ups and weapons into the game, as well as some better looking models and artwork...I hope! Thanks for reading.


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.

Friday, April 10, 2015

Text Adventure Source Code Release

Well...the movement engine at least...

So this is a big day, my first release! Too bad it's garbage. So this is a link to download a text file containing the source code I wrote from scratch for a simple program in C++ that sort of kind of represents my first attempt at a text adventure. It's nothing special, it just handles movement and basic error checking in terms of user input. I also changed the colors of the application.

I made this in like 3 days after learning like very basic C++, I will probably continue development on a text game as it's one of my goals, but I'll be completely rebuilding the engine and focusing it on more objective code rather than gathering user input and checking it via if-else statements. If anything it's a nice bit of code that I think is pretty cleanly written, it showcases my problem solving (no google here folks) process, which is mainly why it's very basic and no advanced methods are used for anything. If you're learning C++ and you want to know how to use and call functions correctly and how to check user input and you need to know a bit about variable types and when to use them, this source code could be a bit of help to you, it's very short and very easy to read, especially when placed in your IDE of choice with C++ syntax highlighting (I recommend Code::Blocks). The source code will compile on any Windows machine (hasn't been tested on other platforms) so enjoy!

Wednesday, April 8, 2015

POUNDCAKE-Gamer (A PC Gamer rip-off) Just Launched

If you're interested in seeing content like PC Gamer posts (you know, gaming articles with general info on whatever) head on over to http://www.poundcakegamer.blogspot.com/ and follow.

I've always wanted to write articles about various gaming topics (mainly focused on competitive gaming, Counter-Strike stuff you know?) and new tech and what I think about it, also any intense gaming news like when DOOM is released, so I thought I'd start one small and see if people like what I write.

So, as it says in the description on the blog page, keep in mind I'm the only "editor" at the moment, so the articles will cover a variety of topics, but they will come out in "lumps" of what I'm currently most interested in when I write them. So right now I'm re-designing de_nuke in Counter-Strike: Global Offensive so a lot of the articles will be about whats going on in the world of CS and my thoughts on this and that, get it? Good. 

I hope you like the articles, I'll write whenever I feel like it so probably 3 or 4 articles a week depending on my free time. 

PlatforVania...

Have you ever wondered what it would be like if Castlevania was actually designed to be Konami's answer to Super Mario Bros.? Wonder no more.

Since re-creating all the mechanics of Castlevania is going to take a little bit of time for a guy like me with not too much free time, and since I'm still working on FishScape (don't worry I promise I am), I decided to make this project as well. Three projects at once. Like a threesome of the gods.



I'm only designing this as a promotional tool really, shameless, shameless, shameless. So it's just going to be one tilesheet for the backgrounds, one floor object as the platforms, etc. No shooting or anything else, just a platformer.

You're probably making fun of me (and you should be I suck) but my dream game is a platformer, like Super Mario Bros. on Super NES, but with no enemies or nothing, just relaxing jumping button mashing awesomeness. So in a way, releasing this game in the next day or so will be my ultimate game development achievement. (sarcasm intensifies). 

Enjoy it for what it is when it's released, both a game I find fun as heck to play and waste time in, stress relieving even, and a shameless deceptively simple product release to promote my godlike projects.

P.S. I'm going to do a little writeup about how this project idea came about, obviously it was sparked by the fact that I'm doing Castlevania, but I want to discuss the specifics of how I thought of this idea and why I'm releasing it and whatnot.

Monday, April 6, 2015

CASTLEVANIA

Arguably one of the hardest game series ever releasead on the NES was none other than Castlevania. I was turned on to this title during the later years with the Nintendo64 version, which I really enjoyed but I don't remember being that difficult. Then I played the original, and while I hear Simon's Quest (Castlevania II) is much harder, I have to give it to the first one for having its fair share of challenge. While taking a minor break from my large cumbersome FishScape game, I decided to essentially reboot Castlevania so it's playable on the PC. You can download emulators and all that but why go through the trouble of remapping keys and finding the ROM when you can just have a shareware copy made by me! Pretty sweet right?

Okay so here's what I whipped up today in about 30 minutes, simple platformer engine with jumping and movement, pixel perfect collisions, 30fps for that classic shitty feel! As always, the sprites and images are credited to where I got them in-game, so none of this aside the programming is my own work. I would have polished the level design a bit more but I just wanted something to show off real quick to generate some hype before I go to work... enjoy it.



So there you have it. I imagine I could have this whole thing released in a couple weeks (that long just because I have to rip and add the graphics and then re-create all the levels more or less exact), but if someone wants to see a nice feeling, playable PC version of Castlevania but with unique levels, maybe more levels, more enemies, enemies from different games....this isn't for profit so whatever you guys want to see I could throw in I guess. I'd like to keep it fairly focused and on topic, I don't want a Simon Belmont meets Pokemon mashup or anything like that. So let me know what you'd like to see.

Wednesday, April 1, 2015

How do I even?

How do I even? What is a Game REALLY?

I've been making games for actually quite a while. Never finished a single one, mainly because I just did it as a hobby, never thought I'd pursue a career in it. Over the years, and in particular over the past couple months I've fine tuned my sense of what makes a game, how a game works, and what a game actually is. How did I do this? I learned C++ and made a ridiculously shitty text-based RPG.

I'll make a commentary video featuring some live coding and discussion in more detail about what I mean, but I want to get this down on paper (...I mean on screen...) before I lose track of what I'm feeling right now.

What is a game?

A video game, no matter the genre, is just a bunch of math. That's all it is. It's a series of droning lines of code that basically compare a few values and output another value. Then that value tells something to happen or not happen - whether that be compare other values, draw something to the screen, whatever. It's just math logic.

If you can get your head around that, you can start to tackle game programming. Game design is a different topic, because design incorporates the graphical user interface aspect of the game, or the storyline (as in a text-based game). How the game works, however, is what I'm talking about, from a programming point of view.

How does a game work?

At heart, a game has NOTHING to do with sprites, graphics, 3d models, worlds, terrain, colors, none of that stuff. At the heart of a game, what you're actually doing is pressing a button or clicking something - providing a user input - and then the program does some fancy math and generates an output which causes something to happen.

Art is just something for the player to look at. When you think about it like this, it's easy to understand how people can say, "Graphics don't make a game, gameplay does.". That's 100% correct, and it's this mindset that has allowed me to continue working on projects such as FishScape even though they may look bad - the graphics might leave a bit to be desired, but none of that shit matters! The programming and functionality is still there, I can change the graphics any time I want!

What does it mean?

As I'm writing this, I kinda don't know what the hell I'm writing this for. I feel like it's important though... Look, if you're wondering about how you go about making games, or how you program, just remember that you're in complete control of the project. You're the programmer. You decide what happens, why it happens, when it happens, and how it happens.

I used to be sucked into the black hole of "meh this isn't going to be a good game" because I was always focused on creating a perfect project from the beginning. The beauty of game design is that you can improve your design whenever you want to, so no matter how bad you THINK your project is, just finish the damn thing. You'll be more proud of it at the end than you think, and then you can go back and rebuild it, port it, update the graphics, re-write scripts to make them cleaner and more concise and compile faster...the possibilities are endless.

Under the hood, all games are exactly the same, yours is no better and no worse than any other game out there. They do the same thing, and as long as you put your heart into what you develop, you will never create a bad product. "Love what you dev, dev what you love" as the saying goes.

So get back into Unity, GameMaker, RPG Maker, Unreal, whatever your engine, and finish your game.

I feel like this post is a bit cluttered, maybe unfinished...I'll maybe do a video like I said at the beginning and talk a bit more in detail about some things. I hope this inspires someone to keep going with their project.