Game
Micro Adventure in a Dark Alley
8 years ago

Dev Diary #2 about Timelines in GameMaker and annoucement of the demo release


the first Dev Diary can be found Here.

here are some news for you, the demo of Micro Adventure in a Dark Alley is coming before the end of the month I think! Stay tuned, but before that, a word about Game Maker Timelines:

Dev Diary #2: Finding time for Timelines

well, I was hoping to simple give you some news about the development, and I decided that I could go for a more complete article instead, about my primary source of worries these time: Game Maker Timelines.

How I wanted it to work

At first, I have a simple platformer game mechanics for the game. You walk, you jump, you climb up and down somes ladders, and you talk with NPCs. Simple as that. So how to make cutscene without breaking all the game during them? Because of course, since I’m a beginner, I didn’t though ahead of that for the game you know, I went with a platformer and yay I’m happy!

In a perfect world, I wanted my cutscene to be like this: activating some object or starting dialogs would trigger a cutscene, a series of event, movement, sprite changes and sounds, all handcrafted by advance. And, when it would be finished, the player would get the hand again. Seem simple hu? But where to put all theses cutscene? Then I discovered Timelines: a serie of point in time, and for each point you put an action, or a piece of code, and then depending of the speed of your game, when you launch the Timeline it goes from 0 to Xn steps, and for each Xx instant it execute the associated action. It can even Loop. Wonderful, it can make the trick! Here is my first attempt, check out this video, it starts at 00:27:
https://www.youtube.com/watch?v=kAdVrRk7yJo

You can’t see but I made the system to launch the associate timeline to a NPC right after his dialog, if there is any, so after the first exchange (Main Character speaks, then the cat) the timeline is launched and every action until the MC touches the ground and speaks is scripted. but it requires to time every action very precisly, and at that time you could move the player while speaking and it was ugly to see.

Then I faced reality

I made other cutscenes afterward, and the system evolved bit by bit. I needed a simple action from a NPC right after the dialog: check, it was easy. Then I needed my MC to make a monolog by triggering the cutscene from an object, and changing animation for each sentence: ok, a bit harder, but doable… Or I though so. I faced a first problem: when you talk to someone in the game, you have to press action to go on between speaches, like that you won’t miss anything. In my cutscene, it was like that, so at first all the bubble speech were pilling on the screen since the next sentence was drawn before the player has the chance to validated the first one (in addition to the fact that the triggering oject was still usable during the cutscene, so when you wanted to pass a sentence it would launch the cutscene again… what a mess!). I had to rethink the process. At first I made the drawing of the sentence using a timeout, but synchronizing timeline and timeout for each sentence was hard. And I was going for two different way of managing dialogs, it was definitely not the right way.

The solution I found

I needed only one thing: to pause the timeline, waiting for the player to lanch it again by pressing the action button. And I discovered the horror: Timelines are bound to the object which launch them (I though that it was instanciated like any other object of Game Maker). So the timeline could not pause itself, and the speech management in the cutscene could not pause it either because it was launch by the “classical” speech management. My brain was hurting. But it doesn’t.

My solution may be not perfect for now but it fit my needs (for the moment :) ). What I do is when I launch a timeline, I use a script that tell a Timeline Manager objectto launch it. Then I can access to it from where I want to pause or unpause it. From now it manage only one Timeline, but I’m sur I will need to upgrade it.

With this I can pause or unpause the Timeline from wherever I want, just watch:

5d0b78e94828c.gif

(Sorry for the mix between french and english dialogs, some are still hardcoded for cutscenes)

During my tutorial I use a cutscene to, while my character is blocked because it is a cutscene, allows the player to interact during it. I pause the Timeline, wait for an input, and unpause the timeline when I receive it. It gives me the opportunity to make the cutscene a part of the game. Since it will be short, I was unsure that put cutscene instead of gameplay would be a good idea. This way I can do both.

I’m still struggling with a problem though, that is my cutscene won’t do the same thing depending the time they are started, but it is probably a matter of init values of some sort, I’m investigating, but for the rest of the development I confident about the cutscene system I have :)

Goodbye, see you next time for another dev diary of me facing an amazingly simple problem about game development ;)



0 comments

Loading...

Next up

New environnement sneak-peek: the sewer area

Chiaki Nanami!

Path of Kami: The Evolution of the Lore

In the quest for accessibility, I'm adding Resurrection Shrines for players on the 'novice' end of the platforming spectrum.

In order to unlock the power of a Shrine, you must collect 3 'Souls' from your dead corpses! (the floating blue orbs)

Strange Umbrella

Levels' maps.

Who's is this little cutey👸 here? Thanks🙏 for a gorgeous fanart @WheNa! Feel free to share your arts, screenshots, or videos with #playzelter or #zelter hashtags! #pixelart #animating #unity3d #animated #indiegames #unrealengine #animate #conceptart

Path of Kami, running around the shrine area

Only true badasses may pass! #conceptart #art #gamedesign

Got some fun collectibles in our game, Path of Kami!