While many games incorporate physics to simulate different aspects of gameplay, this is uncommon when it comes to fluid flows like wind, due to the complexity of the associated equations. The challenge increases in 3-dimensional worlds with large world maps and a real-time simulation. It is however possible to simplify a simulation by prioritizing visual and gameplay effects rather than physical accuracy, while still using a physically-sound system as a base. What this means for each game will differ depending on the architecture of the game, the desired outcome and acceptable performance costs. This paper addresses the implementation of a real-time, grid-based wind simulation in Rust for the game Veloren. A preliminary implementation with a simple graphical output was used before the simulation was integrated with the game. In Veloren, the resulting implementation is primarily server-based with a windsim system that runs the simulation itself, while the client side receives updates for the player's position, allowing the player to fly with a handglider using the wind currents created by the simulation. The performance cost of the implementation was measured for both the server and the client, using frames per second according to the grid size (space resolution) and how often the simulation is run (time resolution). When compared to the baseline before the implementation, it showed a performance cost for the server that increased with the time and space resolution. For the client side, no detectable performance cost was observed, but a lower simulation frequency resulted in sharp changes in wind direction from the player's perspective. Given that many options for optimization exist which were not systematically explored, the results show promise for the feasibility of this type of simulation in Veloren by expanding the current implementation.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:liu-176704 |
Date | January 2021 |
Creators | Rojas, Vanessa |
Publisher | Linköpings universitet, Institutionen för datavetenskap |
Source Sets | DiVA Archive at Upsalla University |
Language | English |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Page generated in 0.0015 seconds