PDA

View Full Version : Custom Music Follows Player Through Level



deboerdave
03-15-2009, 07:59 PM
PSN: deboerdave
level: custom music follows player demo

Hi everyone,

i just wanted to share one of my recent creations. I have created a system that allows you to have your custom music follow the player through the level. I still have a few limitations i am want to work out when i have a chance to. Limitation one, the following music is confinded by the square area of the maximum length of piston (pistons can only be 999.9 long) and the second restriction is loss of music when you die if the checkpoint, the origin, and the place you die are not really in line cuasing the the music to return to the orgin while player goes back to check point. this second one has to do with the the censor range having a limited radius (i am using the 180 degree player censor found on the turret from the msg pack.), although i have an idea of how to work around this issue when (and if it)becomes a problem in a level. for the first issue i am thinking of trying to get multiple pistons to work but my first attempt ended up in stuff breaking.

enjoy and let me here if you have any questions or ideas for over coming the limitaions.

thanks for stopping by

PSN: deboerdave
level: custom music follows player demo

Coreymill
03-16-2009, 06:51 AM
I still have a few limitations i am want to work out when i have a chance to. Limitation one, the following music is confinded by the square area of the maximum length of piston (pistons can only be 999.9 long)

Actually ... this is not true.

- In the level I am currently working on I have a piston that goes the entire length of the level.

- As long as you have your 'base' that doesn't move set at the starting point and then move your object which is going to be moving to the furthest distance you want it to be. You can then connect the two objects with a piston regardless of how far apart they are. Then you can just change the minimum length of the piston back to as low as you want. However, you cannot adjust the maximum length after doing this or it will drop the length back down to 999.9.

deboerdave
03-16-2009, 07:59 AM
Actually ... this is not true.

- In the level I am currently working on I have a piston that goes the entire length of the level.

- As long as you have your 'base' that doesn't move set at the starting point and then move your object which is going to be moving to the furthest distance you want it to be. You can then connect the two objects with a piston regardless of how far apart they are. Then you can just change the minimum length of the piston back to as low as you want. However, you cannot adjust the maximum length after doing this or it will drop the length back down to 999.9.

thanks for pointing this out. i will give it a try. i had always put things close together when i was doing it becuase dont like to drag the pistons very far. this is good to know

TJapan
03-16-2009, 11:01 AM
I too had this. my solution to this, (and another problem i came up against) was to collect all of the speakers, and have them follow the player on wheels. then, above the level, have the switches/mag keys and have an emitter emit the cart that drags the keys around.

this allows the player to hear the custom music throughout the level, and even allows for the song to repeat itself.

the problem with this, is if you connect a speaker to a box, like the classic level, and then shrink the boxes and have them follow the player too closely, then the game lags a lot. i'm working on a way to use only 1 speaker for each note though, so soon i may have a system working for that.

Deboerdave, if you like, the mario level is up for you to try when you get a chance. it's locked right now, but you just have to go through the key level first to play it.

deboerdave
03-16-2009, 08:45 PM
I too had this. my solution to this, (and another problem i came up against) was to collect all of the speakers, and have them follow the player on wheels. then, above the level, have the switches/mag keys and have an emitter emit the cart that drags the keys around.


my main focus with building the follow sytem was to produce a system that allows for big drops or high jumps or any other fast movement or rapid change in directions without losing the music. i think that following with a wheel would limit this aspect of what i am trying to achieve. With Coreymills insight about manipulating the the maximum piston length i should be able to go anywhere on the map at any speed and not lose my music now. The cost of my system is that it takes up an entire thin layer, currently i am using the front layer as i never really use that one.

i havent experienced any problem with lag with my sounds, except in the case when i am playing with someone that i have a poor connection too (the sounds seem to lag easier than the game play). In my testing i did run into a lag issue with the sound that was cuased by when i had my stationary music playing and i was testing my follow music simutaniously (in my test level i had copied my my stationary music to modify it to follow me). So here both music tracks where playing although you can only hear one (each speaker set was in a different part of the map so you could only hear one at a time) it was lagging. I think this was do to the game trying to trigger too many sounds at the sametime even though the player can only hear one set the system is trying to trigger both sets. maybe this is something that is contributing to your lag issue??? (to many sounds triggering at once)

TJapan
03-16-2009, 10:57 PM
i'm sorry about the key... i should have tested it right before i published. it'll be fixed in a few minutes. as far as the lag... i'm not sure if it is because of the sounds, it has a maximum of 4 sounds being activated simultaneously... i think it might be because i have each sound on a seperate block, which is quite a lot of vertices for the game engine to handle. so my conclusion is that if you make all of your sounds sit on 1 block, you wont have a bad case of lag.

how do you make something follow your character, without using the brain? i've never sat down to figure it out, but i'm not sure if i could even if i tried...

deboerdave
03-16-2009, 11:13 PM
how do you make something follow your character, without using the brain? i've never sat down to figure it out, but i'm not sure if i could even if i tried...

yeah check out the level i posted this thread for it shows exactly what i am doing.

level: custom music follows player demo
psn: deboerdave

i think maybe you confused this with my side scroll classic demo that ninja said something about the custom music following. This is a totally differnt technique for having the custom music. in the side scroller it was much simpler becuase of auto scroll camera, i just attached the speaker board to the same board as the camera.

to comment on the lag issue, i do put all the speakers on to one piece of square material and it doesnt sound like it should be the number of sounds trigering at once. i should have at least 4 at the same time as well. The first song in the this demo has about 70 speakers i think, they are all put on one piece of square rubber and shrunk down to invisible. the second song in the demo is much less complex and i have an example sound board visible that shows my speaker arrangement.

TJapan
03-17-2009, 11:56 PM
sweet, i'll check that out when i get home from work today. next level with custom music i make will definetly be better, as the mario one was my first attempt at making any music on lbp... :)

deboerdave
04-08-2009, 03:36 AM
i got a new level out using my follow device for the music. Its a new tune than my previous levels and its a short golf level if you guys want to check the device out in action.

level: LBPGolfNA-Par 3
psn deboerdave