Coding Practices

Hello, I am working on my first game and it will be a puzzle game. The game will contain many puzzles and I plan on making them by hand.

Now the question is, should I make each level its own scene and just build the puzzles in each scene? Or should I just have one game scene that would load text files (or some sort of file) containing the level data?

Which would be a better practice or which one would be easier in the long run?

Thanks.

It really, really all depends. If they’re physically-based puzzles, scenes may be the most appropriate. If it’s something like a tile game, maybe text files, or maybe not. You might even need some type of system to generate puzzles based on criteria, instead of building them explicitly. There are practically infinite possibilities that you could be looking at here, and it’s not really possible to speak to which practice would work best for you.

I say just try doing it one way, and if you find yourself wishing it were handled differently, refactor to do it that way.

1 Like

I would probably agree with Schneider21, just pick one and go for it, if it gets too tricky or confusing or the other seems better then go back and try that way. with unity, and game creation in general you have to not be scared to go back and try another way if something doesnt work.

Alright, thanks for your input. I think I’ll just go with using text files and I’ll write my self a level builder.

good luck, hope it goes well!

I’m a bit tired, but why wouldn’t you just use a Scene for each specific Level?

That sounds easier, and much better use of Unity’s interface style. Not that there is all that much of a difference, but at least then you keep it simple while you learn.

One nice benefit of this path is that you can allow players to create their own puzzles and distribute them to other players.