{"id":{"repo_id":"vilnius","oai_identifier":"oai:vu.lt:elaba:308338526"},"canonical_url":"https://search.ndltd.org/etd/vilnius/oai:vu.lt:elaba:308338526","repository":{"repo_id":"vilnius","name":"Vilnius University","base_url":"https://epublications.vu.lt/oai"},"display":{"title":"Improving performance of game character behaviour systems using data-oriented design /","abstract":"Modern video games must simulate large populations of non-player characters within strict frame time budgets, and the performance of NPC behaviour systems depends not only on the complexity of the AI algorithm but also on how the underlying data is organised in memory. This thesis investigates whether reorganising NPC data according to data-oriented design principles produces a measurable runtime improvement over a conventional object-oriented implementation of identical AI logic. Two C++ prototypes were developed, each implementing the same three-state finite state machine, sharing all simulation constants and the same random seed, and differing only in memory layout and dispatch mechanism. Both prototypes were benchmarked across nine population sizes ranging from 100 to 50\\,000 NPCs, with measurements collected through both software timing and hardware performance counters. The data-oriented prototype outperformed the object-oriented one at every population size tested, with the speedup increasing from $1.13\\times$ at 100 NPCs to a peak of $1.58\\times$ at 25\\,000 NPCs. Hardware counter analysis confirmed that the performance gap was not produced by algorithmic differences but by memory access patterns: the object-oriented layout suffered significant L1 cache miss rates beyond 500 NPCs and L2 overflow into L3 and main memory at larger populations, while the data-oriented layout maintained low cache miss rates throughout. The results validate that data layout can deliver significant performance gains in NPC AI workloads.","abstract_html":"Modern video games must simulate large populations of non-player characters within strict frame time budgets, and the performance of NPC behaviour systems depends not only on the complexity of the AI algorithm but also on how the underlying data is organised in memory. This thesis investigates whether reorganising NPC data according to data-oriented design principles produces a measurable runtime improvement over a conventional object-oriented implementation of identical AI logic. Two C++ prototypes were developed, each implementing the same three-state finite state machine, sharing all simulation constants and the same random seed, and differing only in memory layout and dispatch mechanism. Both prototypes were benchmarked across nine population sizes ranging from 100 to 50\\,000 NPCs, with measurements collected through both software timing and hardware performance counters. The data-oriented prototype outperformed the object-oriented one at every population size tested, with the speedup increasing from $1.13\\times$ at 100 NPCs to a peak of $1.58\\times$ at 25\\,000 NPCs. Hardware counter analysis confirmed that the performance gap was not produced by algorithmic differences but by memory access patterns: the object-oriented layout suffered significant L1 cache miss rates beyond 500 NPCs and L2 overflow into L3 and main memory at larger populations, while the data-oriented layout maintained low cache miss rates throughout. The results validate that data layout can deliver significant performance gains in NPC AI workloads.","abstract_has_math":true,"creators":["Polikša, Artūras,"],"institution":"Institutional Repository of Vilnius University","degree_name":null,"degree_level":null,"degree_discipline":null,"degree_department":null,"school":null,"contributors":[],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2026,"date_issued":"2026","date_published":"2026","updated_at":"2026-11-19T10:12:59Z","subjects":["NPC AI, data-oriented design, object-oriented programming, cache locality, finite state machine."],"languages":["eng"],"rights":["info:eu-repo/semantics/openAccess"],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://repository.vu.lt/VU:ELABAETD308338526&prefLang=en_US","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"https://repository.vu.lt/VU:ELABAETD308338526&prefLang=en_US","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","download_url":null,"download_label":null,"download_source":null,"access_status":"open","embargo_until":null,"access_note":null},"source_record":{"url":"https://epublications.vu.lt/oai?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Avu.lt%3Aelaba%3A308338526","prefix":"oai_dc"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:creator","label":"Author","values":["Polikša, Artūras,"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2026"]},{"key":"dc:publisher","label":"Institution","values":["Institutional Repository of Vilnius University"]},{"key":"dc:relation","label":"Dc Relation","values":["https://epublications.vu.lt/object/elaba:308338526/308338526.pdf"]},{"key":"dc:type","label":"Dc Type","values":["info:eu-repo/semantics/bachelorThesis"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["NPC AI, data-oriented design, object-oriented programming, cache locality, finite state machine."]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["eng"]},{"key":"dc:rights","label":"Dc Rights","values":["info:eu-repo/semantics/openAccess"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://repository.vu.lt/VU:ELABAETD308338526&prefLang=en_US"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["Modern video games must simulate large populations of non-player characters within strict frame time budgets, and the performance of NPC behaviour systems depends not only on the complexity of the AI algorithm but also on how the underlying data is organised in memory. This thesis investigates whether reorganising NPC data according to data-oriented design principles produces a measurable runtime improvement over a conventional object-oriented implementation of identical AI logic. Two C++ prototypes were developed, each implementing the same three-state finite state machine, sharing all simulation constants and the same random seed, and differing only in memory layout and dispatch mechanism. Both prototypes were benchmarked across nine population sizes ranging from 100 to 50\\,000 NPCs, with measurements collected through both software timing and hardware performance counters. The data-oriented prototype outperformed the object-oriented one at every population size tested, with the speedup increasing from $1.13\\times$ at 100 NPCs to a peak of $1.58\\times$ at 25\\,000 NPCs. Hardware counter analysis confirmed that the performance gap was not produced by algorithmic differences but by memory access patterns: the object-oriented layout suffered significant L1 cache miss rates beyond 500 NPCs and L2 overflow into L3 and main memory at larger populations, while the data-oriented layout maintained low cache miss rates throughout. The results validate that data layout can deliver significant performance gains in NPC AI workloads."]},{"key":"dc:format","label":"Dc Format","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["Improving performance of game character behaviour systems using data-oriented design /","Žaidimų veikėjų elgesio sistemų našumo gerinimas taikant duomenimis grįstą projektavimą."]}]}],"canonical_facts":{"dc:creator":["Polikša, Artūras,"],"dc:date":["2026"],"dc:description":["Modern video games must simulate large populations of non-player characters within strict frame time budgets, and the performance of NPC behaviour systems depends not only on the complexity of the AI algorithm but also on how the underlying data is organised in memory. This thesis investigates whether reorganising NPC data according to data-oriented design principles produces a measurable runtime improvement over a conventional object-oriented implementation of identical AI logic. Two C++ prototypes were developed, each implementing the same three-state finite state machine, sharing all simulation constants and the same random seed, and differing only in memory layout and dispatch mechanism. Both prototypes were benchmarked across nine population sizes ranging from 100 to 50\\,000 NPCs, with measurements collected through both software timing and hardware performance counters. The data-oriented prototype outperformed the object-oriented one at every population size tested, with the speedup increasing from $1.13\\times$ at 100 NPCs to a peak of $1.58\\times$ at 25\\,000 NPCs. Hardware counter analysis confirmed that the performance gap was not produced by algorithmic differences but by memory access patterns: the object-oriented layout suffered significant L1 cache miss rates beyond 500 NPCs and L2 overflow into L3 and main memory at larger populations, while the data-oriented layout maintained low cache miss rates throughout. The results validate that data layout can deliver significant performance gains in NPC AI workloads."],"dc:format":["application/pdf"],"dc:identifier":["https://repository.vu.lt/VU:ELABAETD308338526&prefLang=en_US"],"dc:language":["eng"],"dc:publisher":["Institutional Repository of Vilnius University"],"dc:relation":["https://epublications.vu.lt/object/elaba:308338526/308338526.pdf"],"dc:rights":["info:eu-repo/semantics/openAccess"],"dc:subject":["NPC AI, data-oriented design, object-oriented programming, cache locality, finite state machine."],"dc:title":["Improving performance of game character behaviour systems using data-oriented design /","Žaidimų veikėjų elgesio sistemų našumo gerinimas taikant duomenimis grįstą projektavimą."],"dc:type":["info:eu-repo/semantics/bachelorThesis"]},"updated_at":"2026-11-19T10:12:59Z"}