• entries
208
383
• views
66182

# Preferences Again

336 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?

There are no comments to display.

## Create an account

Register a new account