sábado, 16 de março de 2019

Game Design - How does one make a good First Person Shooter?

Introduction

I have played videogames, first person shooters primarily, since around 2006, when I was still 5 yo. Since then my fascination with the genre has led me down a game development career, focused on FPSs specifically. Thus, way back in 2013 I started gaining information and knowledge in regards to what made some FPS games good and what made others bad. I started analysing every game I played and trying to find faults in them that I could later avoid. And now, 6 years later, I have a fully functional free FPS game based on Quake 1 completed, and a tactical shooter in the works. How did I do it?

Firstly, I would like to advise you, the reader, to try to watch negative and positive reviews of FPS games. Gggmanlives, on YouTube, is great in this regard. His criticisms are very objective and helpful, as well as entertaining to watch. He primarily covers first person shooters, so the things he says about the games he covers are rather relevant to this document.

Secondly, this is a living document, meaning it will be continually updated and edited as time goes on. Things may be added, or modified for readability, but I doubt anything will get removed outright. I fully believe in the things I present here, and if I thought any of it could be untrue, I wouldn't write it down. Without further ado..

AI

Telegraphing: Something the best 2D platformers and 3D shooters have in common is that their enemies telegraph their attacks. A lot of times, you'll hear people saying that a game's enemies never telegraph their attacks, and how it is an issue. But what does this mean?

Telegraphing is the act of displaying what attack an enemy is about to make, before the attack is initiated. Typically, the time it takes for this telegraphing depends on the power of the attack.

For example, in Half-Life (1998), the human soldiers will instantly crouch and shoot at the player, as it is their weakest form of attack. But up close, when they kick you away, their foot doesn't instantly appear on you and you get thrown back, but instead you have time to react and move away before the hit is registered. They also do this for when they use grenades, where they aim down at you for the grenade launcher, and pull a hand grenade out of their backpack for their alternate grenade throw, both of which have distinct animations that look like none of their other actions.

Quake (1996) is another example of a game that does this. The Shambler, a large, furred beast that throws lightning at the player, has a build-up animation where it summons lightning before throwing it at the player, making it an easy attack to avoid if the player is careful and quick enough to do so.

However, in Quake, there are also these knight enemies that carry swords around, and as soon as their sword swing animation begins, the player takes damage for every frame of the animation spent near the enemy. Do not do this. Instead, you want the damage to only start when the sword would likely be seen to hit the player from the first person view. That way the player can avoid the attack by learning the enemy's attack animations and when in those animations the damage starts, instead of just keeping their distance from them at all times. This lack of telegraphing with the knights makes melee combat in Quake feel heavily underpowered, despite the fact that the Axe that the player carries around is a 3 to 4 hit kill for the low level knights, and has a seemingly 50/50 change to stun-lock most enemies.

Half-Life avoids this issue completely, making it a point to have the player only have a melee weapon initially, and making him face zombies and headcrabs, both enemies that clearly telegraph their attacks, with a surprise attack on the zombie that's much faster than the other attacks, keeping the enemy dangerous even to seasoned players, or later on in the campaign. Half-Life also uses clear telegraphing for its bosses, be it the Gargantua's laser stomp attack, the Gonarch's suspicious white liquid attack, or the Nihilanth's portal throw attack. All of these have either long winded animations leading up to them, or slow "projectiles" that can be dodged if the player is quick and smart about it.

The key takeaway from this section is to always make sure that your player can avoid some if not all of the enemies' attacks, but especially the stronger attacks. Even games like ArmA and its sequel have a long winded animation for a grenade throw, slow turret rotation for the IFVs and tanks, slow drawing animations for RPGs, a focus on "getting the drop" on your enemy and staying hidden from his line of sight, etc.

Equal Opportunity: In videogames, it is usual to have AI opponents that behave similarly to the player. Good examples of this are bots in Counter-Strike, Battlefield 2, racing games, etc. In these games, it is important that both the player and the AI opponents have an equal opportunity for failure, and an equal opportunity for victory. In these cases, you don't want the player and AI opponents to be easily differentiated when compared, but rather to have the AI behave as much like the player as possible. For example, you wouldn't want the AI bots to run faster or slower than the players, or to take longer or faster to reload a firearm, or to not be able to do things that the player does, in general.

However, you also don't want the AI to be better than the player. This applies to regular AI opponents as well, as a lot of the times these opponents use weapons like automatic rifles or shotguns, and in some games, they have the upper hand. In Half-Life, despite the AI grunts being soundly designed in terms of telegraphing their attacks, and despite their behaviour not trying to mimic that of a player, a huge issue they and Half-Life 2's Combine Soldiers have is that their weapons behave differently, despite being the same firearms in-universe. The Shotguns, especially, have a much faster rate of fire when in the hands of the AI, a much lower spread, and are seemingly semi-automatic, rather than pump-action, as it is in the player's hand. This isn't just an issue with internal consistency, but also with difficulty. The player can't shoot shotguns that fast, so why can the AI?

The answer is that the AI shouldn't. That isn't to say that the AI always has to be worse than the players. In cases like Quake 3 Arena, or Counter-Strike, or other first person shooter bots, the AI's purpose is to imitate players, and sometimes players are better than other players. However, a player can only be so good. A player can only move their cursor so fast, be so accurate, move so well, time their jumps so well, etc.

The AI and players must not only have an equal opportunity to succeed, but also an equal opportunity to fail.

Reaction to Damage: Another thing to keep in mind when designing your enemies is to make sure they react to damage. If someone gets shot, they're not just gonna bounce their head back and forth like with Half-Life 2's Combine Soldiers. They're not going to keep shooting at you less than 200ms after getting hit with a bloody bullet. They're going to be stunned for a little longer than that. They're going to yell in pain. They're going to visibly react.

