Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2013
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 KB | None | 0 0
  1. Currently settings can be controlled by:
  2. * Config files (mostly static files, plus overrides from hwdetect.js)
  3. * Command-line arguments
  4. * JS commands (via the console or the GUI)
  5.  
  6. These all provide different subsets of functionality, and different names for the same features. That's kind of silly, and they should all be unified. Often I want to set an autostart map in a config file (because that's less painful than editing the command line in the VS IDE), or change graphics settings on the command line (to quickly compare performance in different modes), or make the pathfinder debug overlay be enabled by default instead of clicking GUI buttons, etc.
  7.  
  8. Some settings allow players to cheat (e.g. enabling the pathfinder debug overlay, or disabling graphical features like FOW). It'd be good if we could easily identify these cheaty settings, and discourage their use in proper multiplayer games.
  9.  
  10. Graphics settings are the most complex area. Take shadows as an example: (the precise technical details aren't really important, just the general complexity)
  11. * Shadows can be "disabled", "shadow map" or "blob" [hypothetically - blob shadows aren't implemented yet].
  12. * Shadow maps can have "PCF enabled" (better quality) or "PCF disabled" (faster on some hardware).
  13. * If the shader-type setting is "ARB" (not "GLSL"), shadow maps can use "SHADOW2D" or "2D" mode.
  14. * Shadow maps can be "with unused colour buffer" (wastes memory) or "without colour buffer".
  15. * Shadow maps can have any power-of-two square texture size (512x512, 1024x1024, etc).
  16. * If the render-path setting is "fixed", then "shadow map" is not available.
  17. * Unless the graphics drivers are OpenGL with certain extensions, or OpenGL ES, then "shadow map" is not available.
  18. * "SHADOW2D" is only available if the graphics drivers support some GL extension.
  19. * Some drivers/hardware are slow and should have shadows disabled by default for acceptable performance.
  20. * Some drivers/hardware require "with unused colour buffer", otherwise they'll either give detectable errors or (if I remember correctly) silently break.
  21. * The graphics drivers impose an upper limit on shadow map texture size.
  22. * Users should be able to choose a tradeoff between quality and performance.
  23. * Users shouldn't be able to choose options that break the game.
  24. * Developers should be able to test every combination to find optimal performance and find driver bugs.
  25.  
  26. So there's a load of options, which often depend on other options, and often depend on drivers/hardware. How would we implement this in a usable GUI for users, and in a cleanly-implementable UI (probably config files, not GUI) for developers?
  27.  
  28. I suppose a usable GUI could be radio buttons (or equivalently a drop-down list) like:
  29. [code]
  30. Shadows: ( ) Off [means "disabled"]
  31. ( ) Very low [means "blob"]
  32. ( ) Low [means "shadow map", 1024x1024]
  33. (*) Normal - recommended [means "shadow map", 2048x2048]
  34. ( ) High [means "shadow map", 4096x4096]
  35. ( ) Ultra [means "shadow map", 8192x8192]
  36. Shadow filtering:
  37. ( ) Off [means "PCF disabled"]
  38. (*) On - recommended [means "PCF enabled"]
  39. [/code]
  40. The "[means ...]" aren't part of the UI, they're just for this explanation. The "recommended" labels come from our hwdetect.js (effectively a database of optimal configurations for various devices), and will be the default until the user overrides them. Any options that aren't supported by the hardware would be greyed out. If "shadows" is set to "off"/"very low", then the whole "shadow filtering" section would be greyed out or hidden. If the currently-selected option is not supported (e.g. you copy your config file to a less-capable machine), then the UI would still show your old selection (greyed out), but the engine would automatically fall back to some other similar supported configuration.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement