3D: What to hardcode and what not

144 views Asked by At

I just wonder what do I hardcode in my game? E.g do I have an external file for every Enemy properties so on or do I make a class?

So what info/stuff should I code and what should I have as a .file?

Cheers!

1

There are 1 answers

3
Tony Ennis On BEST ANSWER

Make a properties file, and instantiate a bean when you need that type of property. There aren't many good reasons to hardcode things. At the very least, make the hardcoded items into constants: public static final int XYZZY = 0;

That being said, I'll hardcode to get something working or for prototyping. Then I'll go back and generalize it.