When following the RPG Course, I noticed that the code allows us to easily add a bunch of character variants, which will work with the pre-existing code.
Was that something you decided to implement while prototyping the project or did you plan out the rough script structure beforehand?
It’s a widely used concept in game design. Even before Unity added prefab variants to the toolchest, a common pattern was to create multiple prefabs with the same scripts on them, usually by duplicating them. (The advantage of variants is that we can make changes to the original prefab that propogate to the variants0.
I actually meant the planning of scripts. For example, we took out the “PlayerController” really early out of “Mover”, in order for “Mover” to be used later on other characters, not just the player. So I was wondering if you planned the structure of all the scripts before even starting the project or while you were prototyping.
It’s a little bit of each. Before diving in to a larger project its good to think about the reuse of certain classes or which functionality will do well to share code. But there are only so many things you can guess when you dive into the project. In the first iteration we had enemy and player aspects quite separate but as time went on and we saw how much was shared, we refactored. Having one single class for moving all things was something which evolved as opposed to started as a known.
A lot depends on your philosophy for coding and comfort level in refactoring. I tend to approach coding with an Indie Game Development mindset which is much more of a “get it working and discover the fun and then tidy it up afterwards” mentality. Sam is a lot more likely to think through what the best design will be and then architect an approach which will support that design.
Ah alright, thank you for your response!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.