Jump to content
  • Advertisement

Yar

Sign in to follow this  
  • entries
    208
  • comments
    383
  • views
    65870

Preferences Again

Sign in to follow this  
H_o_p_s

300 views

I thought that I'd share with you how the preference files are set up. I like the general appearence to java files, however I wanted to make it a little different as well. '//' start comments, and all white space is ignored unless within quotes. You can not have more than one parameter per line, and anything after the semi-colon is ignored. This means that
Main.START_TEXT: "Battle Engine v.05a";lsdkjf sldhf 

if perfectly legal. This makes it so comments are easier to do (and it just happened to be easy to code [smile])

There are three characters that are not allowed to be used in Strings in the preference file: '...', 'ae' and 'o'. These are used internally and will mess the strings up. I doubt that many people would use those characters in the fist place.

////////////////////////////////////
// //
// Battle: The Fight for Eternity //
// //
////////////////////////////////////
// Do not use o ae or ... in Strings //
////////////////////////////////////

Main.START_TEXT: "Battle Engine v.05a";
Main.CAMERA_X: 180;
Main.CAMERA_Y: 90;
Main.UPDATES_PER_SECOND: 30;

MainWindow.WINDOW_TITLE: "Battle: \"The Fight for Eternity\"";
MainWindow.WINDOW_DECORATIONS: false;
MainWindow.WINDOW_FONT: null;
MainWindow.WINDOW_FONT_SIZE: 9;
MainWindow.WINDOW_WIDTH: 400;
MainWindow.WINDOW_HEIGHT: 300;
MainWindow.FULL_SCREEN: false;
MainWindow.DEBUG_BOUNDING_BOXES: false;

GraphicsCache.DEBUG: false;

Keyboard.DEBUG: false;

Log.SHOW_LOG_AFTER_ADD: false;
Log.SHOW_MESSAGES_IF_NO_WINDOW: false;

ActorTracker.DEBUG: true;

TileTracker.STARTING_WIDTH: 10;
TileTracker.STARTING_HEIGHT: 10;
TileTracker.TILE_SHADING: true;
TileTracker.NUMBER_OF_SHADES: 7;


Any Suggestions to the layout of a preference file?
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!