How to test a level halfway without completing the first half?

Hi,

When I want to test something of my level (which I have to do non-stop because everything has to be timed perfectly), I first have to complete everything that comes before that part. Let’s say I want to test the level when being at 75% of the level. Then I first have to complete (play) everything that comes before that. Also I can’t just place my player halfway the level because everything is synchronised with the music, which starts at the beginning of the level. So what can I do to do quick tests, to see if the blocks are well timed with the music?
This is, without the scenery, how my game looks like so you can imagine what I mean:

As you can see, on the last part it isn’t synchronised. If I want to change this and test it, I first have to do the whole level again (and this is only 1/5 of the level).
So how do I test it immediately halfway?

So… there isn’t really a ‘simple’ way to accomplish what you want.

And how you do it is highly dependent on your game’s structure.

For instance, the game we’re currently on is a survival horror, which is basically a full map where regions are locked off and you go through branching sequences of events. To test out halfway through, we basically structure our events as GameObjects that are ticked off as you complete them one by one. So if we want to go to 50% in, we just disable the GOs that represent the first 50% of the map, and teleport the player to that position.

But your game on the other hand is so specific to what occurs before it. I don’t know what I’d do structurally to make it work. Maybe insert checkpoints along the way (dev checkpoints)…

Basically you test the game, you get 6 or 10 blocks in or whatever, and you know those are all timed just right, so you drop a GameObject there with a dev script that denotes what time you ‘should’ be at when you get to that point. Then in the Start of that script you teleport the player to that location, faster forward the music to that point, and do maybe any other stateful stuff that you might need.

Now disable that script and press play to start from the beginning, enable it and press play to start from that point.

1 Like

Alternatively, speeding up time by changing the time scale might be an option?

Maybe a good project to try 2017.1 timeline features with?

Thanks for the reply. I was also think about dev checkpoints. The only hard thing is the music. Is it possible to have a checkpoint which als sets a checkpoint on the soundtrack?

But then it’s really hard to complete the level because it’s going so fast and besides that, the soundtrack doesn’t speed up.

Didn’t know about that yet. Do you think it can work for this? If so, I could try it out tommorow. Isn’t it only for cutscenes?

Wow… A bit offtopic but I literally just got a copyright claim on that video because of the music… does this mean I can’t publish it on google play…

Can only go off what I’ve seen in videos, but I’m pretty sure you can put audio on the timeline, so synchronising could be done by eye on the timeline to waveform peaks.

If you don’t own or have appropriate licenses to the music, yes it means you shouldn’t use it.

2 Likes

Yep, if it does belong to someone, then you can’t use it (not a legal battle you want to fight I’m sure). But it depends on the license behind the music. If you found it on a site that provided it for free use, then you might investigate the claim, but that might not be worth the trouble.

Well it said I got a claim, but it doesn’t have any effect, it will only cause some ads on the video which will go to the company. I will contact them.

If your game is going to support a saving system, now is as good a time as any to implement it.

My game will save the highest score (most percent of level finished) but you won’t be able to play starting from that score.

Anyone an idea?

Well, it really sounds like you’re going to have to force your music to skip ahead to some point, and you need to find ways to make that happen.

Try changing the audio position using AudioSource.time (may or may not be accurate, may need fudging for debugging purposes).

Or do it manually if you have to with extra music clips for debugging purposes (i.e. take the entire music track and trim the first part to correspond to where you want to place yourself at).

If you’re looking for an elegant or simple solution, I’m not sure one exists.