\select@language {english} \contentsline {chapter}{Abstract}{i} \contentsline {chapter}{Preface}{1} \contentsline {chapter}{\numberline {1}Introduction}{2} \contentsline {section}{\numberline {1.1}Introduction to the genre}{2} \contentsline {subsection}{\numberline {1.1.1}Background}{2} \contentsline {subsection}{\numberline {1.1.2}RTS combat and control}{4} \contentsline {section}{\numberline {1.2}Why \textsc {JWars}\texttrademark {}?}{6} \contentsline {subsection}{\numberline {1.2.1}Flaws in contemporary real-time games}{6} \contentsline {subsection}{\numberline {1.2.2}Military hierarchy}{6} \contentsline {section}{\numberline {1.3}Report overview}{7} \contentsline {chapter}{\numberline {2}Features of \textsc {JWars}\texttrademark {}}{8} \contentsline {section}{\numberline {2.1}Game dynamics}{8} \contentsline {section}{\numberline {2.2}Technical features}{8} \contentsline {chapter}{\numberline {3}Overview}{10} \contentsline {section}{\numberline {3.1}Development plan}{10} \contentsline {section}{\numberline {3.2}Modular overview}{10} \contentsline {chapter}{\numberline {4}Architecture}{11} \contentsline {section}{\numberline {4.1}Connection and initialization}{11} \contentsline {section}{\numberline {4.2}Flow of control}{12} \contentsline {section}{\numberline {4.3}Various deterministic activities}{13} \contentsline {section}{\numberline {4.4}Player input and network instructions}{14} \contentsline {chapter}{\numberline {5}Networking}{15} \contentsline {section}{\numberline {5.1}Choosing a network model}{15} \contentsline {section}{\numberline {5.2}Synchronization}{16} \contentsline {subsection}{\numberline {5.2.1}Interactivity: network instructions}{16} \contentsline {subsection}{\numberline {5.2.2}Synchronization instructions}{17} \contentsline {subsection}{\numberline {5.2.3}Conclusion}{17} \contentsline {section}{\numberline {5.3}The networking API}{18} \contentsline {subsection}{\numberline {5.3.1}Implementation notes}{19} \contentsline {chapter}{\numberline {6}World of JWars}{20} \contentsline {section}{\numberline {6.1}Coordinate spaces}{20} \contentsline {subsection}{\numberline {6.1.1}Coordinate data representation}{20} \contentsline {subsection}{\numberline {6.1.2}List of coordinate systems}{21} \contentsline {subsection}{\numberline {6.1.3}Using coordinate systems}{22} \contentsline {section}{\numberline {6.2}Game data management}{22} \contentsline {subsection}{\numberline {6.2.1}Inheritance versus data-based game object classification}{22} \contentsline {subsection}{\numberline {6.2.2}Category model}{23} \contentsline {subsection}{\numberline {6.2.3}Content loading by categories}{23} \contentsline {subsection}{\numberline {6.2.4}Current game content}{24} \contentsline {section}{\numberline {6.3}Terrain}{24} \contentsline {subsection}{\numberline {6.3.1}Representation and capabilities}{25} \contentsline {subsection}{\numberline {6.3.2}Terrain generator}{25} \contentsline {subsection}{\numberline {6.3.3}Appearance}{25} \contentsline {section}{\numberline {6.4}Event handling}{25} \contentsline {subsection}{\numberline {6.4.1}Types of events}{26} \contentsline {subsection}{\numberline {6.4.2}Performance considerations}{26} \contentsline {subsection}{\numberline {6.4.3}Queueing system}{26} \contentsline {section}{\numberline {6.5}Vision}{27} \contentsline {subsection}{\numberline {6.5.1}Vision in games}{27} \contentsline {subsection}{\numberline {6.5.2}Performance discussion}{28} \contentsline {subsection}{\numberline {6.5.3}Final design}{28} \contentsline {chapter}{\numberline {7}Collision detection}{29} \contentsline {section}{\numberline {7.1}Basics of collision detection}{29} \contentsline {subsection}{\numberline {7.1.1}Divide and conquer approach}{29} \contentsline {subsection}{\numberline {7.1.2}Tile registration strategy}{30} \contentsline {subsection}{\numberline {7.1.3}Shapes and sizes of colliding entities}{31} \contentsline {section}{\numberline {7.2}Design of the collision detector}{31} \contentsline {subsection}{\numberline {7.2.1}The checking routine}{31} \contentsline {subsection}{\numberline {7.2.2}The collision grid}{32} \contentsline {subsection}{\numberline {7.2.3}Further features}{32} \contentsline {subsection}{\numberline {7.2.4}Efficiency and optimization}{33} \contentsline {subsection}{\numberline {7.2.5}Using the collision detector}{34} \contentsline {section}{\numberline {7.3}Conclusion}{34} \contentsline {section}{\numberline {7.4}Pathfinding}{35} \contentsline {subsection}{\numberline {7.4.1}Implementation}{36} \contentsline {chapter}{\numberline {8}Unit organization}{43} \contentsline {section}{\numberline {8.1}Real-world military organization}{43} \contentsline {section}{\numberline {8.2}Military command in computer games}{44} \contentsline {section}{\numberline {8.3}Tree-based unit representation}{45} \contentsline {chapter}{\numberline {9}Unit AI}{47} \contentsline {section}{\numberline {9.1}Hierarchical structure}{47} \contentsline {section}{\numberline {9.2}Design considerations}{49} \contentsline {section}{\numberline {9.3}AI layering structure}{49} \contentsline {section}{\numberline {9.4}Future AI work}{50} \contentsline {chapter}{\numberline {10}Combat}{51} \contentsline {section}{\numberline {10.1}Analysis of combat dynamics}{51} \contentsline {subsection}{\numberline {10.1.1}Combat rule set}{52} \contentsline {subsection}{\numberline {10.1.2}``Weapon vs. armour'', or ``armour vs. weapon''?}{53} \contentsline {subsection}{\numberline {10.1.3}Structure of the weapons API}{54} \contentsline {subsection}{\numberline {10.1.4}Firing routine}{55} \contentsline {subsection}{\numberline {10.1.5}Impact handling by armour}{55} \contentsline {section}{\numberline {10.2}Spotting and targetting}{55} \contentsline {chapter}{\numberline {11}Control}{56} \contentsline {chapter}{\numberline {12}Graphics}{57} \contentsline {section}{\numberline {12.1}Active versus passive rendering}{57} \contentsline {section}{\numberline {12.2}Double buffering}{58} \contentsline {section}{\numberline {12.3}Battlefield rendering and layers}{59} \contentsline {section}{\numberline {12.4}Optimization of the rendering routine}{60} \contentsline {section}{\numberline {12.5}Conclusion}{61} \contentsline {chapter}{\numberline {13}Conclusion}{62} \contentsline {section}{References}{63}