Work has been slow this last week. Oh, and by the way, just for reference, I say "week" even when its the middle of the week, or beginning of a week because I work weekends as well as weekdays. So when I say "week" when talking about progress, I mean a space equivalent of 5-7 days.
Plenty of people make it their policy to never work weekends, but not me. I don't usually pull all-nighters, but I often work with no days off, unless I'm really in the mood to play a game or something. Sometimes I don't even take breaks. There are days where, aside from getting up to make myself something to eat or use the bathroom, from the moment I wake up til the moment I'm too tired to continue, I'm rooted to this chair, working. If you want to be the best at what you do, you've gotta mean it. Fortunately for me, I love what I do, and if you love your job, you'll never work a day in your life.
(Ironic that I love being a game dev, despite the torment I go through to make games. Office workers would think I'm insane.)
On to the update!
-Feedback response added: Enemies now flash when shot.
Though this should have been simple, I had to mess around with shaders in order to get it to work without numerous more spites and a mess more if-statements. And for those of you who have any experience working with shaders, you know all to well they can be temperamental bastards. Especially because they have their own specific language, no matter what medium you're programming with, because they communicate directly with the graphics processor of your computer.
For the laymen out there, imagine your job could be done just fine in English, but every so often, you had to switch and do something in Greek, or some language you don't know. Or if you're in school still, imagine your assignment was in English, but every 3rd problem on the assignment had to be written in Greek, or some language you don't know, and doing just one thing wrong meant you got a complete 0 on the test. That's kind of what shaders are like.
-Feedback response added: Enemies now bleed when shot.
It doesn't look as nice as I would have liked, because it's done in a particle system, and for those of you who don't know, there's only so much particles can do. But it definitely adds that nice level of feedback that was missing. Perhaps I'll do a tip post for beginner game devs on the absolute cruciality of feedback.
-Test environment is taking shape.
I've been focusing on things like getting the player character to behave properly when moving around the screen, and on creating sprites for the actual in-game world.
I hate to burst the bubble of those hoping for a lively test environment, but it's going to be relatively bland. Hell, if I hadn't had any plans to make a playable tech demo, I wouldn't have bothered with a world environment at this stage. The demo area will be lacking, but serve the purpose of showcasing the lighting engine and the game's controls. Yeah, the thing about the lighting engine is that it doesn't work if there are no sprites, and since the player and test enemy are the only sprites on screen at the moment, there wouldn't be much to see.
But having that in there will allow me to take screenshots that are much more worth looking at than the inventory screen, so there is a benefit to all the work.
-Work has begun getting the lighting engine running.
Why do these two last steps take so long? Well, the lighting engine requires me to make every sprite twice. First the diffuse map, which looks like this:
Standard sprite. And second is the normal map, which looks like this:
Horrifying, rainbow mess.
How does one explain something as complex as a normal map to someone who may not have any idea of what one is? Hmm. Well, in as little jargon as possible: Each pixel of the ugly rainbow monstrosity translates into x,y, and z coordinates. Depending on the color of the pixel, the shader will assign the matching pixel on the diffuse map a depth in pseudo 3D space, so depending on the angle, distance, and intensity of the light, some areas of the sprite will be darker, and other areas will be brighter. This is the result:
The normal map on the player character needs to be redone, as I did a terrible job making it, but as you can see, as the light orbits the sprite, he reacts as if he's 3D even though he's very clearly just 2D.
Unfortunately, in 2D games, normal maps need to be present for every sprite and every frame. I can't just make one and expect it to work while he's walking, for example. If there are 50 frames to him total, there needs to be 50 normal maps as well.
I'm getting kind of bored of the project. It's not as exciting a concept as the new one I came up with. Now, being bored of it doesn't mean being disinterested in it. I can keep working, but it's kind of becoming a drag. Progress is slowing way down due to tackling bigger and harder things, and it feels like the project is at a standstill. I've been working on the same group of things for a while now, and feel like I'm not getting anywhere, even though I clearly am.
I'll admit, making parts of the background has been fun, but the fun quickly evaporated when I moved to normal map making. It's pretty monotonous. I'm afraid I'll have to switch back to doing more code-related things, which means screenshots will be delayed.
One thing I've been contemplating doing is making it so enemies are able to run out of ammo. I've noticed that in every game than involves guns, enemies never run out of ammo, excluding Bethesda games, anyway.
-Enemies can waste up precious bullets so that when the player finally kills them, there will be less ammo to take from them, increasing the challenge level.
-Enemies with powerful guns can run out of bullets, evening the playing field for players.
-The player character will be equipped with a gun. If an enemy runs out of ammunition for all of their guns, what hope remains? What kind of idiot would transition from using a gun in a gun fight, to running up to their potentially armed opponent, with a melee weapon?
-Things like boss fights might be made a little too easy, simply by allowing the enemy to run out of ammo.
-More coding to get the enemy AI to change weapon, or change from aggressive to fleeing.
Unfortunately, it's looking like the cons outweigh the pros.