Why we didn't use inherited scene?

Greetings,

I just finished the course today, the course is amazing, it’s slow paced but packed with lot of information. However, I noticed that we didn’t use inherited scene.

From my experience with Godot 3, usually the best approach is to build a BaseLevel that act as our template for derived levels (0,1,2), instead of adding HUD scene on each level. That is because usually for commercial games you will need to have more than three levels, possibly 50 or even more for this type of game. With scene inheritance, all you need to do is change the BaseLevel (say we add HUD), and it will be reflected on the other derived levels.

Just wanted to add this information. Since, this information is essential, it’s part of Godot game development patterns, similar to auto-load.

Anyway, great course, will be looking forward for more courses in the future.

hi Mikado,

ive not quite finished running through the course myself.

ive just finished the saucer section and starting the second tonight. was that on the Martian Mike section?

hope you dont mind ive added the course tag to your post so it can be more easily found.

once ive completed it in a couple days, ill come back around. ive bookmarked the post too :slight_smile:

1 Like

Yes. It’s Martian Mike.

Thanks. I’m still new to this site, it seem I missed that.

Take your time.

1 Like

just finished the course, a little later than i expected, sorry

I see what you mean, this would have been an ideal use case for it to get a level template.

its possible that Kaan done it this way to just reinforce prior learning and get in the habit of scene creation.

i think i may make a copy of my project and create a template level to see how i get on.

1 Like

Hi there, Kaan here!

I was originally going to use inherited scenes in the Martian Mike section but decided not to do it. Inherited scenes can end up being really cumbersome to deal with. They create very rigid structures that make making changes very difficult. It felt weird telling people to use something I wouldn’t use personally. That’s why I decided to leave it out of the course.

1 Like

Hi there, thanks for taking your time to answer. I really appreciate it. I would like to know how do you manage to make games with x levels, where x >= 10? I consider myself total beginner with Godot, and before this course, I took another one from Udemy by Firebelley.

The way I learned it before was to use BaseLevel that has essential game components (player, camera, goal…etc) and then inherit from it. So, that if one of the days I wanted to change requirement, I don’t have to copy same node in every level if it was essential (imagine 50+ levels).

Regards,

For example you could write a tool script that automatically adds all the things that you need in a level when you create a new scene. Tool scripts let you run code in the editor, you can read more about them here: Running code in the editor — Godot Engine (stable) documentation in English

Using a base level and inheriting from it is also okay, but it has down sides. Solution you need is going to depend on the type of game you are making.

My advice is to not think too much about these things before hand, and just start making the game. You will discover the best way to do things while building the game. Don’t be afraid of trying and failing, thats how you learn. You can always undo what you did and try a different approach.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms