How do i make an scroll boss? #345
Replies: 1 comment
-
|
The boss part is easy... basically functions like any other boss. It's the looping scrolling that is tricky. The basic gist is that you need to design a section of your level to be able to repeat itself. This should probably be at least 4 screen lengths wide, but you wouldn't necessarily do wrong by making it more. Depends on how you want to structure things. When you reach the last section where the repeated piece of scenery is, you simply push the character's X position back by however many pixels worth of tiles it takes you to get to the repeat point. Now where things get tricky is you need to manage two things... 1 - the camera position -- I haven't examined our camera code too much. @Daniel-Cortez has spent some time looking it over, but I don't recall how we handle camera smoothing. It's likely if you simply try to update the camera position immediately the camera smoothing will make a problem of things. I'm not sure if you can manually change the positional variables associated with camera smoothing in Godot or if that's even relevant to how we do things, but if so the ultimate answer might be turning off camera smoothing during your auto-scroller segment (which probably makes sense anyway, but might be tricky to do so smoothly into the boss fight) 2 - parallax background -- If you reset the player's position on its own, the parallax background will not match up with your loop point. You can probably fix this by adjusting offsets in the parallax layer, but this could also be tricky. An easy way around it might be to come up with a way to hide the seam between changing your method of doing parallax backgrounds all together. The player's camera is created within Player.gd and the relevant code for it is in PlayerCamera.gd ... at least in the most recent Player-Refactor branch. Not 100% sure how we were doing it before, but it would either have just been a normal Camera created in the same fashion in Player.gd or else it might have been a Camera node within Player.tscn. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How do i make a scroll boss with a looping level, like Studiopolis zone act 1 boss?
i see that the game doesnt have a camera node
Beta Was this translation helpful? Give feedback.
All reactions