After reading about the Wolfenstein 3D engine on vacation, I was inspired to try to recreate it from scratch in Swift. Here it is the result, running at 60fps on an iPhone X.pic.twitter.com/xFqbgJN0ld
-
Show this thread
-
TBC, this is an old-school software ray-caster that draws pixels directly into a buffer and then converts it to a UIImage 60 times per second. It's not using OpenGL or Metal (except indirectly via UIKit's display compositing)
2 replies 2 retweets 53 likesShow this thread -
It's not quite as old-school as the original engine from 1991 of course. For example I didn't have to figure out how to do linear algebra using only 16-bit integers and no floating point coprocessor!
5 replies 2 retweets 50 likesShow this thread -
I implemented most of the features from the original, such as sliding doors and secret push-walls. I also added new stuff like floor and ceiling textures, bullet impacts, diagonal walls, movable scenery, head bob and weapon sway.
2 replies 1 retweet 32 likesShow this thread -
I'm not quite sure what to do with it now. I can't release it in its current form due to IP infringement (not the code, but all the textures and sprites), but I'll probably try to open-source it in some form eventually.
9 replies 2 retweets 65 likesShow this thread -
OK, so what should I make with this? (Poll)
18 replies 2 retweets 34 likesShow this thread -
Replying to @nicklockwood
All those options are equally cool but since there is no option “all of that above” I’d leane towards combining “release the source” and “coding tutorial” option
1 reply 0 retweets 5 likes -
Replying to @ahmed_sulajman
If I write a tutorial it will include the source.
1 reply 0 retweets 4 likes -
Replying to @nicklockwood @ahmed_sulajman
Make sure to preface it by “don’t try rolling your own engine at home, do yourself a favor and just use Unity”
1 reply 0 retweets 5 likes -
Replying to @41Rco @ahmed_sulajman
Give someone a game engine and they will make a game. Teach them to code a game engine and they will never make anything. - old gamedev proverb
1 reply 1 retweet 26 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.