Dominic enjoys writing C in his free time because it provides a more hands-on, detailed programming experience compared to high-level languages like JavaScript. C forces him to think about all the details, which he finds enjoyable and challenging.
The source code was described as a mess, with global variables scattered across files, ad-hoc additions for different platforms, and a lack of abstraction. However, despite its poor structure, the game was playable and never crashed on the PlayStation.
The primary difference was the frame rate. NTSC ran at 60 Hz, while PAL ran at 50 Hz. This required adjustments in the game's physics and rendering to ensure smooth gameplay across different regions.
Dominic implemented a modern rendering approach that abstracts the renderer, allowing for easier porting to different platforms. He replaced the PlayStation's ordering table with a more modern triangle function, making the rendering process more efficient.
Dominic used a bump allocator, which allocates memory linearly and resets the pointer when a scene or level ends. This approach simplifies memory management by avoiding the need to free individual objects, making it ideal for games with distinct scenes like Wipeout.
The main challenge was ensuring the game could run within the constraints of the web, where infinite loops are not allowed. Dominic had to refactor the code to use callbacks like requestAnimationFrame, allowing the browser to regain control between frames.
Dominic wants to fix a physics bug that occurs at high frame rates, add graphical effects like lighting on ships, and make the collision response more forgiving. He also dreams of a polished remaster if Sony were to commission it.
Dominic is currently rewriting his old JavaScript game engine, Impact.js, in C. He has already ported one of his games, Biolab Disaster, to run on the new C engine, which can compile to WebAssembly.
WipEout is a futuristic racing game that was originally released in 1995 for the PlayStation. The game fused fast gameplay, striking art direction, and licensed electronic music. It was a cultural phenomenon and an early showcase for 3D graphics in console gaming.
Dominic Szablewski) is an engineer, game developer and hacker who has released projects such as Voidcall, Quake VR, and Q1K3 which is a 13 kilobyte version of Quake written in JavaScript.
A version of the WipEout source code was leaked in 2022 and Dominic created a nearly complete rewrite of the game that compiles to Windows, Linux, macOS and WASM.
Dominic joins the podcast to talk about the project.
)
Joe Nash is a developer, educator, and award-winning community builder, who has worked at companies including GitHub, Twilio, Unity, and PayPal. Joe got his start in software development by creating mods and running servers for Garry’s Mod, and game development remains his favorite way to experience and explore new technologies and concepts.
Please click here to see the transcript of this episode.)
Sponsorship inquiries: [email protected])
The post WipEout with Dominic Szablewski) appeared first on Software Engineering Daily).