Before we begin...
No: this isn't a filler post.
I honestly just, really like talking about this kind of stuff, and I know there are fans of my work who have shown interest in the past about the insides of my games.
Since this game has a decent following, I figured some of you guys would be interested in this!
NOTE: this article doesn't really talk about anything new in regards to the game's "public development" (a.k.a. this is nerd shit you probably don't care all that much about), it is simply me discussing some interesting parts of the games code that I'm proud of!
Please enjoy my ramblings!
Discussing the Cutscene system...
![image.png image.png](https://m.gjcdn.net/content/750/18436720-zsw7gyff-v4.png)
Without spoiling too much, I'd like to talk about how our dynamic Cutscene engine (massive kuddos to my assistant programmer, TheEternalShine, for making this.)
Rather than how I used to do it in GameMaker Studio (using an alarm with listed states and wait-times), this allows me to program a entire, full-length cutscene in one event, which can then be run sequentially, as if the computer was checking off a list.
For example...
var c = cutscene_create();
c_addDialog(c, "* Hi! This is a test!");
c_startDialog(c);
c_playAudio(c, snd_select, 0, false);
c_addDialog(c, "* Didja hear the sound?!{sleep 20}&* Crazy, huh?!");
c_startDialog(c);
cutscene_start(c);
This is a fairly basic cutscene that:
Types out a introduction string.
Waits for the previous dialog to be destroyed (after reading.)
Plays a sound.
Types out a reaction string.
Waits for that dialog to be destroyed (after reading.)
Ends the cutscene automatically.
There are a plethura of other functions, as well as the ability to make your own using cutscene_custom
, which (ironically) all other functions use to actually run!
For example...
![image.png image.png](https://m.gjcdn.net/content/750/18436914-pbyrccj2-v4.png)
TML, the original creator of the engine we use, has a built-in GMU system, that allows you to make complex animations, call external strings/images, and more. I converted one of the functions, Anim_Create(...)
, to a script that I can run mid-cutscene, and depending on an optional argument at the end of the function, I can make it wait for the cutscene to conclude or just immediately conclude once the animation begins.
Cool, huh?!
Discussing Language support...
![image.png image.png](https://m.gjcdn.net/content/750/18436978-iwn4ddts-v4.png)
As briefly mentioned before, TML's GMU features houses functions that allow you to externally call text and what not. We decided to make a Japanese translation with the help of our small translation team using this system
![image.png image.png](https://m.gjcdn.net/content/750/18437130-nxzfvwmv-v4.png)
It's been brought up how simple it would be to allow for custom language support, which I may or may not implement in the future. However, text is very simple to implement/modify in this engine, which is very helpful when working on the aforementioned cutscenes.
Would you guys want language support in the future?
Discussing why I hated Puzzles (character arc)...
![image.png image.png](https://m.gjcdn.net/content/750/18437157-8sdgndev-v4.png)
In Undertale, a core component of the gameplay are the Puzzles. However, across my last 4 ~ 5 years of programming Undertale fangames, I've always tried to avoid them for whatever reason.
Maybe... I was intimidated? Worried that they might be too simple to solve? I'm unsure, but I attempted them recently and to my complete surprise: this shit was easy.
![image.png image.png](https://m.gjcdn.net/content/750/18437246-khhhmjwd-v4.png)
My puzzle system is composed of two parent objects:
A key object.
A lock object.
To absolutely no ones surprise, the two interract by the keys
unlocking the lock
as specific states are matched. For example, in the image above, you can see "Frisk" has pushed the rocks onto buttons. Those buttons are our key
objects, and the spikes that are unlocked is our lock
object.
![image.png image.png](https://m.gjcdn.net/content/750/18437359-i6vkcmbx-v4.png)
In the room, the creation code of all three of our keys
state that they're targeting inst_62A9EFF7
, which is our lock
object.
![image.png image.png](https://m.gjcdn.net/content/750/18437392-mgaeeiks-v4.png)
In our lock
object, there is some very simple code:
If
unlocked
isfalse
, continue.If
locks_opened
is greater than or equal to the required amount of locks, continue.Run
event_user(0)
, which basically runs a custom function (if supplied), usually of which a cutscene.
There's a few other things, but hopefully this gives you a good idea of how puzzles work. I dunno if this is how Undertale did it, but it works really well for me.
In conclusion...
![image.png image.png](https://m.gjcdn.net/content/750/18437438-tvtsjr8v-v4.png)
Underswap's doing great!
I'm hoping to get the demo in a somewhat playable state by the end of this year for playtesting and bug-hunting.
Here is what I mean by "playable state":
Multiple encounters
Story events fully implemented
Mostly finished sprites/music
At least placeholder dialog for everything
Achievable endings
So far, I have quite a bit of every one of those programmed in, as well as much more! It still baffles me just how much we have gotten done in the past few months.
Again, we cannot thank you guys enough for your consistent support! We hope to deliver you guys the best experience we can provide!
![image.png image.png](https://m.gjcdn.net/content/750/18437519-wweieks7-v4.png)
- jevilhumor, 11/15/2022
9 comments