Turn Based System

Hey guys I’m working on a game idea I had 3~2 days ago and I’m starting to flesh it out with some friends of mine that will help me in my project.

But I’m now in a crossroads on the turn based system that the game will have, most of my prototype games dealt with a more “overworld” base combat per say, I never did something more turn based, but after playing around with the UI Elements and coding some simple stuff I guess I got the hang of it somewhat.

Now I already have a random encounter system in place, again, it’s very bare bones but it’s just for testing around the main idea of the game, and I have a couple of question about handling the transition between overworld and battle scene.

Do I just create another scene inside unity with the UI already in place and modify it by code depending on encounter and other important info? Or is there other more effective ways to do something like that?

I like lots of little scenes that do only a few small functions and get loaded as a set.

If I was doing this I would either unload the main game scene and switch to an encounter scene, then go back, which is easy to do if you thought about it from the start.

Alternately I would disable 100% of what is in the main scene (iterate it all, set it inactive), load the encounter scene, do that, then unload the encounter scene, and re-activate everything in the original scene.

Here’s some more notes:

Additive scene loading is one possible solution:

https://discussions.unity.com/t/820920/2
https://discussions.unity.com/t/820920/4

https://discussions.unity.com/t/824447/2

A multi-scene loader thingy:

https://pastebin.com/Vecczt5Q

My typical Scene Loader:

https://gist.github.com/kurtdekker/862da3bc22ee13aff61a7606ece6fdd3

Other notes on additive scene loading:

https://discussions.unity.com/t/805654/2

Timing of scene loading:

https://discussions.unity.com/t/813922/2

Also, if something exists only in one scene, DO NOT MAKE A PREFAB out of it. It’s a waste of time and needlessly splits your work between two files, the prefab and the scene, leading to many possible errors and edge cases.

Two similar examples of checking if everything is ready to go:

https://discussions.unity.com/t/840487/10

https://discussions.unity.com/t/851480/4

Thank you so much for the feedback, as I said, most of my prototypes where things that didn’t have anything to do with turn based stuff, I gave a read to all the links you’ve sent and it’s a really smart way of doing it! I’m glad to hear that the multiple scenes approach will do for my idea, as the other ways I thought of doing that would cause a lot of confusion in the final iterations of the game.

Now it’s just a matter of figuring out how I will code the core mechanic of my game, and find a way to make the Battle UI look good… Which… Maybe the hardest part for me… Once again, thank you very much!

1 Like

One approach I like for these encounter / battle scenes is to set it up to turn off all the rest of the game, load the battle scene.

For iteration 1, the battle scene might just have a single button: COMBAT FINISHED

Get that flowing perfectly, back and forth between the modes.

For iteration 2, the battle screen might list the parties involved and ask you to checkmark who lives and then press “combat finished” button.

Get that going, have the parties get weeded out by battle damage, etc.

This would be a good time to detect end of game, or offer resurrection abilities.

At that stage you have built an ultra-flexible framework where you can start iterating more things within both the inner battle scene and the outer world.

And of course, ALWAYS use proper industrial-grade source control in order to guard and protect your hard-earned work. That way if you break something you got going early on, click-click-click it’s instantly and perfectly repaired, no muss, no fuss.

Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

You can also push git repositories to other drives: thumb drives, USB drives, network drives, etc., effectively putting a complete copy of the repository there.

As far as configuring Unity to play nice with git, keep this in mind:

https://discussions.unity.com/t/736093/3

Here’s how I use git in one of my games, Jetpack Kurt:

https://discussions.unity.com/t/807568/3

Using fine-grained source control as you work to refine your engineering:

https://discussions.unity.com/t/826718/2

Share/Sharing source code between projects:

https://discussions.unity.com/t/719810/2

Setting up an appropriate .gitignore file for Unity3D:

https://discussions.unity.com/t/834885/5

Generally setting Unity up (includes above .gitignore concepts):

https://thoughtbot.com/blog/how-to-git-with-unity

It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place.

“Use source control or you will be really sad sooner or later.” - StarManta on the Unity3D forum boards