Log In or Create Account
Back to Blog
DEVELOPMENT

5

760
Stamina Mechanic
1 year ago1,258 words
I spent this week making progress with technical aspects of Dreamons, including replacing levels with a mechanic that plays the role of MP or cooldowns in a way I feel plays well with mechanics I already have.



I spent the first half of the week addressing issues related to the dioramas I wrote about ∞ last week ∞. These are made of cube 'tiles' which are generated at runtime via code (rather than using imported meshes made in a 3D modelling program). I'd written that code myself, and I tend to focus on the surface-level aesthetic and conceptual aspects of game dev with little regard for the deeper technical hardware performance stuff; I'm an artist, not an engineer.



I knew that because of that, I'd likely gone about things in a horrendously unoptimised way, so I checked this Stats panel you can bring up in Unity's Game view. I rarely bother with it since the numbers mean little to me, but this time the 'batches' number seemed probably too high, maybe. Not that I had any idea of what it'd typically be. So I googled it. I can't say I found any conclusive answer, though 100-300 came up and seemed reasonable, and 3500 was considered ludicrously high.

With just one diorama on screen, I was getting about 9500 batches!

So I had to essentially recode how the meshes were being generated and figure out how to combine them, which also involved rethinking how colliders (for collision detection) were being generated.




What I ended up doing was combining tile meshes based on their material, meaning now the dioramas are made up of just a handful of larger generated meshes rather than hundreds of tiles with their own separate meshes. The batch count's down to 200-300 (the earlier screenshot of the Stats panel is from after the optimisation), which is, what, like a 98% reduction?

So it's time well-spent, I suppose, though I always feel fairly unfulfilled whenever what I've done would be invisible and/or meaningless to players. (Though I suppose you could say that 'bad performance' would be very visible to players.)



Anyway, that took a while. I also lost some time feeling distracted and then depressed about ∞ the UFO hearing thing ∞ and the internet's apathetic, sceptical, or mocking reactions to it and the fact I didn't have anyone like-minded to share my excitement with. Bleh.

Once those thankfully fleeting dark clouds had cleared up, I wanted to address something related to battles that I've been meaning to revise for a while.


Outdated screenshot!


Previously, characters had a basic Level number, and when they levelled up, they could choose a 'boon' at the end of battle from a grid like this (each character type had their own). I revised how exactly the boons' availability worked a few times, most recently settling on having to acquire all the boons from a row before the next row became available.

If the game is going to be nonlinear, though, and characters only accompany you for single areas (as is the current plan), levels like this just introduce annoying balancing issues. I'd say they only really work when progression is linear. Plus I'd set it up so that I had to specify grids like that for each character type, which would be a fair bit of work.

I'd still like to have some progression, at least for the player character, but it's more likely going to be in the form of stat-boosting equipment you can find, or rewards like skills or equipment for completing areas.

So I removed levels, and could have just left it at that... but that introduced a space in the characters' 'statue' UI displays that bothered me. Surely reason enough to add an entirely new mechanic despite saying previously that I was finished with mechanics tweaking for this project!!


I've also altered how the skills are displayed in the selection menu; previously they were small cards with the name displayed at a 45 degree angle, which were annoyingly difficult to read.


Now, characters have a stamina value, which limits the previously-free usage of skills; the same role filled by MP, PP, cooldowns, etc in other games.

It's been bothering me for a while now that you could just freely use skills with no cost because it makes designing them more difficult (for example, a more powerful skill with no drawbacks would make weaker variations obsolete, which I don't like), and I'd tried a few times to come up with some solution to that, without much luck. This idea came to me from the aether fully-formed the other day, though; I suppose my subconscious must have been working away at the problem in the background or something?

It's fairly straightforward. Characters have a stamina wheel (which resembles the ones from Breath of the Wild and Tears of the Kingdom by coincidence more than intention) with a small number of divisions (probably between 3 and 6 in most cases; it varies by character type). Skills have a stamina cost; probably between 1 and 3. When a character runs out of stamina, they become exhausted.


The two Normies here are Exhausted, as shown by the reddish spiral where their stamina wheel was.


Characters who are Exhausted can still actually use their skills regardless of cost, but all skills they use have their power halved, and all skills used against them have their power doubled. I don't recall seeing anything like this in other games!

Stamina regenerates for all characters 'in the crowd' (that is, not in the two active slots) by 1 point whenever anyone takes a turn.

