Logo
  • Features
  • Educators
  • What's New
  • Blog
  • Showcase
  • About us
  • Contact
Try it now!
TrackMaster
🖍️

TrackMaster

✍️
This document is created by fath11 from Gandi IDE community and edited by Gandi IDE Team.
image

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

image

Use this button to make a new track.

First, name your track.

image

Draw your track by clicking and dragging the mouse on the white canvas.

image

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.

💡
Please remember that a track can have multiple paths in it. One track can support up to 8 paths.
image

With this, you can:

  • Mark a point - You can put in any name you want for the mark.
image
  • Split tracks - You can use the left menu to focus on different paths and edit them separately.
Path 1
Path 1
Path 2
Path 2
  • 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.

image

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.

image

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.

image

Then, all your tracks will be listed here.

image

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

image

This block can change the duration of a track.

image

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.

image

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.

image

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.

image

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:

Custom track editor asset by @Fath11 /Scratch project hosted on Cocrea.

Welcome to play My Project Hosted on Cocrea.world, powered by Gandi IDE.

cocrea.world

Custom track editor asset by @Fath11 /Scratch project hosted on Cocrea.
💡
If you have any questions or suggestions, you can find us in the discord server: https://discord.gg/U3nyveCvRa
Logo

Designed by 2ndR with love

Discord