Not only is this good for the player to avoid taking damage if their shots are connecting, but it's also good for the player to feel more satisfied for getting that hit on the enemy and taking him down later on. And upon death, another thing that has to be done is a good reaction to damage. Half-Life 2's enemies tend to just fall on themselves if killed using a weapon that isn't the Shotgun, RPG, or Grenade, regardless of the direction they were shot from. Half-Life's enemies would fall in the same ways every time depending on the direction they were shot from. Neither of these are good.

Recently, a lot of games have done a mix of both. The enemy plays a death animation, and halfway through they become a ragdoll. That way, it avoids the repetition, avoids floating corpses and avoids clipping through walls. The recent Call of Duty games are a good example of this. When players die, they go into an animation, and after that animation is almost over, they turn into a ragdoll. Left 4 Dead, by Turtle Rock Studios, had this sort of system for their zombies, but lacked it for the player survivors. This means that all players always died in the same poses, which is rather immersion breaking, while the zombies always reacted realistically, even if their ragdoll physics was unrealistically slow.

Difficulty

Challenge: The biggest draw to videogames, especially shooters, platformers, multiplayer games and racing games, is the possibility of loss. In videogames, mistakes can lead to failure, and contrarywise, doing things right will lead to success.

Sometimes, games will get criticised for being too hard. This isn't because the game is too challenging - as in, the game tests the player's skills too thoroughly - but rather the game is too harsh on the player, and doesn't provide a fun challenge. On the other hand, there are also games where the gameplay loop is simply too easy, which leads to a boring and repetitive gameplay experience that "gets old" rather quickly.

You have to provide the player a sense of accomplishment. Not through giving them a reward, not through making them go through an unfairly hard section, but through giving them a challenge to overcome. For example, it is difficult to get through Mario without getting a game over screen at least once. There is a certain amount of challenge in that seemingly simple and easy game - after all, all you do is jump on blocks and enemies and go from left to right. But there's always a possibility of failure, and enough failures can lead to a game over screen. This means that despite the gameplay not being challenging to learn, the intricacies of each level and "world", and the length of the game, leads the player to have to be as good as they can be if they want to beat the game. The sense of accomplishment when you beat Mario isn't because you see a few pixels that Nintendo says is a princess, but because you managed to overcome all the challenges posed by the game to get to that point. Like life.

In RPGs, such as The Elder Scrolls V: Skyrim or Coliseu, the sense of accomplishment is also tied to the player progression. Initially, you'll find it difficult to beat a dragon on your own in Skyrim on the hardest difficulty, and impossible to beat the second boss in Coliseu without having enough damage and health upgrades. In these games, part of the challenge is putting the time into gathering all those "experience points" that you need to defeat those enemies with. The enemies become the challenge, and the road to get there is what makes it satisfying when you finally beat them. Back to Mario, you don't feel a sense of accomplishment when you melt Bowser alive in flaming lava because you touched the pile of pixels Nintendo says is an axe, to cut what looks like a bunch of cigars side by side but is actually a bridge. You feel it because of everything you did to get to that point. The journey to that final goal.

Basically, the game can't be too easy, nor can it be too hard, and the reason for having challenges put in front of the player has to be so that they can feel accomplished when they overcome them. An easy game is boring, a hard game is frustrating - but a challenging game, is fun.

Fairness: Have you ever found yourself screaming at a game for having "bullshitted" you? For example, when a glitch occurs in a first person shooter you're playing, and you end up in the developer testing room, leading to your account getting banned, as happened to several Fallout 76 players, or when in Counter-Strike or Half-Life, a door closes on a corpse which causes the door to "earrape" the player with the closing sound, killing the player instantly upon touching it and otherwise turning impossible any progress through the doorway until the corpse is rid of, or when playing the Half-Life 2 mod MMod's first release version, and having an enemy shoot unavoidable, 1-hit kill grenades randomly at you?

What these examples have in common is that the player was punished, but without being at fault. When making your game difficult, you want to aim for a fair challenge, as mentioned previously. What this basically boils down to is making sure that the player feels like it was their fault that they failed. A good example of this is in, you guessed it, Quake 1. If you see a Shambler readying his lightning throw attack, and you stand still and get hit by it, you know it was your fault for not getting out of the way, running for cover, or trying to stun him with a Lightning Gun or Rocket Launcher. However, when a Quake fan-made map spawns a Shambler right in front of the player, out of nowhere, with no cover near him, and the player gets hit by it, without any possibility of escape even when reloading a save and trying the sequence a second, third or fourth time, the player knows it wasn't their fault that they got hit. And they get frustated by it. This applies to racing games, too. In Need For Speed: Most Wanted the player's car can sometimes seemingly randomly lose all traction and spin around uncontrollably when trying to drift around a sharp but long curve, and all the player can do afterwards is restart the race or hope to God they can somehow regain their position in the race in time for the finish line. And what's worse, is that this sort of thing never happens to the AI, which goes against the aforementioned equal opportunity for player and computer.

You need to make sure the player feels like when something like that happens, when they get hit, when they die, when they lose something, that it is their fault. Always make sure that the player can avoid failure, because if they can avoid failure, and they know they can avoid failure, they won't blame the game when they do fail.

Visuals

Clarity: Visual clarity is incredibly important for first person shooters. Time and time again developers have chosen to prioritise graphical effects over visibility, or style over substance. In racing games, the player has to be able to see the road ahead, and in first person shooters, the player has to be able to see the enemy ahead, and their crosshair.

DOOM (2016) has a good example of how not to do it. If you've played that game, you'll know that the machine gun's crosshair is barely visible a lot of the time. This means that when the player wants to shoot an enemy that's further away, they have to guess where their bullets will land, or squint their eyes to find the crosshair and then line up their shot.

A lot of games also have issues with making the enemies obvious. Half-Life does this well for its soldier-type enemies, who have a high contrast light camouflage and a dark vest, making them easy to spot in any lightning situation, on any background.

Bioware's Anthem (2018) is an example of a game that has very poor visual clarity, but in a different way to either of the previous examples. Every time there's an explosion, a muzzleflash, or anything of the sort, the entire screen seems to flash that effect's colour for a frame. Not only is this dangerous to people prone to epilepsy, but it also obfuscates the player's vision for too large an area. The issue in Anthem is made even worse by the fact that there is an enourmous overuse of explosions, thick smoke effects, sparks, etc. It becomes a mess of graphical effects that only serve to block the player's sight for the sake of looking "cool". This can also be an issue in games where the muzzleflash of an automatic weapon obfuscates what's behind the crosshair, like in certain games' mounted turret sections.

Basically, make sure that the player can always see their enemies, regardless of environment or lighting, and that the player can always know where their attacks will land, with the crosshair and what's behind it clearly visible at all times.

Options: Make sure you're not forcing any graphical effects on the player, such as chromatic aberration, film grain, excessive vignettes, bloom, or anti-aliasing. A lot of post-processing techniques are either "good" or "bad" depending on personal preference or hardware performance, so it's key to have the option to turn these off. Not only that, but also make sure your default settings are up to date. You don't want to ship your game with chromatic aberration on, film grain at 75%, bloom with a low threshold, etc. Use post processing sparingly, with the intent of highlighting certain things like bright lights, rather than going the Farcry 1 route and making everything blurry and, ultimately, ugly.

This is also important for the sake of avoiding performance issues on mid to low end computer systems, as post processing effects are incredibly taxing on performance. There's a reason most successful free-to-play games on the market have very low graphical fidelity or allow for extreme customization of the graphics settings - there's a market for players with lower end machines, and most people tend to ignore said market. Try to avoid being part of that crowd.

Level Design

Lighting: Lighting in level design is incredibly important. It isn't purely a visual effect, like some may think, and it can actually make or break a game's level design sometimes. In this rather long section I'll explain how lighting can be used to guide the player towards their goal, how much lighting should be used, and the different colours of lighting and the effects they give when put into contrast, and when on their own.

There are many ways one can choose to light a level. Picture in your mind a long room, with a staircase to the left, a vent to the right, double doors on the opposite end of the entrance, locked garage doors in front of the staircase, to the left, and everything full-bright. Now imagine the player entering that area. Would any specific route, be it the stairs, the vent, or the doors, really catch their attention more than the rest? No. It would be a dice roll to figure out which route they'd take.

Let's say the double doors are the main exit, the vent is a secret alternate route, and the stairs lead to a locked door that the player will access later from the other side to open the garage doors, having a nice reuse of assets. Now, let's imagine the room is now completely dark, and let's add a bright light to the entrance to the vents, the double doors, the garage doors, and the staircases. Now the player knows where he can go, but he doesn't know where he should go. Nothing has really changed since the fullbright version.

And now, let's add a bright light to the staircases, a dimmer light to the double doors, a dim red light inside the vents, barely visible from the outside, and a red light on the garage doors. Now the player is least likely to go for the vents first, most likely to go to the stairs, noticing they're locked, and then going for the double doors. This is basically the idea of guiding the player using lighting.

It can also be done to indicate the way the player has to go rather than the specific place the player has to go to. Let's assume there are no doors, and that it's all a maze-like, realistic office building. How do we prevent the player from getting lost in this office?

The stupid way to do it is to add arrows everywhere. Exit signs, arrows drawn in blood, whatever it may be, do not do this. Instead, what you should do is light the path for the player, or paths. Have the well lit hallways be the ones that lead to the exit. And on the exit, you may have a differently coloured light, such as a green light, an exit sign, a light dangling from the ceiling pointing to it, an enemy coming out of it.. things to indicate that the player has indeed found the exit.

With guidance out of the way, let's talk about the amount of lighting a level should have, and why. Imagine, this time, a Doom 3 level. It's dark, you can barely see anything, and there are enemies lurking in the shadows. This links back to our visual clarity issue - sure, it may look impressive with all its dynamic lights and real-time razor sharp shadow effects, but the gameplay is hindered by the darkness. Make sure that the places where enemies are, there are lights. Either that, or do something different, such as lights behind the enemy, as that tends to have an equally effective, but more visually appealing, result. Basically, make sure the player can see their enemies, but this time, through the lighting of the level rather than the colours used on the models themselves.

Keep in mind that the opposite can sometimes happen, too. If the entire level is too bright, confusion may happen when it comes to player guidance, or areas that are too bright may be affected by the bloom effect and glow, causing visual noise that the player will likely not appreciate. A way to avoid this is to add variety in the colours you use. But which colours should you use?

Graphic designers should be fairly acquainted with the concept of colour theory. The idea that certain colours opposite in the spectrum of colours go along well together. Blue and yellow, orange and cyan (remember Portal?), green and red. That, and the idea that colours can convey a sense of temperature, and even feelings. But how can you use this in lighting your levels?



Imagine a game like The Division. The exteriors are snowy, cold, diffuse, and rather foggy. The dominant colour is blue. But let's say your boss orders you to make an interior for such a game. Will you also use blue for the most part? No. In this case, it would be wise to use shades of orange, yellow, and other colours around that area of the spectrum. The contrast between the warmer-lit interiors and the colder looking exteriors would work to emphasize the low temperatures of the exterior, while also adding variety to the visual range of colours used in the game. Half-Life 2 does interior lighting rather well, with the colder, more depressing Combine structures and underground sewers being lit with cyan, while the apartments and other human structures being lit with warm shades of orange and yellow. Not only does this make sense considering the games are set in the early 2000s (with technology having stagnated since the first game), as yellow lights were more prominent at the time, but it also provides a good visual contrast between the two sides of the conflict - cold and mechanical versus warm and familiar.

Resultado de imagem para colour psychology


Here is a great chart by Fifteen Design showcasing the emotions commonly attributed to certain colours. This is called colour psychology, and is used heavily in marketing and 2D artworks. This applies equally well to level design lighting, and even texture-work. Notice how Half-Life's main colour, displayed on the Lambda logo, HEV suit, etc, is orange, which represents innovation, energy, bravery, confidence.. and how the Combine's structures strongly present a deep, dark blue, mixing security, authority, power, etc.

Quake and Doom (1993)'s uses of yellow, brown, and blue, don't follow this logic. Back then, id didn't use colours in any way other than knowing that certain colours on certain surfaces looked neat. What does the presence of brown tell you in most of the game? Earthiness? No, it's supposed to be an alien world. Authenticity? Eh, maybe. Warmth and support? Definitely not. The only adjective that applies is serious, and that's not really much. But what about Quake Episode 4's use of blue? Well, let's see. It's The Elder World, the last dimension of the game, the last step towards getting the 4 runes and defeating the final boss. So, loyalty? Trust? Dependability? Security? Logic? None of these apply. Hell, they contradict what better describes the dimensions in Quake. Illogical, dangerous, full of traps, enemies that turn on each other easily...

Don't be like Quake or Doom in this regard, be like Half-Life. Use colour psychology in your game's favour. Have a list of adjectives to describe the levels you're making, the game as a whole, and use the lighting in your favour. Some may argue that this is unnecessary, but really, the devil is in the details.

Miscellaneous

Coherency of DesignDusk is a game by New Blood Interactive, developed by a single person and with a great soundtrack. However, the game has many issues that come by design. One of these issues is ammo management. The game, being inspired by old titles such as Quake 1 and the original Doom, takes away the player's ammo at the end of episodes (every 8th map or so), and has no infinite ammo weapon apart from melee. That, alone, isn't a problem. However, Dusk heavily encourages the player to conserve ammo. The maximum amount of shotgun shells a player can carry is 50. That means the player can only fire the double barrelled shotgun 25 times at full ammo. Considering the fact that most enemies take at least 2 or 3 shots to kill with with the double barrel, running out of ammo is a common occurrence. Again, that alone isn't really an issue.

But then, you see the bigger picture. The game encourages you to conserve ammo, by limiting heavily how much you can carry, but also takes away all your ammo at the end of each episode, making most of your conservations futile. This is inherently contradictory and can only really be explained by the idea that Dusk simply takes away your weapons and ammunition because, well, the older games did. There's a reason most games since Half-Life 1 never take away your weapons without an in-universe and gameplay reason. Doom and Quake took away your weapons because you had plenty of ammunition. You could carry around 200 shotgun shells in Doom 1, and most enemies died with one shot. Quake encourages conserving ammo by having all enemies take more than a few double barrel shots to take down, with the exception of the two basic enemy types - the zombified soldiers and dogs, but doesn't limit your inventory so much. Insurgency and Arma encourage conserving ammo by having the player inventory heavily limited, while also having enemies die in less than 5 shots of a rifle or pistol, and a single shotgun blast from up close, making long bursts generally a waste.

Make sure your decisions are based on whether or not things go along together, and not on whether or not other games have done it. Figure out why those games did it, what effect it had, and whether or not what you're doing is for the same purpose, if not a better one. Avoid making decisions that contradict one another, like Dusk does.

Think of it as a negative phrase in English. You don't say "I don't haven't a good data plan", you say "I don't have a good data plan", because the first negative in the sentence already conveys the idea of negativity, and anything else on top only creates a broken sentence that's hard to understand and doesn't convey the idea you want it to convey properly.

Gunplay: Having good gunplay depends on many factors, and there's no objective, easily repeatable way of doing it, at least, not to my knowledge. However, there are a few things that do help making the act of handling and firing a weapon in your game more or less fun.

A static model on the right or centre of the screen that only moves when the player shoots isn't satisfying to handle. Weapon sway, movement animations/algorithms, view bobbing, jumping and landing animations, strafing animations.. Wolfenstein: The New Order and Quake Champions are good examples of games that do that kind of thing right. Even something as simple as Half-Life 2's crappy sway and bobbing can go a long way into making the simple act of moving around more satisfying and less boring.

The crosshair in many games is usually either in the vein of Counter-Strike's expanding +-like reticule, with the option of a simple dot. Interestingly, simply having the crosshair expand after every shot, even if the bullets don't end up going anywhere other than a fixed degree around the centre, is enough to make the gunplay feel immediately better. You can have the fixed dot as an option, but try not to have it as the only crosshair available. Expanding crosshairs are simply more satisfactory.

Bullet impacts in games are very varied. Some games opt for a simple black dot on the wall and sparks, like Half-Life's regular firearms, or Quake's nine inch nails, and some games opt for something more explosive, like Left 4 Dead 2's incendiary ammunition, or the Arma series' 25mm Chainguns, or FEAR's very spark-ful, smoke-ful, and parallax-using impacts, or even Doom's little explosion sprites.

Imagem relacionada

Resultado de imagem para fear game bullet impact

A gunfight in FEAR. Notice also how the muzzleflash doesn't block the crosshair.

The fact is, the more impactful a bullet impact is, the better. Now, that may sound obvious, but it really isn't. A lot of games nowadays from AAA studios simply opt for a more realistic and grounded smoke and tiny hole with cracks around it, like Half-Life 2. But really, that's just not as satisfying as opening actual holes in walls and having sparks fly around and bounce on the floor with little explosions where the bullet hit.

FEAR's explosion impacts are the most interesting of all these, as they're the only ones to have parallax holes. Grand Theft Auto IV is another game that has parallax holes, in its case, bulletholes, but being a third person shooter open world title, the details are commonly gone unseen. Parallax mapping is the act of using a heightmap, a texture that has white and black areas determining convex shapes and concave shapes respectively. This technology is great for giving a sense of depth where otherwise would simply be a flat texture, as seen below.

Parallax mapped holes in a wall in FEAR

In FEAR these holes are used very sparingly, but the effect is still felt nonetheless. Not many games do this kind of thing, but for those that do, the effect is immensely gratifying. If you can nail the act of shooting at a wall, the act of shooting at an enemy will be far easier to get right. Just have less sparks and more blood. Quake Champions' gibbing system has a fantastic blood particle effect that should serve as a great example of how to do blood right. And even games as old as Counter-Strike: Condition Zero Deleted Scenes have good examples of how to do blood particle effects, with sniper headshots creating a different and much more brutal blood effect.

Quake Champions and Left 4 Dead 1 and 2 are also good examples of gunplay done right in the sense that upon killing enemies, depending on where the last bullet hit them, their model would be modified to a gory version, with actual, physical holes or even dismembered limbs where the character was shot. This effect makes fighting the infinite droves of zombies in Left 4 Dead's movie-like campaigns much less repetitive and way more fun.

Destructible environments are another thing that can make gunplay feel more dynamic and fun. The Uncharted series has a lot of these sorts of things, environments full of pillars that can be slowly destroyed, revealing the person behind them. Not only does this make the arena more dynamic, but it also makes the bullets more impactful, and thus, the gunplay more fun.

Another thing that a few games do is changing the FOV. Every shot that your gun fires, you get a bit of a wider FOV. This is great for making the act of firing as impactful as the bullet hitting the target. My Half-Life: Source modification, Half-Life: Source Revival, has a similar effect to this. The weapons in the game have vertical and horizontal recoil, and the camera's Z rotation is tied to the vertical recoil. This makes the recoil created from firing the guns far more meaty and impactful, and generally better, despite its existence hindering the player's ability to fire consecutive shots accurately.

Movement: What makes movement in an FPS game fun depends heavily on the type of game. Something like Arma or Insurgency doesn't need a fun, skillful movement system. Having one would go against the idea behind those games, as there is no bunny-hopping, or strafe jumping, or rocket jumping in real life.

Fast paced action games such as Quake 3 Arena and Quake Champions absolutely require skillful movement systems. Built-in exploits such as strafe jumping and rocket jumping are integral to the gameplay loop of those games. It's part of their identity, in more than a few ways. If your game is anything like that, it's important to have that kind of thing.

Black Mesa (2006/2012/2015/in-dev) is an example of doing certain things right, while doing others terribly wrong. It carries over the movement mechanics from Half-Life 2: auto-crouch jumping, sprinting, jumping, etc. However, for whatever reason, the developers chose to limit running to forward only. You couldn't even run forwards at an angle, you could only sprint with W pressed. They later fixed this in a 2018 update, but it was an issue for more than 11 years.

Something very important about classic videogame movement that something like DOOM (2016) lacks is air control. Instead, they locked air control behind player progression, which is, quite honestly, plain stupid. Don't do this. If your game is supposed to be a fast paced, Quake or Half-Life styled shooter, don't limit the player's movement like that. Let them bunnyhop, let them strafejump, let them rocket jump, let them air strafe, let them have fun.

tl;dr: try to keep your movement coherent. If your game is supposed to be classic-styled, and it lacks basic movement mechanics like sprinting sideways and backwards, or key, defining features from that era of videogames such as skillful movement, that's a problem that needs to be addressed.

On the other hand, slow paced games such as games in the Arma series, Insurgency, Squad, Battlefield 2, and my second game, Pelted Warfare, have no place for such movement abilities. While their existance can be fun, it doesn't go well with the premise of a realistic, believable war scenario, with mechanics that try to mimic real war scenarios and give the player that rush of "oh man, I'm gonna die if I make a single mistake here".

What would be the tension in having 2 IFVs corner the player's squad if they can just rocket jump on top of a building and bunnyhop away? What sense would that make? None. However, these kinds of games don't have to be limited to simple movement. Advanced movement mechanics such as grabbing ledges, jumping, rolling and etc are still within the scope of the game, and are also fun in and of themselves. Imagine the same situation, but the player vaults through a window, gets to the second floor, vaults out the window onto the roof of a nearby building, and crawls to the other side of the roof where there's a ladder. Now that makes sense and could be equally, if not more, fun.

Basically, don't excuse your clunky movement mechanics with "it's supposed to be realistic!". If your game has poor movement mechanics that aren't fun to deal with, and that can sometimes lead to a player's death beyond their control, you need to fix that. Even the Arma series, with its third instalment, has done away with the clunky and simple movement of Arma 1 and 2 and instead opted for a more modern shooter-styled movement and first person animations, with mechanics like climbing ledges and vaulting.

Information Awareness: When you're making a game, and testing it, you know exactly how much damage something does, how fast it shoots, how XP is calculated, how the enemy AI works, etc. After all, you made all of that. However, the player doesn't automatically know any of that. Yes, some things he'll learn as he plays, but some things will just be left a mystery.

In general, try to inform the player of as much information about the general gameplay loop as you can without overwhelming them. For example, picture an enemy with 40 HP (health points), and  two weapons, a gun that deals 30 damage, and a laser that deals 10 damage. Now, the developer may be tempted to combo the two weapons, using the laser first and the gun later, or the other way around. However, the player has no idea of those damage values. All he knows is that two shots of the gun kills the enemy, and 4 laser strikes kills that same type of enemy. And maybe if he knew how much damage those weapons did, and how much health that enemy had, they would be able to create combos on the fly using that information to not waste the guns' ammunition.

This can be done via a stats screen, damage indicators, codexes, it all depends on the type of game you're making. But if your game isn't trying to be extremely realistic, like Arma, where damage is usually as mysterious as it is in real life, let the player know how much damage his weapons deal, how much health the enemies have, how much time it takes for something to recharge, and so on, but without giving so much information that the player has too much to handle.

Scope: When people say "don't make your first project an open world MMO", they're right. A lot of the time you might find that what they're saying doesn't apply - after all, your project is only going to take at most 2 years to complete, it's not that big. But really, what they should be saying instead is for you to try to think of relatively small and simple but concise ideas - something you can achieve in less than 4 months - to then build and expand upon. Take for example Coliseu. It was originally idealized as a boss rush game where you killed one enemy type in the central arena to then kill a boss. It ended up a boss rush game where you killed 12 enemy types in the central arena to then kill 4 bosses with mana, levelling up and the choice between 3 weapons at the start of each "life", as well as powerups, and even an attempt at multiplayer. It started rather small and expanded in adding diversity to the gameplay loop. Another good example of this rule is my second game, Pelted Warfare, where it started out as "make a system that has characters go from animation to ragdoll and back using a weight slider", then I started getting ideas for how to use it, started borrowing from Gearbox's Condition Zero, and now it is what it is - a game with a far greater scope than the original pitch for the project, but still very manageable.

Ideas evolve, and so should your game. Start small, and incrementally go big. That way, even if you don't achieve everything you try to add to it, or certain things don't work, the base idea is still solid and manageable. Try to think of game mechanics and enemy ideas instead of entire games at once. Think "what if you could do wall jumps that invert gravity in a game" instead of "what if there was a huge expansive world filled to the brim with original ideas that I haven't had yet". Quality, over quantity.

Basically, when people say that kind of thing, they're not telling you to just make Flappy Bird 2 a thousand times. What they really mean is this - start with something relatively simple, unique and interesting/fun that can be accomplished quickly and works great, and from there, add to it so that by the end of the year, you have yourself a game. A hopefully good and solid game that started off as something seemingly simple, and easy to achieve.

Perfectionism VS Carelessness: When making a game, it's easy to either overlook issues or overdevelop mechanics. Try aiming for the perfect balance between the two. Make sure there are no bugs in what you have already implemented into the game before adding new features. If your game is a shooter, and you want to add vehicles next, make sure the shooting is solid and as final as possible right now before moving onto vehicles, and then make sure the driving works, and then that it's good and fun to engage in.

If there's a feature in the game that needs work, then it needs work. Work on it, and then move on. Don't leave things for later or you'll end up with your very own Fallout 76, at which point you might as well start over or be prepared to spent months fixing something that could already be fully functional, perhaps even breaking other features in the process, requiring more and more testing that in the end will just delay the release further back than it should.

quinta-feira, 28 de fevereiro de 2019

Opinion - Why schooling is ineffective at evolving individuals



Earlier today, shortly after waking up, I was faced with this Reddit post by user SubatomicMc, detailing how he, for recreating the Team Fortress 2 Sentry Gun in CAD, with the intent of making a replica that'd follow people around using a camera, was threatened with expulsion, and his parents were on the school's side, according to him.

Basically, he, an 8th grader, wanted to do what Valve, creators of Team Fortress 2, a professional game company, paid a professional movie prop company money to make for their office, as can be seen here. Something with a lot of potential for a successful career in movies and games. And the school and his parents want to punish him for it.

Now, if this was a rare occurrence, the exception to the rule, it wouldn't be that big a deal. But it's an issue that spans all countries, all schools, and it's something that speaks to me on a personal level as well. Story time!


Way back when I was in first, second grade, I always had an enourmous interest in art. Drawing, painting, sculpting, you name it. MS Paint was my favourite program on the WinXP computers we had at school, and I loved drawing and redrawing the flag of my country on it with pride and excellence. That much was fine to the school.

However, later on, around 3rd grade, I think, I started using the computer we had at home. You see, it had Counter-Strike and Half-Life installed, so I one day decided to try the former out after seeing my dad go at it. And man, did I like it. I loved the way everything looked in Counter-Strike. The realism of the textures, the locations.. I didn't care that it was low-res, low-poly, or that the doors and cars were way oversized for the characters; I just liked the representation of that reality that was always occluded from me as a child. It was something that someone managed to do, and I wanted to be able to do it as well.

