All Questions

Community

B
Anthony Base
posted to: What you'll learn

Switching between rooms?

Hi, Nathan. So, from what I understand, this Metroidvania tutorial focuses on the movement mechanics of the character, and that's the exact scope. I bought this tutorial partially to help me become familiar with this engine and get used to creating things according to good programming practices, as you said, and I have confidence in your ability to do that. So, this sort of request is a little bit out of this current tutorial's scope (I suppose you could count moving between rooms as player movement?), but one of my, like, less confident spots with this engine is... Okay, let's say you had a very big level that would take more time to load than a snappy quick tiny room, right? I figure you would want, like, a loading screen, or for only the highest priority things to be loaded first and do a Dark Souls thing where a fog wall limits movement while everything else loads. Both of these cases could be a really good subject to cover in a future lesson or tutorial, I would think? That is, unless Godot just has something internal that could handle that, maybe. I'm very new to the whole thing, is all. I'm enjoying the videos, so far. It's a shame the platform doesn't support subtitles yet (I'm autistic and like reading subtitles while things are explained, but at least I can rewind the video until my brain actually processes the explanation). I actually tried going through the documentation to find a tutorial for this specific feature, but it appears to be too out of date and uses deprecated code that doesn't work anymore. If you end up covering this topic (or already have, somewhere), I'd be more than happy to check this out. It's like easily a thing that beginner developers want to immediately learn.
  • B
    Anthony Base replied

    Apparently, this platform doesn't support paragraphs, either. Or editing your question to attempt to fix the formatting. Sorry that it looks like such a wall of text. I had it separated into paragraphs for easier reading when I wrote it.

  • Nathan Lovato replied
    In 2D, streaming content would be something you only need for a complex open world I think. Working in games, I've seen really big levels run smoothly on low-end hardware without having to do anything special regarding loading. The main thing you want to do for performances is, if you have some complex AI or objects that use a heavy _process or _physics_process function, use a VisibilityEnabler2D node: with it, you can disable _physics_process and other features automatically when the node goes out of the screen. That will give you a big optimization easily. In this project, we split levels into different scenes so you only have one loaded at a time. Whether your game uses a huge open world map or not, you will want to split it into separate scenes like that. Then if you have a huge level that causes performance issues, you can code a system to lazy load levels. I would have to experiment there to see how to code it so that the player doesn't see or feel anything, but the only way to experiment with that is to have that huge map with lots of AIs and objects in the first place. Until you have something that complex, there's no need to complicate your game code with early optimizations you may not need.