How To

How do I play music for my game?

0

DJMoffinz 2019-10-28 01:58

Yes, this is another question about my new Slither.io style game. I wanted to know how I start my song that I made in my game. If you know how please comment down below, I’ve tried the MUSIC command but the song won’t start.


Timo 2019-10-28 18:19

Make sure you created patterns in the song file and set the loop start and loop end markers if you want repeating music. And don't forget to save it ;)
Then the MUSIC command should work.


was8bit 2019-10-28 19:52

Post an update to your game so i can see what you have so far :)


DJMoffinz 2019-10-28 21:49

@was8bit
Will do!


DJMoffinz 2019-10-28 21:50

@Timo
I’ll check that.


DJMoffinz 2019-10-29 03:13

@Timo
But where do I put the “flags”, and how? Is it code? Or in the sound editor?


was8bit 2019-10-29 06:50 (Edited)

In Sound Composer, you see the DISK icon at the upper right corner... the next 3 buttons to its left are, SOUND edit, TRACK edit, and PATTERN edit....

SOUND edit of course edits different sounds
TRACK edit allows you to add different notes and such to a track
PATTERN edit lets you arrange different tracks in a certain order

While in PATTERN edit you will see (below the disk button) 3 symbols... a right pointing arrow, a left pointing arrow, and a square...

If want a pattern to stop play when it is finished then tap these until the SQUARE is lit
If you want a pattern to play one track forever, then tap these until BOTH arrows are lit

If you want a pattern to go back to a previous track, then tap these until the LEFT POINTING ARROW is lit..
... then go back to a previous pattern where you want the "go back" to start playing again and tap these until the RIGHT POINTING ARROW is lit..


DJMoffinz 2019-10-29 07:00

Ahh, I see now, thank you so much for explaining! I’m still getting used to the sound composer but I think I’ve got the hang of it now! Ur the best.


DJMoffinz 2019-10-29 07:05

Wait does lit mean it’s white or green?


was8bit 2019-10-29 07:13

White


was8bit 2019-10-29 07:15

Glad to be of some help :) i cant really compose much but i fiddle around abit with it ;)


DJMoffinz 2019-10-29 07:20

Thanks but the MUSIC command still doesn’t work, idk what number to put after it.


was8bit 2019-10-29 07:23

Assuming you are working on the music in your snake program, just upgrade your snake program with your music file and i can better help...


Timo 2019-10-29 07:23

It’s the number of the pattern where you want to start. Usually it’s 0 if you have only one song.


DJMoffinz 2019-10-29 07:34

@was8bit, Timo
Ok, thank you both for your help!


DJMoffinz 2019-10-29 07:34

The music is for the title screen btw though I’ll add it anyways.


gamer_12321 2019-11-01 08:18

Write
MUSIC
then write your pattern numer like :
MUSIC 3

Example of code :
REPEAT
MUSIC 2
WAIT 260
UNTIL START=1


Log in to reply.