I started watching the news around that age, seeing the stances policemen took when firing weapons, how they moved in active combat zones, what kind of places they went to, the kind of weapons they used. I even went as far as imitating how they walked and stood still when at home and outside (childlike fun). The UMP .45 was one of the weapons our police force used the most at the time (nowadays they use FALs more than anything, but that's neither here nor there). And it was a gun that was also featured in Counter-Strike.

So I started merging my two interests together - art, and the police force. I started drawing members of the riot police, helmets, ballistic vests, and of course, UMP .45s. And the school didn't like it one bit.

They reprimanded me for drawing "those things" in and out of class. They took my drawing book and threw it in the trash, destroying almost a year of practice, and my motivation. It took me over 11 years to get me to start drawing again, after I joined the furry fandom and regained my interest in art. Nowadays, I make guns in 3D programs such as Blender for use in videogame development. A job. And something that I could be far better at had the school not gotten in the way.


Nothing about my interests in guns and art ever made me a more violent person, nor did any of the school's efforts ever push me away from it permanently. But you know what did make me a more violent person in the years leading up to high school? The fact that I was told what I could and couldn't do. The stress of not being able to do anything unless explicitly ordered to. Of not having enough time to do what I enjoyed, and being punished if caught doing so. Everything the school did to me culminated in a broken, sad, and angry individual. I had to fix myself on my own by learning that the world isn't so one-sided the hard way.

Schools don't exist to prepare you for the world, to prepare you for life, to teach you how things work, to fuel your creativity. All schools exist for is to teach you how to learn. But at what cost?

Now, don't take this the wrong way. I'm not saying abolish schools, or don't teach math, or remove kebab. All I'm saying is that the current way we are schooling our children - and by we I mean the entire world, not just the US, not just Brazil, the entire world - is shit. Completely worthless.

It cuddles students into believing the world is great and that there's always only one side to every issue. Guns are bad, didn't you know? It teaches students that the only thing that matters is grades, that it doesn't matter if any of it will be useful to them specifically, that their individual strengths and weaknesses don't matter. It creates people that hate learning, that hate everything related to their first 18 years of life.

It creates resent, and a lack of edge. Resentful adults that want the entire world to be a hugbox where no harm can come to anyone. The exact kind of people that run the kind of school SubatomicMc is, or rather was, studying at. After all, that's what they were told when they were growing up.

Another Reddit user, Hoosky_Official, posted a comment on SubatomicMc's thread that details his experiences with the American schooling system, and they examplify the issue once more. Here is what he wrote:
Had a similar issue happen to me when I chose to leave High School for being pressured about my artwork and ideas.

I was going through a really depressive period in my life at that point having hell thrown at me day by day.
A few examples of shit that brought me to that point could be that my ex cheated on me and got pregnant and tried to convince me to raise the kid despite it not being mine and trying to lie to me and get me to believe it was my kid.
And the fact that my Husky died on Thanksgiving day a bit after my ex cheated on me.
Or the fact that I had no employment and was going to end up homeless.
I could make a whole hour long list of shit that happened to me.
Point is,
I was extremely depressed and was borderline suicidal at the time (Yes, I was one of those kids who was physically bullied and beaten by other students and never had any defense or intervention from the school itself) and was being forced to take an extra year of High School due to credit reasons.
The only reason I showed up to school was due to the fact there were two teachers (My graphical design and Woodshop/Mechanics teachers) that really wanted to see me do well and they were my only "friends" because most of my actual friends were gone and graduated and had moved onto college and I was stuck in a extra year (13th grade).
To quell my depression and pour my pain into a passion,
I started making artwork that would resemble games that I loved and had made an impact on my life and how I viewed the world from my perspective.
Eventually, The school saw my stuff and basically had enough despite me coming to them day by day asking for assistance both academically and with consoling and basically pleading with them to understand what was wrong (always getting the same "Work harder" or "That's not an excuse" response).
Apparently what set them off was a piece of artwork I made of a citizen from the Half Life universe who had just witnessed his wife get shot by the Combine and had a pistol to his head contemplating suicide while Gordon Freeman was walking through a door attempting to stop him.
Even though I explained to them 1000x what the image was and where it came from and what it meant
I was brought in for multiple meetings that lasted hours and they gave me two choices,
I could either serve 10 days of suspension for the "disturbing" imagery I had created.
Or to be "removed" from the School.
The school took much care into avoiding the term "expulsion" because they didn't want any controversy to start up due to the fact that my name was well known around the school as the "School Shooter" and I was told by one of the assistant principals that they didn't want to just throw me out because they didn't want to start another mass panic of making the students think I disappeared to prepare to shoot up the school or something. (Yes, That was a common thing that happened with me)
Plus they didn't want to spark up any controversy in general.
Regardless,
I took the option of being "removed" from the school due to the singular fact that I knew that it wasn't worth it anymore and that I wasn't going to get any help and they were just going to push me out the doors anyway since they already had the paperwork to get me "removed" ready to go beforehand.

Some have called me stupid for taking that option.
And morally, I agree with them of some grounds.
But ever since I left that place, I have had a complete wave of creative freedom to work on whatever I desire and livestream on my free time with friends as somewhat of a hobby.
And ironically, I have been accepted into my local community college and I plan on attending there shortly.

Though 13 years of my life has been wasted thanks to a broken school system that doesn't understand the intent or meaning behind something before jumping to conclusions.
I can confirm that I am in a MUCH better standing in my current life and I am in a much happier position doing my own day by day routine and having as much creative freedom as I could possibly desire.
Having the ability to wake up and have a smile on my face and do something I enjoy and end the day with a nice stream with my friends and get to meet new people is something that the school system had never been able to provide me for years.

The moral of the story is.
Don't feel bad if your school decides to expel you because you made a sentry from TF2 (the sentry honestly looks really good btw)
It is not your fault that most modern school systems do not understand the creative intent behind a students work and do not take the proper time to understand what something is before jumping to conclusions.
You have some serious talent,
I can personally say that just by seeing the amount of detail you have put into the sentry itself.

I am not saying quit school forever like I did or anything like that.
I am just saying to look at the creative ability you have and see if you enjoy it.
And if you do enjoy it, See where it takes you.
Sorry to see that you got punished for making such a detailed piece though. :/
This has to stop. Schools need to start valuing students' individual skills and stop demonizing them if we truly do want a productive and functional society where people can be happy. You don't create anything by breaking someone. All you're doing is destroying who that person is and making their life, for now and for years in the future, worse.

We need a schooling system that yes, teaches people how to learn, that teaches people what happened a hundred thousand years ago and up to today, that teaches people how to put 2 and 2 together and up to multiplying matrixes, that teaches people how to turn on a computer and open a folder in Windows and up to creating tables in Excel to calculate student grades, etc.

But we also absolutely require a schooling system that encourages creativity, from creating artwork to imagining potential solutions to potential problems, that encourages discussion and debate, from what to do to a student that stole the other's pencil to what to do to a convict that raped 4 children, that prepares people for the real world and the things they may have to face, that doesn't punish students for exercising their creativity by creating things most people can only dream of creating.

My lack of artistic merit nowadays is just one example amongst millions of other people's. People that had their school get in the way of their personal interests, that stomped out any kind of potential the child once had. This has to stop.

I sincerely hope SubatomicMc can set a precedent on this sort of issue. Legal and hopefully social precedent. That his example can serve as an eye-opener for the hundreds of adults and teenagers that think there's nothing wrong with the way things are, or that put the blame on the wrong things.

domingo, 20 de janeiro de 2019

Tech - ESRGAN: Neural Network AI for upscaling images, and how YOU can use it

ESRGAN is a Neural Network that gets a low resolution image and upscales it, trying to rebuild details lost by the downscaling, like fur, grass, eyes, curves, etc. It doesn't simply blur everything like Bilinear or Trilinear filtering, nor does it leave everything pixelated like Point, but instead, it makes something truly.. magical. And it's quite fast, too, even on a low-end CPU like a Pentium.

Today, I'll be walking you through on how to install ESRGAN and how to get it running on your system. It's pretty easy, actually, as long as you follow these steps. If you have a Linux or MacOS operating system, I suggest you look Elsweyr; this guide's not for you, sorry.


UPDATE (18/03/2019): You can actually skip step 2a by checking a checkbox at the bottom of the Python installer that says something along the lines of "Add Python to PATH".

Step 1 - Prerequisites: To run this, you'll need to install a few things first:

Step 2a - PyTorch: PyTorch is another prerequisite for running ESRGAN. Before installing it, we need to:
  • Set Python to the PATH variable (this is for Windows 7 64-bit, but it's easy to find how-tos for others like Win10):
    • Right click on "My Computer", and click Properties;
    • Left click on "Advanced System Settings" (yes, it's called A.S.S.). You can close the Computer Properties now;
    • Under the "Advanced" tab, left click on "Environment Variables";
    • At the bottom, in "System Variables", locate the "Path" variable, and double click it;
    • In the value, add:
";C:\Users\[YOUR USER NAME HERE]\AppData\Local\Programs\Python\Python[37 for 3.7, 36 for 3.6]"*
and
";C:\[YOUR USER NAME HERE]\Usuario\AppData\Local\Programs\Python\Python[37 for 3.7, 36 for 3.6]\Scripts"*
*or wherever else you installed Python. Don't include the ""s, stupid. If you do, you might kill your OS. No joke.
    • Click all the okays and applies, system should freeze up for a few miliseconds while loading the new variables.

Step 2b - PyTorch: Installing it, at last:
  • Open this URL on any browser
  • Stable (1.0); [your OS]; Pip; [your Python version]; [CUDA version, if installed]
  • Copy the command(s) the website gave you, and open the command prompt:
    • Hold the Windows Button, and press R;
    • Type "cmd" into the text box;
    • Press Enter.
  • Right click inside the Command Prompt, and left click on "Paste". Ctrl+V does NOT work in cmd.exe.
  • It'll auto-execute the first command (the first line you copied), wait a few moments. It'll be over before you know it.
  • IMPORTANT: Check if it gives you any errors relating to a wheel, or .whl file. If so, make sure your Python version is 64-bit, and that you chose the correct one in the PyTorch website. It will NOT work otherwise.
  • Press Enter after it finishes the first command, to execute the next one.
  • When you're left with an empty, "[path]>_" line at the bottom, and pressing Enter does nothing, copy this:
pip3 install numpy opencv-python
  • and paste it into cmd, same way as before. Press Enter afterwards to run the command.
  • After it's done, close the Command Prompt.

Step 3 - Downloading and running ESRGAN:
  • Open the GitHub page for ESRGAN
  • Left click "Clone or Download", and then left click "Download ZIP".
  • Extract the downloaded folder to where you want ESRGAN to be. Put it somewhere easy to access, like Documents or C:/, and open the folder.
  • Download these batch files, and put them in the same folder as "test.py":
open_this_to_remaster_LR.bat
open_this_for_network_interp.bat
  • (Optional - CPU rendering) If you opted not to install CUDA earlier, if you have an Intel, AMD, or very old NVidia card, open test.py with a text editor like Notepad++, Notepad or Wordpad, not with double-click, and look for the line near the top that says:
device = torch.device('cuda')
  • (Optional - CPU rendering) After locating that line, do as the comment says: replace 'cuda' with 'cpu', save the .py file, and close the text editor.
  • You'll notice the ESRGAN-master\models folder is empty, with a lonely readme.md. Open this Google Drive link to download the models you'll use.
  • Put both models in the empty folder.

Step 4 - Running ESRGAN:
  • To see if it's working, open the "open_this_to_remaster_LR.bat" file. It should start working on the two images that come with ESRGAN, a monkey and a drawing. It'll take about half a minute on a Pentium for both images, which is slower than both Bicubic and Trilinear, but the results are miles better. If it gives you an error, follow this tutorial again from scratch, and make sure you do everything correctly.
  • To use the Network Interpolation mentioned in the GitHub page for ESRGAN, edit the "open_this_for_network_interp.bat" batch file and change 0.8 to any number from 0.0 to 1.0; or simply launch the .bat, if you think 0.8 is a fine value. Experiment around with it, I'm sure you'll find something you like for every image you have. Basically, to give you a run-down:
    • 0.0 is lacking in details, mostly the basic shapes of everything. It may be fitting for drawings or paintings. It also has less artifacting than the ESRGAN model.
    • 1.0 is too sharp, and sometimes strains the eyes. It also can look perfect on some images, for example, textures for leather things like backpacks. The artifacting in these cases ends up looking like leather, which is quite nice.
    • You also have to change the number that comes after "models/interp_" to whatever number you change the decimal value above to, but without the dot. For example, interpolation of 0.6 will need a model called interp_06.

That's all you have to do to get ESRGAN up and running. Seems like a lot, and it will take an hour or two of your day, but trust me, it's worth it. Hopefully someone will take this knowledge and use it on Counter-Strike Condition Zero, Half-Life 2, Quake 1, and other old games that have low-res textures that are just detailed enough for the AI to understand what it is. It also works wonders on background images of 2D games, or sprites.

One thing to note is that ESRGAN doesn't work with alpha channels, from what I hear - at least, not 100% alpha, where most image editing programs, like Paint.NET (and I think GIMP) erase any colour data in the fully transparent areas.

Another thing to note is that the test.py application is a batch converter by default, the batch files I made just save you the trouble of having to type all that stuff into the Command Prompt every time you're going to use ESRGAN.

It's also VERY important to have a lot of memory for ESRGAN, as PyTorch tries to allocate 1gb of RAM (or VRAM, if on GPU mode with CUDA), and if it fails, it'll throw an error and give up on the file. If that happens to you, just get an even lower resolution version of that same image, or download more RAM.

Now go ahead and have fun!

UPDATE (21/01/2019): The default models that come with ESRGAN aren't very good for textures like faces and photos, so I advise you to look for new models other than the default two and interpolation levels between them. You can see a comparison between this guy's model and the default ones: