Wolfenstein's engine had to draw every pixel to the screen manually using a technique called ray casting. In 1992 there were no 3D graphics cards, and no standard 3D graphics APIs like OpenGL or DirectX. Once you flip the switch, the level will reset. Be careful not to accidentally crush yourself to death!įind the elevator switch to complete the level. There are a couple of secret sliding pushwalls - see if you can find them. You have limited health and ammo, but if you turn right at the start you'll see a submachine gun that should help your chances of survival. Otherwise you'll need to tap repeatedly.Įnemies are placed randomly, so if you're unlucky you may be shot in the back immediately when the game starts. If you have a phone with 3D Touch support you can force-touch to autofire. The entire screen acts as a virtual thumbstick for turning left/right and moving forwards/backwards (there's no strafing support as yet). The game can be played one-handed in either portrait or landscape orientation. If you feel like improving it yourself, please open a PR. I may improve it in future, or I may not. I wrote it as a learning exercise and am releasing it for educational purposes.
#Wolfenstein 3d mein leben code#
This code is not particularly polished or well-structured. It's also not a completely faithful recreation of the original game engine - I've deliberately removed some features and added others that weren't in the original, but it should be close enough for nostalgia purposes.įor copyright reasons, I've redrawn (badly) the Wolfenstein wall textures and sprites, but if you would prefer to use Adrian Carmack's original graphics, a web search for "Wolfenstein sprites" should provide a good starting point. It is not a complete game, just a single-level tech demo. Swiftenstein is a partial reimplementation of ID Software's 1992 classic FPS Wolfenstein 3D in Swift for iOS.