I hear this question a lot in game dev groups.
So when I first started, making my first FPS took a looong time. When I was done, I exported the player controls and everything related to it. Now when I went to make another FPS, I just imported that. Same went for enemies that roamed the map and chased the player if they saw them then went back to roaming if they lost sight for too long. Same went for bullets, explosions, ect ect. As a game dev, when I make something really good, I export it so I can use it again in a later project. Then you have so many things you can reuse, that your dev time plummits. You also learn to code in ways that reduce current and future bugs. You take your time, do everything right the first time because you have those painful memories of spending weeks fixing something because you rushed ahead and didn't make notes.
When I first started, I'd mak a new object and leave the default name. For example, lets say I make a cube and use it for the head. I make another cube and use it for the body. I do the same for the arms, legs and gun. When you first make a cube, it's called Cube. When you make another cube, it's called Cube (1) and so on and so on as long as they're attached to the same object. If you add a cube to a different thing, the name resets. At the time, it seemed irrelevant. Later down the road, you get a bug and it refferences an object. This object is being called it's base name. The issue is you have like 40 objects all with their base name. I had an enemy made up of cubes to use their colliders. My bullets where hitting something and it wasn't doing damage. I told the bullets to tell me what they were hitting. It was Cube (13). Same issue went for my user interface where I kept making a new object that was called Image by default then suddenly sometihng is blocking the mouse clicks.
Now when I make something new, I name every object for what it's for. It's tedius and takes horrific amounts of time but now when there's an issue, I know what object is being itneracted with immediately. I write down notes for my script because when you make something good, it can get complicated. If I showed you the script for my guns, you'd cry. So a few months of not messing with something then comnig back to it, it's easy to forget how it all works. My notes allows me to quickly remember what was what. Yes, it's tiring making all those notes and labeling everything but it takes a billion times longer when trying to fix a bug and having no idea what is what and what does what.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.