I apologize in advance; this turned into a bigger Wall of Text than usual, lol
I've gotten all the basics of the game ready; it's still very crude but it
works, by gum. Shooting, moving around, killing things, keeping a basic score, getting hit, dead, etc., etc.
The last few days consisted mainly of grim work on the motion-controller system for the critters, polishing, documenting, making the system abstracted rather than built into the basic critter, etc., etc. I think that I really did get there, eventually; there are very few obvious issues with them now.
Interestingly, at least to me, was the learning-curve on figuring out the best combination of steering systems; this was a bit like the work I did on my Starsector AI replacer, but with a lot more emphasis on practical obstacle avoidance; one of things I never really developed for that system was a raycaster system for that, but, rather, an angle-tester (i.e., if this close to <thing> and angle <this> then Do Stuff)
This motion controller needed a ray-caster approach, which is slower (get things that might intersect the ray, then test each) but it was ultimately really necessary to get things working well-enough; at first, my zombies had the unerring ability to crash headlong into walls, among other lovely headaches.
I've seen a lot of approaches tried by various folks over the years and have read a fair number of articles on this. I think it's interesting to share my solution here, at least the abstract:
Essentially, every frame, we shoot one of six rays. They aren't all spaced evenly and they aren't randomized (that's an approach I've seen used, and while it has merits, it also has problems; if the randomizer misses too much, your only solution is more randomized rays, per-frame, which is exactly what I don't want, because rays are expensive to cast). Essentially, there are three in front, two at the sides, and one in the rear. There's only one raycast per game-frame, which appears to be sufficient.
Each ray influences critter behavior slightly differently; if, for example, a critter hits a wall with a side-ray, it turns and slows itself simultaneously.
But now I have to deal with the obvious problem of Content; everything's at the Programmer Art stage, and I have to make choices that I'll live with later. I know it's been pretty boring looking at my test artwork as I proceed, but this is how things go at the beginning and luckily, I can wear the Artist Hat if I need to (and I probably do, along with the Sound Designer hat, Animator Hat, etc., etc.).
I'm experimenting with an interesting idea; now that zoom works, the question of putting scalar graphics into the game comes into play. Teleglitch was panned by some of its critics because of its relatively-low resolution art; it was deliberately old-school in that way. One of the two brothers who were the initial developers said that he was trying to deliberately push the low-res envelope, and while it was interesting, it wasn't everybody's cup of tea (not that there is any such perfect cup, when it comes to art). So, I can avoid this, by using a trick somewhat similar to Starsector.
The only catches?
1. Whatever scalar I wish to use, I have to set now; once I start seriously developing sprites for the game, I can't change that willy-nilly. I think 2:1 is reasonable; if I'm uncomfortable with the zoom later, I can always dial it back and interpolation will cover most of my sins.
2. Obviously, there's a cost in texture memory, but frankly, I'm not expecting to experience major problems with a 2D game that's using sprite sheets, etc., unless I go really hog-wild. Memory use in general for the game is nothing right now, by modern standards. My biggest issues with graphical performance are that scaling the screen up beyond its current size (it's 1000 / 1000) won't work out, in terms of the performance of the LOS / shadow-caster; I can put UI elements to the sides, buff out the 80 pixels top and bottom for 1080 if I wish, but nothing beyond that. That's the biggest practical detail, in terms of performance, now that the critter system's largely optimized; I just got done running down over 50 critters without lag and everything stayed above 100 FPS the whole time, so I'm fairly confident I'm all right.
But, with my zoom system, an interesting idea came up.
I can combine higher-resolution images that look their best at min zoom, rather than max-zoom, and the zoom-out can feel bigger; you'll go from "intimate" to "sniper zooming out". And if players prefer a more-intimate view, I can give them a slider to cap max zoom, leaving min-zoom at 1:1. Going over max zoom won't be possible (it breaks
everything, lol) but it won't be necessary, either, I suspect; I can simply limit the ranges of weapons, etc., so that it feels like a really long range.
This sounds reasonable and cool.
All that said, I don't think I'm going to go hog-wild with the graphics side of things.
I did some messing around with normal-maps, just playing, and I think it'll add too much production time if I'm the only developer; not just building the system (lights would have to create vector data, among other "fun") but mainly, it'll mean developing artwork means developing normalmaps, too.
That takes lots of time to do well, with 2D stuff where they're going to be presented next to other things in a scene and compared in terms of relative heights, etc. I tested out a lot of ideas on this back when GraphicsLib was still pretty new, and frankly, I think it would require a 3D workflow for art to do it reasonably fast, and by reasonably fast, I mean building out characters in 3D, rigging, animating, etc.; anything less, and the randomness of the normals and depth maps (because a really good look probably requires a parallax shader) would be too unreasonable. I may come back to this later; I like the idea of normal-lighting to give things a 3D-ish feel, especially if I can figure out a way to "bake" it into static objects under static lights or something to make performance really reasonable.
I think I will be using some of my shader-fu on some other ideas, though; among other things, I've been considering water that characters can "splash" through as a possible idea, superimposing normalmaps to edit the final result, fake reflections of nearby stuff and so forth.
But frankly, those bells and whistles can wait until the actual game is largely done; I know I can do the big things now:
1. Dynamic and static lighting for the scenes with soft shadows. I haven't shown it off much, but it works well. The system I started with required, erm, a fair amount of modification to work properly for this project, and I think I need to do some additional optimization, but I think it's basically there.
2. The main character's state machine is largely complete, other than building in the equipment system (the bones are there, but not the details). One game-design choice I made early was that I wasn't going to have a Teleglitch-style inventory; instead, players will have 6 "equipment slots"; this is all they can carry around with them. Each slot can have anything in it, and what each slot does when used will be determined by what's in it. That part is still largely not built yet, but I intend to get it done soon. Examples of things that might go into "equipment slots" are:
A. Weapons, duh. A game like this lives on interesting ways to blow things away, cut them into bits, etc., etc.
B. Instead of having a "healing potion" item, have a "healing potion" piece of equipment that eats "potion ammo" and has a cooldown timer so that it can't be spammed. That (might) end up Diablo-style abstracted, though; it's pretty essential in games like this to have potions.
C. Sensors that let players ping monsters through the walls and see them briefly.
D. Shield devices and other sci-fi gadgets like that (the setting's definitely sci-fi).
E. Other stuff I can't even be bothered to write down, like devices that help players unlock chests they find, etc.; passives and actives; anything that isn't a new suit (more about suits when that's a thing, but basically, you have a suit that's your armor, it comes with passive buffs / debuffs, and you get a helmet slot, too).
Basically, though... the plan is for:
A. Ammo is abstractly carried around and won't have weight.
B. Resources you find are abstractly carried around and might have weight (kind of like Fallout 3/4's system here). But, in general, I think I'm against weight; if I want to limit players' ability to use ABC items to make XYZ resource (like converting Metal and Chemicals into Pistol Ammo, for example), then the best way to limit this is to restrict it to the pre-run phase (more on the plan for the game's structure later, when the core's built and I can start worrying about structural elements of the meta).
C. Weapons and other Equipment aren't abstract, might have weight (carrying around a Minigun might be awesome in firefights, but might be a problem when it's empty and you're trying to flee).
D. If you built a thing during the pre-game, if it's an abstract (like ammo) you have it with you; if it's Equipment, you don't, unless you equip it before the run.
E. Suits and helmets are set during pre-game and can't get changed during a run. If you find new stuff, great, it might help on the next run.
So gameplay means making choices and living with them through a run, essentially unless you find a better <something> and give up an Equipment slot to pick it up, essentially.
I'm probably going to allow soft-storage (i.e., picking something up won't delete that other something, it just shoves it into abstract storage and you can't use it the rest of this run) but probably I'll have to implement hard-storage because somebody will whine that they picked up a Rusty Shotgun to check it out and can't get their Street-Sweeper 9000 back. Dunno yet.
Maybe the Right Answer is to give people a choice- pick it up and drop their <something> on the ground, as an interactive they can swap back, or put their current item into abstract storage immediately. Or just presume that to add something to your gear menu later on, you need to keep it until the end of a run; after that, it stays in your abstract storage. I guess all of this depends on how many items I allow for; if the abstract-storage UI is 32-pixel buttons, then basically the sky's the limit; I can have 1024 items available to choose from and my problem is coming up with 1024 things that are vaguely original and relevant (yeah, right). 64-pixel buttons (256 choices) sounds a lot more realistic; it'll be hard to come up with that many truly-unique-feeling things anyhow.
So, basically, it's time to work on the UI in general, I think, starting with a basic Loading Screen, a Level Loading screen (to hide the Procedural Stuff, not that it takes long right now) and probably it's time to think about the Equipment screen and then the core gameplay UI.
There's also the question of Content. I don't think I want to talk much about that, yet. Let's say only that I face a fairly major challenge there, if I'm going to raise the resolution on the sprites by 2X.