Hamumu Games, Inc. Hamumu Games, Inc.
 - Home - Games - Blog - Halloween - About - 
  Scripted Comedy 10:47 AM -- Thu August 18, 2022  

I don't know how interesting this is to the average reader, but I do feel like I should try to squeeze some Hamumu game development talk in between my scary scary podcasts. So let me tell you some technical biz going on with the new project!

The game was unplayable for a week or so and is now almost back to where it was before that. So what happened? Well, after implementing the first 15 or so skills, the code was already looking pretty hacky, with special cases all over - "If you get hit by a bullet, check to see if you are currently using Shell ability to block it, then if so, do you have points in the skill that lets Shell reflect bullets? Okay, reflect it". I could see a future of spaghetti stretching out before me. So there's only one solution to that (besides making a simpler game without tons of skills, and that's not me!): scripting!

By implementing scripts, all of that becomes cleaned up and the complexity lies in the scripts themselves (but that's not super complex either). It also opens the door to mods big-time. Anybody can edit these text files to create their own skills, abilities, and heroes. I'm not scripting everything because I don't want to make a super-detailed language that can do everything. For now at least, you're limited to the bullets and enemies that are built into the game (and there's no way - yet - to script your own game modes). But making skills is pretty fun!

For the curious, here's what the script for the Shell ability looks like:

Abilitydef:
	"Shell"
	"Become invulnerable for @1s."
	16	; icon
	2400	; cooldown
	180	; duration
	180,0	; value1, value2
	1	; charges
	"Raising Shell","Reflective Plates","Regrowth","Regeneration","Juggernaut"
On_Hurt: If(AbilityDuration > 0) Cancel Endif End	; cancel makes hurt not occur
On_Render:
	Set(T1,GameTime)
	Mod(T1,2)
	if(T1 = 0)
		Draw(OverGuys,GuysPNG,48,16,32,32,0,1)
	Endif
	End
So that's pretty simple. If you know a bit about coding, you can interpret that fairly easily (the On_Render function is simply drawing a flickering shell over you, by drawing it every other frame). The five names in quotes are the skills attached to the ability. It's a bit of a cross between assembly language and C, whatever was easiest for me to implement! The Abilitydef section though is simply a bunch of data. It would've been pretty annoying if you had to actually script that part, like "Set_Name("Shell"); Set_Icon(16);", etc, etc.

And just for good measure, check out the reflect ability I mentioned!

Skilldef:
	"Reflective Plates"
	"While ~C1Shell~C0 is active, ricochet bullets for @1% of their damage."
	10,3,
	100,150,200
	0,0,0
	0,0,0
	0,0,0
On_Hurt: If(AbilityDuration>0) 
		ReflectBullet(V1) ; multiplies the bullet's damage by this percentage
		Cancel 
	Endif 
	End
As you can see, the more complex things are just simple functions you call (you don't even have to specify which bullet, it can only operate on the bullet that caused the hurt script to be called). So what you can do in scripts will be a bit limited, but since I'm going to use these scripts to make hundreds of skills myself, I'll eventually implement most things you could ever want to do! It's a fine line to walk between making it good for modding purposes and making it quickly so I can actually finish a game. The best for modding would be to script everything, right down to the bullets, but that's the opposite of best for getting the game done. Now I gotta get back in there and get the unimplemented skills back in action so I can finally move on to some new stuff!
2 commentsBack to top!
  Recent Biz 11:37 AM -- Wed August 3, 2022  

Feels like it's been a while, and I see it has, because it's been over a month! Let's see how the project is coming along...

New Project (title's a secret!) is moving along. Slower than I would like for a simple game, but I've built a ton of important infrastructure in GUI stuff, fonts, and so on. It is definitely not a game yet, but it has a fun feel. It is a top-down twin-stick arena roguelite shooter. There are a variety of heroes to play (well, one so far, but you know), with different skill trees and weapons. The skill trees are kind of the unique feature - usually all the upgrading in a game like this is about randomly choosing one of three upgrades. We have that here, for the weapon upgrades, but we also have the skill tree for a more fixed build aspect. You might want to adjust your build based on which weapons and upgrades you get.
This is the main menu, and as you can see, we plan to have several game modes, but currently they are all "20 Minutes Till Lunch" (which in itself is nowhere near done). As you may be aware if you have seen 20 Minutes Till Dawn (a game I recommend highly!), the game modes are sort of parodies of popular roguelites. Or at least some of them are. I have some ideas. 20MTL is a simple 20-minute survival against demonic foods, with fixed waves. At the bottom, you can select which hero to use (Bug Queen being the only one that exists so far), which weapon to use as their primary (you can gather five weapons as you play, but you start with one), and which special ability to use. The Bug Queen and her primary weapon, the Infestor, are actually at the more exotic end of the spectrum, definitely not the stuff you'll start out using. I wanted to start there to just dive into the deep end and implement some of the more complex skills and upgrades, so that when I go back to the simpler characters I can just buzz right through and not have a lot of special cases and new abilities I haven't already handled.
And here's the upgrade funtimes! Your skill tree has 3 columns, each with a different focus, and then you get a 4th column to upgrade your ability. You're definitely not required to match a particular weapon or ability with a particular hero, but there is some connection between their skills and their 'native' ability and weapon to encourage it (in this case, Bug Queen's left skill line is all about dealing damage over time, which means the Infestor is an ideal weapon for her). As you can see by the row of 3 swords at the bottom, I haven't implemented all of Bug Queen's skills yet. But I did make all the skills for Shell! Shell is a long-cooldown ability that gives you a decently long period of invulnerability. My favorite skill for it is Juggernaut - while it's active you can just plow through enemies and fling them aside, dealing big damage. The Lootbox at the bottom of the screen is how you upgrade weapons. When you kill enemies, they sometimes drop lootboxes, which give you the traditional choice of 3 weapon upgrades or new weapons. Weapons can also be leveled up (level ups appear in the lootboxes), all the way up to level 99 if you're playing a shockingly long game mode (as the name implies, 20 Minutes Till Lunch is not shockingly long). The level ups slowly increase the damage for the weapon, so you still have some way to get stronger at those really high levels when you've maxed things out.

Everything I do is a little slow these days as many other parts of my life require attention. Two of those are worth noting here: The Hamumu Halloween Home Horror Hoedown is on the way back! Theoretically! We've decided to try doing one a week forever and ever til death do us part, instead of destroying our lives for a month of every year. Of course, we decided that about 4 weeks ago, and since then, we've recorded 3 episodes, and watched a 4th movie, but I have yet to fully finish editing any. So once it does get going, I'm not so sure you can trust it to be exactly 'weekly'. I really love the conversations and the watching, but man, the editing is not in my wheelhouse.

In other news, the Rock Rose Foundation, which is the foundation my wife and I created over this past couple years, has finally opened up for grant applications! So if you are a non-profit operating in the area of Bell County, Texas - or just know somebody who is - check it out! We want to make Killeen and Bell County an amazing place to live. That's been a very big project for the last 18 months and it's very exciting to finally reach the point where we can actually give out some money.
Comment on this entry...Back to top!
Copyright 2021-2023, Hamumu Games Inc.