A downloadable extension

Download NowName your own price

AssParser is a free extension that adds subtitle support to video playback in GameMaker using Advanced SubStation Alpha (ASS) files.

For creating and modifying .ass files, I recommend Aegisub. It's free, open source, and you can use it to convert nearly any subtitle file into an .ass file.


Not what you're looking for?

This extension is specific to video playback, not audio. If you're looking for subtitles that pair well with in-game audio, check out Subtitle Workshop by Mytholite.


How does it work?

It's extremely simple:


and then draw the current subtitle however you want using


This way, you have full control over how your subtitles are drawn!


Anything else?

The second argument in video_open_ext is optional. If you don't provide an .ass file, AssParser will automatically look for an .ass file with the same name as the video file.

Lastly, you can retrieve more than just text from .ass files. A typical .ass file will store lots of information per line of dialogue:


And we can access any of this info using

This is important because it lets us access the "Name" key. Suppose you want each character in your video to be subtitled in a unique font color. You might consider doing something like this:


and as long as each line of dialogue has a "Name" associated with it (in Aegisub, this is called an "Actor"), each line will be drawn in the appropriate color!



Why not just edit subtitles into the video itself?

I wrote this extension because one of my projects includes several high-definition cutscenes, and we're planning to subtitle them in multiple languages.

These video files take up a lot of storage space, so having separate video files for every single supported language would be ridiculous. Using subtitle files lets us minimize the amount of unnecessary storage space the game takes up, and it opens up a lot of possibilities with regards to accessibility.


Example project:

Included with the extension is an example project with an example video:


Me at the zoo is licensed under the Creative Commons Attribution 3.0 Unported license. It was uploaded to YouTube in 2005 by Jawed Karim at the following link: https://www.youtube.com/watch?v=jNQXAC9IVRw
Published 9 hours ago
StatusReleased
CategoryTool
AuthorDecadeDecaf
Made withGameMaker
TagsGameMaker
LanguagesEnglish
LinksSource code

Download

Download NowName your own price

Click download now to get access to the following files:

AssParser.yymps 800 kB

Comments

Log in with itch.io to leave a comment.

(2 edits)
Script: get_subtitle_data at line 1 : Fatal Error while compiling - bailing details below
Script: get_subtitle at line 1 : Fatal Error while compiling - bailing details below

I get these errors (no more info) when I try to run the yymps example. It looks like the error is in the AssParser itself, as I get this error even without a single object on a room.

I'm in the ver2024.13.1.242

Maybe it's just me and my horrible computer? Idk

(Edit) It looks like it works on the Beta version of Gamemaker but not in the LTS version, or at least for me. My hypothesis is that maybe there is either syntax that is not supported on the LTS version inside the code or it uses some newly added function.

(+2)

h,aha as s like  the thing