I imagine its primary use would be to encourage switching, rather than just having the same two active characters spamming the same skills over and over. Some skills would also raise or lower stamina for allies or foes, and foes would likely be programmed to switch out if their stamina had run dry. Meaning you could lower a particularly threatening opponent's stamina to get them to switch out while you tamed their allies to build your party.

Oh, and like Conviction (the HP equivalent), it'd be reset to full at the start of battle.

How well it'll actually work in practice remains to be seen, though. It's implemented and it works (it was easy to add), though I've not had much chance to actually test it yet. From what little testing I have done, I felt it made the battles more interesting, though!



What I want to do next is make a test area/psychepelago, which would follow the previously-described story formula but with placeholder dialogue (so then I don't have to make story decisions first). Then, it'd be wise to have people test that to determine whether the game's even fun to play.

But I know I've said that sort of thing many times before and then it takes weeks or months for things to actually manifest, so... let's see how things go!

(I still really need to get around to the ports of my old Flash games, though, which I'd honestly forgotten about until a few days ago... Maybe I'll try to address the barrier that's in the way of that next week. Though I've been saying that to myself for ages. Damned Avoidant Personality Disorder making me avoid things, or whatever!!)

5 COMMENTS

GrayNine35~1Y
There's actually two games the stamina system and "burnout" remind me of- Mega Man Battle Network 6 and Star Wars The Old Republic (not *Knights* of the Old Republic, to be clear). In MMBN6, your "emotion counter" starts at 3, and you can "Beast Out," giving yourself a buff that uses up one unit of the counter per turn. When it hits 0, you lose *all* of your current buffs, including ones unrelated to Beast Out, and the option to Beast Out is replaced with "Beast Over," which gives you invincibility and what's basically berserk for a turn, but when it ends you lose all buffs, all of your stats go to 1, and you rapidly lose health (60 per second, max health is ~1000), and lose the ability to gain any buffs at all. In SWTOR, four of the classes have segmented energy/heat bars; as long as you have 60% of your resource, you regain it over time at its normal rate, but at 40-60% you only regain it at 75% speed, 20-40% at 50% speed, and 0-20% at 25% speed (making getting back above that 20% threshold very slow).

Both of these systems and your stamina encourage the same style of gameplay: using your resources throughout the fight, then emptying them out right at the end. Depending on the direction you want to go in, you may want to borrow ideas from one of the two systems. It's very satisfying in MMBN6 to get a big flashy invincible turn when you use the last of your resource, and it properly incentivizes using that last little bit. SWTOR's energy system works best with its healers, making them figure out where the best points in a fight are to burn through their resource and where to let it regenerate - the fact that you *can* come back from zero isn't as punishing, and planning out when you want to do it adds quite a bit of depth.

Porting one of your old games to Steam *was* one of your goals at the start of the year, have you thought about which one? Clarence's Big Chance released completed on Kongregate, so it's probably the most well-known one, though I'd personally appreciate Taming Dreams (or the Beast Signer alpha, but that's probably carried by nostalgia).
1
Tobias 1115~1Y
I'd prefer not to tweak the mechanics more than I already have; I only added this stamina thing because it was so quick to do so (like an hour or two of work). I'll wait until people play through it and give feedback before changing anything else, though I'm getting the feeling people might call it boring or slow or not flashy enough, and I'm not sure what I'll do about that...

Clarence's Big Chance is pretty much ready to go, though I keep putting it off because there's some other thing I need to sort out first... which I keep putting off due to irrational mental health reasons. Maybe I'll just write about that at some point, see if doing so helps me move past it. I always worry about trolls, though.
1
Slothboy2531~1Y
This all looks very good! I hope that this project is successful. Though I wish that, for your sake, you find move on to a pet interest other than aliens... it seems as if that would the sort of thing that's likely to generate more let-downs and obsessive contrarianism in the future.
0
GrayNine35~1Y
It seems relatively harmless to me. He's not wasting his money on it, it doesn't put him or others in harm's way, and even if every human that's testifying that they're real is lying, it's interesting to hear about these humans and wonder what their motive is. It also isn't just a topic he picked up recently out of curiosity, it goes as far back as playing with alien-themed Legos and making up "Lingons," not to mention the Annunaki in MARDEK. I think it's pretty natural for someone who enjoys aliens in fiction to be at least curious about real aliens, and that curiosity is only bringing him to watch hearings and read articles, not fund a cult or attempt storming Area 51.
2
Tobias 1115~1Y
My dog doesn't know what Saturn is.
0
Log in to comment!