OperaGX Game Jam – The Process – 8/11/21

Aug
11

OperaGX Game Jam – The Process – 8/11/21

The deadline for the project was getting close… Only a couple of days left to get my project polished and ready for submission to the contest. In this update, I had tweaked several things. But, the major update was adding the required multiplayer mode, to accommodate two players(both using the keyboard for controls in-game).

First off, I made a couple of tweaks to the intro screens, for the instructions, and credits. I needed to switch up the instructions screen, and have one for the single player mode, and another set of instructions for the multiplayer mode. So that players would know their controls as they did in the original single player mode, before the gameplay actually begins.

As far as the sound effects I had added the previous day, I made some adjustments to those as well. I switched out the Menu/GUI sounds for the button highlights, and clicks, to use something I felt fitted the atmosphere of the game better than the previous sounds. Along with that adjustment, I tweaked the playback volume of different sounds in GMS to start balancing everything out. The turrets were pretty loud, and the abduction sound effect was a little loud as well.

The multiplayer mode was the biggest update on this day in particular. There were several options/routes I could have taken to implement a multiplayer mode, but I kept it simple for the sake of only having a couple more days to test and check for bugs. Speaking of bugs, you will see something added to the GUI in the gameplay video below. You will see “Beam Count” in the upper right hand corner. I was having issues with the abduction beam bogging down the game performance, as it was creating beams during every “tick” of the game, thus creating thousands of beams over about a 10 second period.

This was a major drag on performance, and slowed everything down tremendously if the player decided to hold in the space bar key for a never ending abduction beam. So I was basically printing/writing the amount of active beams on the screen using a variable and text object in the script, so I could keep track of the current “beam count” while playing the game. I was able to limit it to 60 instances per player, using a section of code/script to destroy the beams created every tick. The game would keep on making more beams as the button is held, so this repeatedly “destroying” of the beams was/is not visible to players. As, the new beam would immediately overlap the previous set of beams.

This is a very good strategy if you are trying to work out performance issues & bugs. Simply print the amount of particular objects to the screen somewhere. I used this troubleshooting method multiple times during development, to make sure projectiles and airplanes were being destroyed when they left the gameplay screen, as well as track the current speeds of projectiles/airplanes while tweaking the timer loops, among other things, as I tested and worked out different bugs along the way.

Alrighty…. Back to the major update in this version. The multiplayer mode. As I mentioned earlier I decided to keep it as simple as possible to implement, and went for a co-op style multiplayer in the game. I just basically copied the player object and created a second player object, and changed up the HP bar above the second player, so you can easily see who is who while playing. Other than that, I remapped the buttons for the first player, and mapped some new buttons for the second player to use as well(remember, all controls had to be on the keyboard only). Then set it up so the players’ scores would add up together, creating a single high score at the end.

After that, I copied the turret and projectile objects, and created a second set which would target the second player, and used the same variables for the timer loops, for turret shooting intervals and projectile speed. As far as the airplanes go, they pretty much stayed the same, except rather than initially setting their target for player one’s x & y position on the screen, I had them aim for an invisible object moving back and forth about a quarter or third of the way up the game screen(from the bottom up). This allows them to still head towards the players in the bottom half of the screen, without targeting player one(which caused a bug if player one died before player two did(there was nothing to compare x,y coordinates to if that happened)). I also made the turrets destroy themselves when either player died, as that caused a bug as well as there was nothing to target each time they would shoot. I could have scripted them to switch target to the single player left, but time was not on my side to troubleshoot further bugs.

Progress as of 8/11/21 (Make way for Player Two!)
Progress as of 8/11/21 (Make way for Player Two!)

About Colin

Check out ColinLitchfield.Com

My other website is located at ColinLitchfield.com where I offer tips and tricks, motivational posts, how to guides, and training classes on game design & development.

Recent Posts