PlayMaker News > Work In Progress...

Rick Henderson

<< < (2/10) > >>

Fat Pug Studio:
Log 4: The Anatomy Of An Endless Mode

Some time before new year i realized that the volume of work required to make both story and endless mode for the game is too much for me to finish in the amount of time i have given myself. Besides work, i have a small child, and the only hours left for work are after the little one goes to bed, which can be exhausting in the long run. I made a slight reorder of priorities - finish the endless mode first, give people something to play, put it up as an early access title, then work on the story mode.

Besides having to finish all the graphics, audio, and mechanics stuff completely much before planned, the challenge of making the endless mode itself presented. Of course, for it to be interesting, it has to be semi-procedural. How is it done?

Rough Construction

First level:

3 + 0 60 seconds waves with a warp sequence between each of the waves to give player time to rest. At the end of the last wave, you fight the random variation of the first level boss, and warp into level two.

Second level:

3 + 1 60 seconds waves with a warp sequence between each of the waves to give player time to rest. At the end of the last wave, you fight the random variation of the second level boss, and warp into level two.

You get the idea how it goes further. When all the levels are completed, you start from level one but on a much tougher scale. What does that mean? Points, enemy movement, enemy shooting speed, enemy bullet damage, enemy health variables and so on, they are all multiplied. As it name says, it's endless, and the goal is to get as much points as possible.

Wave design

This one was a bit harder to implement. Around the screen, 20 spawn points are arranged (five for each side of the screen).



Prefab pool for each type of enemy is made and squadron combinations of all enemies were made. Each is assigned a progression level, which is basically a threshold for appearing (or not appearing). The variable enables the algorithm to avoid spawning too many or too tough enemies on first levels, and too few and too weak enemies when you're already on the higher levels. Separation into prefab pools and squadron combination allows us to have a variety in spawning a combination of hand made patterns and waves of many randomly scattered enemies of one or more types.

I must admit that Unity maybe wasn't the smartest solution for this type of game. It has lot of possibilities, but every one of them must be carefully tweaked and automated for the system to work as intended. For example, i don't want to make duplicates of all the enemy squadron combinations for every movement direction, so i had to make a script that automatically flips the sprite, shooting direction and movement direction according to the position where the enemy wave spawned (if it spawned in one of the spawners on the left side of the screen, its sprite is automatically flipped on the X axis and it's movement is set to right). For enemies moving along the waypoints, this is omitted and they automatically align themselves according to the waypoint direction. Waypoints allow us to make interesting waves rather than using only linear moving enemies.

Here's one of the early waypoint making images:



So, to make things interesting, we have a combination of hand made enemy patterns, procedurally generated enemy waves of one or more enemy types, randomly (but with a distributed chance) selected spawn locations or waypoint movement patterns and different boss variations. To make things even more interesting, there's a slight chance of events (asteroid field throughout the entire level and such things). Only things predetermined are level bosses (though they are also varied by their types which are basically shooting and movement patterns), and ships carrying power-up which MUST appear every wave for the player to progress. They drop a random weapon/equipment/power-up, which can be changed by shooting it.

The progression level also determines a perk selection screen activation where (similar to crimsonland) you can choose to cooldown your weapons faster, have more damage on energy or bullet based weapons, get a score multiplier etc.

Backgrounds randomly change after each wave (warp) so that's not boring too. They are chosen from the array and removed from the array once they appear. When the array is emptied, it fills again, and background change randomly again. Same thing goes for music.

There it is in a nutshell. It needs a lot more work on testing and balancing, but i hope you will get to play an alpha of an endless mode in a month or two :)

To keep you interested, here's a pic of another faction, the Paragons, which utilize cloaking and phase shifting (basically disappearing and appearing on random coordinates of the screen).

Fat Pug Studio:
Log 5: Enemies

Paragons: 8 ships
Pirates: 12 ships
SunDyne: 5 ships
Terran: 4 ships
Rift Miners: 7 ships
Rokh Raiders: 0 ships

Total: 36 ship + asteroids, pickup boxes etc. The plan is to make about 10 ships for each faction, so that totals to about 60 ships, which is more than enough to keep the endless mode interesting for a long time.

The plan is to make about 10 ships for each faction, though it's a lot of work to make each ship unique in design and attack formations and weapons. So i started modyfing some of them. For example, the Pirate Marine Carrier has normal and elite variant, the other one is tougher, and spits out elite marines.

Regular Pirate Marine Carrier


Regular Pirate Marine


Elite Pirate Marine Carrier


Elite Pirate Marine


So these days are all about designing enemies in a sense of their HP, attack power, bullet patterns etc. After the design of all enemies is complete, i'll start putting them in waves and further tweaking power and the threshold of their appearance. The good thing is that the big part of graphical assets is complete, so the expenses are coming down, so i might even finish the game in under 3k euros.

To keep things interesting, here's a little gif of player being shot by EMP weapon. Doesn't do much damage, but you're pretty much screwed if screen is already full of bullets. Probably gonna tweak it a bit.


Fat Pug Studio:
Log 6: Small Recap

Well, i think it's about time to (after a year of learning and developing) tip the percentage of game completed to 20%  ;D

Anyway, my last devlog was 4 days ago, and i started tracking things more seriously.

Small tasks are in Wunderlist, so they can be quickly added and quickly disposed of in any time and anywhere. It's also quite convenient for jotting down a quick idea.

I use Trello for communication on ideas with the artist and keep all the stuff there for a sense of visual direction.

Since Unity implemented the cloud collab stuff, i can also write down stuff i did and see it in collab history.

There has been quite a few problems, but also a few acomplishments in the last few days, it's actually pretty great to go through the list and see all the things you have done, keeps you motivated.

So here's the list for the past 4 days:

Design of the swarm missiles weapon, though it may require an overhaul to make them more random with some sort of unnecessary crazy loops to compensate for their number.

Design of the Randomizer (work title) weapon which shoots a lot of particles but to compensate for their number they move in a random forward pattern.

Design of the shield with regeneration timer and connection to the shield integrity bar. Still needs connecting to the heat transfer mechanism (when you get hit, shield takes the damage, but your heat level increases).

Design of the Auto Cannon Drone. It tracks closest enemy, rotates towards it and fires. If on enemies are present, it stops firing.

Design of the Ripper, basically a manual shooting shotgun, that was pretty easy. It shoots as fast as you can click, but it heats a lot.

Design of the Flak Cannon. Like the real Flak, it has proximity activated "fuse". At the certain distance from the enemy it explodes and blasts into a lot of small pellets.

Design of the Proximity Mines. We got regular mines just floating in space, but i decided to put a bit more challenging ones. When you get near one, it starts slowly moving towards you until you destroy it. I also designed the EMP mines that will work the same way, but deal less damage and f*** up your screen with glitch effects. Also updated the mines with random rotation and blinking red light so they're a bit more interesting looking and easier to spot.



Artist started working on explosion for destroyed enemies, explosions for bullets, and bullets themselves. There's already a lot of ships that require a lot of time for movement and shooting patterns, so we put the design of the next round of ships on hold until the existing ones are finished.

Tons of bug fixes, as usual.

I'd post a gif as usual, but everything's done with placeholder graphics, so i'll post something juicy next time.

Fat Pug Studio:
Log 7: Swarm Missiles

I don't know how smart is to waste 4 days on a small feature such as one of many weapons in the game (especially with only few months remaining), but i just can't do things half-assed.

Here's the old one, which wasn't quite satisfying. The rockets seem to go in a predefined pattern, not randomly.



Here's the new one, so much better. Sorry for the framerate, i'm still not using sprite atlas so there's a lot of draw calls. That will have to be the next thing to address.

Fat Pug Studio:
Log 7: Upgrade system, weapon switching, and a word on visual scripting

It's been almost two weeks and i've been very busy with my day job so i didn't manage to spare too much time for game, but i finally finished (for me) a very complicated thing - upgrade and weapon switching system.

Player starts out with one weapon. During the game he can pickup a variety of weapons from destroyed cargo ships. The first time he picks up a weapon, it is added as a second weapon, and player can switch between them according to situation (bullet, energy and missile weapons don't deal the same amount to normal, armored and shielded enemies). When another weapon appears as a pickup, two scenarios are possible: if the weapon is already equipped, it gets upgraded and the pickup despawns. If the weapon is already at maximum upgrade level, player is notified via on-screen message and the pickup stays where it is. If the weapon is not equipped, currently selected weapon is replaced (dropped as a pickup, while pickup spawns on player). While dropping the weapon is not very important in single player game and complicates the situation a lot, it is handy in 2 player game, where one player can drop a weapon for the other player to upgrade his weapon. The handy thing is that when a player drops, for example, Hyperblaster Level 4 and the other player picks it up, he'll get the Level 4 Hyperblaster too, not level 1. Since there are (for now) 23 weapons in game and the only way to upgrade them (besides universal weapon upgrade pickups) is to pickup the same weapon, that will be very cool in terms of player cooperation.

Here's a shot of an FSM




Basically, when the weapon spawns, it checks itself if it is a weapon or a pickup (by checking if it is parented or not). If it is a weapon, that means that it is player equipped and it is added to the array and the variable is stored if it is in slot one or slot two (required for weapon switching during the game). If it is a pickup, distance check state is activated. Player can only pick it up if he is closer than a defined distance from it (by pressing space, so no accidental pickups are possible). When he picks it up, it iterates through the array to see if it will replace the existing weapon (if no weapon of same type is found) or upgrade it (if weapon of same type is found). If it replaces it, the existing weapon is dropped (which means it is despawned, removed from array, spawned on location of a pickup with its firing scripts disabled and pickup indicator enabled, while next level weapon is spawned on gunpoint with its firing scripts enabled and pickup indicator disabled).

Weapon switching is, compare to the upgrade and pickup system, a walk in the park. Stored weapons are simply activated/deactivated by pressing the switch key.

Scripting this thing alone would probably take a lot more time than it did, so using Playmaker did the job pretty quick since i can try something out in a matter of seconds, not waiting to write a couple of lines with risk of making syntax errors.

But, here comes the downside. Instead of making the script that can just be copied/pasted on all weapons (have in mind that there are 23 weapon with 3-5 levels each, so that comes to about a hundred prefabs, with more to come), i have to copy/paste an FSM to every weapon and tweak the variables in each one of them. I don't have to tell you that if any larger scale fixes in logic are necessary when all the weapons are already prepared it will be a lot of work to change everything. Not to mention the possibility of making errors when managing such a tedious task.

One more thing i did is implementing the sprite atlas which reduced draw calls a lot, and boosted frame rate from 15-30 FPS to ~150. Now everything goes very smoothly. There are some hiccups, but those are due to extensive logging which is quite necessary in this phase. I also redid swarm missile logic, now they are very cool and fly in a great semi-random manner.



Also, the artist guy did some weapons art for me, some will maybe change, but i thing they're pretty good looking and quite different.



That's all for now, cheers!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version