So for my game there is a story mode that I’m working on and I was wondering if anyone here knows how to make a level selection / difficulty selection script or how I would go about making it. I got the UI down for the mission and difficulty menu [Be it prototype menus] all I really need is help with the script and how to implement it. [Note that doesn’t mean to just make a script and send it my way but rather kinda help me understand how to do it so when I do it in the future I know what I’m doing that time around; though using a script as reference would also be helpful]
Now, the selection should be like Halo where you can select the level and difficulty without starting the game / jumping into the level. Only when you exit that specific menu and press Start Game will it load the Scene and the Difficulty. Something like that is what I am looking for. Thank you in advanced for the help and I’ll try to reply to you all!
It depends on what defines the difficulty settings. But the general idea is you just create the menu, the user selects the difficulty and you store it. Most likely with your save data so you can reload the difficulty for that save progress.
Then you just read in that value and your scripts need to adapt for it. Do the enemies have less health? Shoot less? Run out in the open more? Are there less enemies?
It may be possible to use scriptableobjects to define easy/med/hard difficulties and what stats go with it. If it requires scripts for different behaviors, then there are ways of doing that also and depending on your programming skill can go different routes.
Yeah, this is a tough question to answer because you’re essentially asking two separate questions: one about game mechanics, and one about applying the mechanics.
No one can walk you through this all the way,
You are going to need to try, try, and try again with multiple restarts and failures.
But to be completely honest if you are asking these sorts of questions, I’m guessing you don’t even have a player controller, a weapon, and an enemy (aka, the bare minimal requirements to make an FSP).
When you DO get to the point where difficulty level is an issue, I recommend avoiding “artificial difficulty”.
Artificial difficulty meaning anything that just increases stats. Like giving enemies more health and more damage.
Instead replace the enemies altogether with tougher ones, remove ammo and health pickups, and crank up your AI director (if you have one).
If you’re talking difficulties which carry through each level or you maybe even want to select individual difficulties and select levels then you’ll probably want to learn about serialisation in order to save all these preferences to a file. This is just my opinion as well on the subject of ‘difficulty’ I hate difficulty settings, I think that games developers should hand craft their games to a specific demographic of gamer like Dark Souls did for example.
If you do difficulty settings then it becomes the classic master of all trades scenario for a games developers where you’re trying to appeal to too many people and it ends up being a lackluster game and it’s not as if difficulty settings actually do much these days beyond increasing enemy hitpoints and decreasing player damage to the point it just becomes an annoyance to play through rather than challenging.
Bit of a rant I know but this is just something to bear in mind if you’re thinking about how to implement difficulty generally with your game but yeah, for all the features you’re looking at you should get to learning the basics on how to save data to a file.