Game
Hensen Hopper
1 year ago

Okay so I've now gotten a much better spawning script put together! To fix the bullet firing effects, I've written an accessor that returns true if something has spawned since the last accessor call, it's a cheap solution, but it works, at least for now!


image.png

Above is the script I've replaced the old PrefabSpawner script with, if anyone's curious. It's a pretty simple script containing two methods:

  1. Spawn(GameObject gameObject) does exactly what it's name implies, instantiates (spawns) a copy of whichever game object is passed into the gameObject argument (everywhere I've used it uses prefab objects in my project directory but it's theoretically possible to use existing objects in the scene I now realize!) at the position and rotation of the spawner. If you read the method in the screenshot, you'll probably see it also sets the private boolean member spawnFlag, which is used for the second method, to true.

  2. GetHasSpawned effectively returns true if the spawner has spawned a game object since the last call to GetHasSpawned. How it does so is fairly self-explanatory if you read the method above. This exists solely to be read by the script handling the bullet firing animations and SFX which triggers both of those when the bullet spawners attached to the player and enemies spawn bullets by checking GetHasSpawned's return value once per frame update.

The original PrefabSpawner script I had would spawn a predefined prefab when triggered to, and this worked just fine for the bullets (which use the same spawning script as the enemy columns) however, it became counterproductive when I began trying to implement the upcoming beetle enemy. The versatility of this new spawner will make implementing new enemies and furthermore new ammo types (which is something I have planned for the future as well O.O) a lot easier and more intuitive.



0 comments

Loading...

Next up

I did get a lot more done on the backdrop yesterday, by the way! It's not finished by any means, in fact, it's quite empty and even ugly in some places, but it's beginning to come together!

This is just about the only situation in which I'll ever do this. I almost never put multiple calls to methods on the same line but here I've logged a warning to remind furure me to do something I didn't have time to do today in a glaringly obvious way.

Close-up of the re-shaded Hensen!

Doki Doki Literature Club is celebrating Monika's birthday and the 8th anniversary of DDLC with exclusive stickers, avatar frames and backgrounds on Game Jolt! 

Head over to the shop to collect yours 👉 https://gamejolt.com/#shop

Here's a short video showing off the improved gameplay loop and "stage complete" screen. The updated artwork for Hensen and his gun and the honey bullets can also be seen.

Play @pm-studios ' Bandit Trap Open Beta!

Grab your rocket chairs, vacuums, and toilet tornadoes! Report one more time for our final beta! Live through March 23rd 6 am CET.

Complete quests based on the game!

Play the beta: https://bit.ly/BanditTrapBeta

This is a short video showing off the new procedurally generated enemy waves in Hensen! In theory, the game will become more and more unpredictable as I continue to build and implement new enemies!!!

Been working on the artwork for the "stage complete" screen all morning! Right now I'm improving the shadows/shading for Hensen because he is a part of that screen. I do need to work out the contrast between the text and the backdrop image, I know.

BIG NEWS: Your Bandit can wear a Game Jolt hat and shirt in Bandit Trap!

Defend your home or steal treasure in the open beta: https://bit.ly/BanditTrapBeta

It ends on March 23rd at 6 am CET!

I've worked out a process for drawing bushes that I'm using for the backdrop! First I draw the branches, then "paint" where the bush texture will be, copy it's alpha to a new layer in white, then draw it's shadows in a layer over the bush layer.