fath11 YouTube channel: https://www.youtube.com/@fath11encoded/featured
fath11 Cocrea: https://cocrea.world/@Fath11
fath11 Scratch account: https://scratch.mit.edu/users/fath11/
What is "TrackMaster"?
"TrackMaster" is a track drawer that provides a visual interface for users to draw and adjust tracks easily. Users can also set how long each track should be. This tool allows users to create custom character paths and give the project an alive vibe.
What can TrackMaster be used for?
Make your game feel more alive
You can make butterflies, bees, lights, and more move around a scene to make it seem more alive.
Make a path tool
Due to how TrackMaster stores its tracks, you can make a code allowing the user to create a custom path easily. This will be discussed in the advanced section.
How to use TrackMaster?
You can install the extension by going to the extension tab on the left side in Gandi IDE. If you have any troubles, you can go to our discord server.
Drawing a track
Use this button to make a new track.
First, name your track.
Draw your track by clicking and dragging the mouse on the white canvas.
If unsatisfied with the path, you can redraw the path with the Redraw button, which will clear the entire canvas.
Or you can edit the track and move the dots around. You can also right-click on the dot to show some edit options.
With this, you can:
- Mark a point - You can put in any name you want for the mark.
- Split tracks - You can use the left menu to focus on different paths and edit them separately.
- Delete a point - The other points will automatically connect to another point, as shown below.
Set path duration
You can change the duration of a path by hovering over a path on the left side to make it longer.
Delete a path
Make sure you are not editing the path you want to delete. Then, you can hover over them. On the path list, click delete.
You can also redraw a path at any time you want.
Editing saved tracks
You can edit a saved track by pressing this button on the block palate.
Then, all your tracks will be listed here.
Currently, there is no way to rename or delete tracks. If this feature were implemented, this doc will be updated as soon as possible. However, there is a way to do this unofficial-ish, which will be discussed in the advanced section.
Playing tracks
This block can change the duration of a track.
Use this block to play the track. Depending on the duration, you can also set how fast the sprite should go.
If the duration is 1 second and you set this block to 1 times the speed, the track will finish in 1 second while 2 times the speed will be 2 seconds.
This block will be triggered when the sprite moves to a marked point. You can use an “If” block to check the name of the mark the sprite will move into.
Advanced section
How does TrackMaster store its tracks?
TrackMaster formats each track as follows:
[
[PATH DURATION,
[
{"x": XPOS, "y": YPOS, “mark”: NAME}, …
]
],
…
]
A path is stored inside an array [] with the path duration at the front, which then is put together inside another array
[PATH DURATION, [{"x": XPOS, "y": YPOS, “mark”: NAME}, …]]
This is what a path looks like. This path will then be combined with the other paths inside another list to create one track.
Making custom track editor
Tracks are stored inside Scratch variables. Any variables that start with GJ_ will be registered as a track.
This means you can modify tracks with Scratch codes and make a custom track editor or even have a track that will update in real time based on what happened in the project.
Using the Not.js extension, here is an example of a script that will add a new point to a track with one path.
You can also write a script that will delete a point, create or delete a path, add new points to a path, and more.
Feel free to use this in your project. Just remix this project: