Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] Unit settings in a config file

Started by appel Oct 29, 2005 at 10:52 PM 0 replies 950+ views
Original Post
appel
appel
Hello, I'm wondering what are the best practices to implement some XML based (I assume) configuration management for my game. Let's say I have a RTS-game and I have all these units, but I don't want to create classes like LightTank, HeavyTank, MediumTank and even MotorBike and define the configuration for each of those units in the programming code. I would rather want to create a class called Unit, and define the configurative properties for those units outside the code. Like in a INI file I would have something like: [LightTank] Type=Unit Health=300 Speed=40 Thank you very much! Smiley
Optus
Optus
Check out JDOM for an easy way to roll your own xml files.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.