Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

23 JUL 2022:

Was out of town most of this week, but managed to do some programming and Blender work. The shield fighters are pretty much done, they're just missing some logic for when the engines activate. The general idea is that the shield fighters usually have their engines off (because they're already in motion and moving at a constant speed). And usually the AI will pick another enemy to spawn. However . . . what about the situations where spawning another enemy could negatively affect the framerate? That's where the exhaust animation comes in. Instead of spawning a new enemy, the existing shield fighters will fire up their engines and accelerate towards the player. It's easier to make an existing enemy "harder" than to draw a new enemy on the screen.

Bombers are next on my list. There are 4 variations of them . . . or rather, they attack from 4 different directions. So this morning I worked on the first one.

The next 3 weeks my day job has me going on business trips, so I won't be able to get much done. I'll still do my Saturday devlog updates, just don't expect much (or any) progress during this time. Actually, now that I think about it, that would be a great time to talk about my thoughts regarding the latest news surrounding the Unity game engine. Stay tuned for those thoughts!


QUOTE OF THE WEEK:

"If you can learn to enjoy repetition, you can achieve what normal people think is impossible."

Thanks for reading and have a great rest of your week!

However . . . what about the situations where spawning another enemy could negatively affect the framerate? That's where the exhaust animation comes in. Instead of spawning a new enemy, the existing shield fighters will fire up their engines and accelerate towards the player. It's easier to make an existing enemy "harder" than to draw a new enemy on the screen.

Interesting, how do you determine that?  Do you just have a hard limit on the number of concurrently spawned enemies?

There's a counter variable that I use to keep track of how many times the main game loop iterates in one second. Usually it's well over 60 fps. But large graphics -- planets and capital ships -- are what really cause performance to take a hit.

To fix this, I will have some code along these lines:


IF fps > 60 THEN

    SpawnNextEnemy

ELSE

   IncreaseAttributeOfExistingEnemy    (make enemy go faster, etc)      

END IF


But like you mentioned, I have also experimented with hard limits on enemies:

IF NumberOfActiveCapitalShips > 2 THEN

     IncreaseAttributeOfExistingEnemy

ELSE

SpawnAnotherCapitalShip

END IF


Both ways get the job done and they can even be combined.

Interesting, I don't know if I have seen that approach before.  Theoretically then, faster hardware will tend to produce a different experience than slower hardware, because it will usually favor adding more ships over upgrading existing ones?  Have you done much comparison of older vs. newer hardware?

I haven’t done any hardware testing yet, but you make a good point. Ideally, the experience should be about the same regardless of what hardware one has. 

You could always split the difference.  Maybe if fps>60, alternate or randomly choose between a new ship and an accelerated one, instead of always spawning a new one.  That would close the potential gap a bit, and would also mix it up a bit more when performance isn't an issue.