Replicating Source Engine Air Strafing in Unity
Peltola, Mikko (2021)
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2021111720476
https://urn.fi/URN:NBN:fi:amk-2021111720476
Tiivistelmä
Air strafing is a movement mechanic stemming from a programming error in the original Quake engine that has become a staple of Quake and Source engine games. It's simplicity and a high skill ceiling has made it a desirable movement mechanic for competitive players and speedrunners alike, and continues to exist in modern games today. In it's most common form, it is performed by holding a strafe key (left or right) and turning the characters view into the held strafe direction. This results in the character accelerating beyond the intended maximum speed and turning into the held strafe direction.
The goal of the thesis was to understand the inner workings of the air strafing mechanic and create a faithful recreation of the mechanic in the Unity game engine. The history of the engines and evolution of air strafing as a mechanic is covered in the first section and the next section covers the functionality of the air acceleration function found in the Source engine. The following section covers the implementation details of the game demo, and the level environment used for testing the mechanic.
The end result of the demo showcases the air strafing mechanic and it's potential as a subtle movement mechanic. It provides a look into the code that enables the air strafing and provides deeper understanding beyond the surface level. The thesis suggests a way that the implementation could be improved to not be depended on specific values and could work with any scale of unit. Air strafing on liikkumismekaniikka, joka on alunperin lähtöisin alkuperäisen Quake-pelimoottorin ohjelmointivirheestä. Siitä tuli nopeasti tunnettu ominaisuus Quake- ja Source-moottoria käyttävissä peleissä. Yksinkertaisuudestaan huolimatta ominaisuus tarjoaa taitavalle pelaajalle mahdollisuuden optimoida suoritustaan merkittävästi. Ominaisuus kiinnostaa erityisesti kilpa- ja nopeuspelaajia, joten se on säilynyt ja kehittynyt omaksi mekaniikakseen nykyaikaisissa peleissä. Se suoritetaan painamalla vasenta tai oikeaa liikenäppäintä ja kääntämällä hahmoa samaan suuntaan. Tämä kiihdyttää pelaajahahmon liikettä pelin asettaman nopeusrajoituksen yli ja kääntää hahmon liikettä painetun näppäimen suuntaan.
Opinnäytetyön tavoite on ymmärtää air strafing -mekaniikan toiminnallisuus ja luoda tarkka mallinnus siitä Unity pelimoottorissa. Opinnäytetyön ensimmäinen osio käsittelee pelimoottorien historiaa ja air strafing -mekaniikan evoluutiota. Seuraavat osiot käsittelevät Source moottorista löytyvän kiihtyvyysfunktion toimintaa, pelidemon kehitysprosessin ja sen testaamista varten luodun peliympäristön.
Pelidemon avulla havainnollistetaan air strafing -mekaniikan toimintaa ja sen potentiaalia liikkumismekaniikkana. Ohjelmakoodia tarkastellaan yksityiskohtaisesti air strafing -mekaniikan toiminnallisuuden esittämiseksi. Lopuksi ehdotetaan vaihtoehtoista air strafing -mekaniikan toteutusta, joka ei ole riippuvainen tietystä yksikköskaalasta vaan voisi toimia millä tahansa halutulla yksiköllä.
The goal of the thesis was to understand the inner workings of the air strafing mechanic and create a faithful recreation of the mechanic in the Unity game engine. The history of the engines and evolution of air strafing as a mechanic is covered in the first section and the next section covers the functionality of the air acceleration function found in the Source engine. The following section covers the implementation details of the game demo, and the level environment used for testing the mechanic.
The end result of the demo showcases the air strafing mechanic and it's potential as a subtle movement mechanic. It provides a look into the code that enables the air strafing and provides deeper understanding beyond the surface level. The thesis suggests a way that the implementation could be improved to not be depended on specific values and could work with any scale of unit.
Opinnäytetyön tavoite on ymmärtää air strafing -mekaniikan toiminnallisuus ja luoda tarkka mallinnus siitä Unity pelimoottorissa. Opinnäytetyön ensimmäinen osio käsittelee pelimoottorien historiaa ja air strafing -mekaniikan evoluutiota. Seuraavat osiot käsittelevät Source moottorista löytyvän kiihtyvyysfunktion toimintaa, pelidemon kehitysprosessin ja sen testaamista varten luodun peliympäristön.
Pelidemon avulla havainnollistetaan air strafing -mekaniikan toimintaa ja sen potentiaalia liikkumismekaniikkana. Ohjelmakoodia tarkastellaan yksityiskohtaisesti air strafing -mekaniikan toiminnallisuuden esittämiseksi. Lopuksi ehdotetaan vaihtoehtoista air strafing -mekaniikan toteutusta, joka ei ole riippuvainen tietystä yksikköskaalasta vaan voisi toimia millä tahansa halutulla yksiköllä.