Game Development for
Who am I? Harry Krueger Senior Programmer at Housemarque Games Lead Programmer on Resogun
Presentation Flow Intro to Housemarque and Resogun Housemarque Engine and Tools Platform-specific (PS4) discussion Game-specific solutions and iteration process Q&A, discarded art and ideas, discussion
Oldest game company in Finland Roots in Finnish demoscene Currently employs 50+ people Focus on combining traditional gaming values and cutting edge tech
Resogun Overview Spiritual successor to Super Stardust HD Modern reimagining of Defender Intense cylindrical Gameplay Voxel destruction mayhem Easy to pick up, hard to master
DEMO
Engine Overview What is a Game Engine? Responsibilities Rendering! Animation Resources Input Math/Physics Scripting Networking Localization Debugging Time travel (eventually )
Housemarque Engine Overview Highly modular design, flexible and portable Rendering is largest part Single-threaded implementation Multiplatform abstraction Balance accessibility and control Fast!
Engine: Tools and Resources Tweakable system Runtime game tweaking Tools and Editors Stated (State machine editor) Menu layout editor Tonemap editor etc. Scripting (Python, Lua) Resource handling, systems config, renderscripts, Project generation, package building, utilities etc. Twister Resource management Debug connection
Twister Builds single resource file Meshes, Animations Particle Effects Textures Scripts Shaders Custom resources Platform-specific optimizations Debug connection
Engine: rendering system Deferred rendering solution Tile-based lighting (compute-shader) Script-based (LUA) renderscript setup Render node pipeline Independent render tasks Interface between engine and game code SUPER fast and flexible Easy and safe to iterate over
What goes into a frame Compute Shader particles Level voxel Physical voxels Entity voxels SSAO Screens-space reflections Water simulation Color grading Distortion Bloom Enemy outlines Vignette FXAA Color splitting Menu overlays
Multiplatform Development Weakest platform becomes the lead Big power gap => more drastic solutions Engine makes platform code invisible Often need platform-specific solutions in game Shader compatibility Asset optimizations
Working with the PS4 Unified memory Compute Shaders Launch game, SDK not final Generally faster, raw power
PS4: Unified Memory 8GB GDDR5 Unified RAM About ~5GB usable by game CPU and GPU => same memory space Sharing data is much faster. Flexibility Generally makes things MUCH easier
PS4: Compute Shaders Ability to run generic code on GPU Works well with small chunks of data (like cubes!) Resogun is very GPU-intensive Most of Voxel tech runs on GPU
Game Logic Entities (enemies, bullets, player) Assets, FX, level flow Menus, game modes Game rules and state Game subsystems GFX engine lowlevel Game framework (fiber system) Collision detection Effect systems Manager classes Scripting Shader parameter contents Object drawing Space partitions Particle engine Update Loop Resource Management Platform Layer OS Wrapper Middleware Lowlevel GFX driver (platform specific), Platform Init Platform API Graphics, Audio, File system, Online services, File IO, Input, Threading etc.
Game systems Fiber system Turbo particles Multiplayer and Determinism Scripting integration and one last thing
Voxels! What is a voxel? Building blocks of Resogun universe Heavy utilization of Compute Shaders 500,000 physical cubes in gameplay Levels are made of millions Not point sprites, actual cube meshes Everything is destructible
Voxel asset generation Maya custom toolchain Voxelized Levels Voxelized Entities ( cubemeshes ) Enemies Player decoration items etc.
Voxelized Level generation Build level with traditional mesh tools Custom tool raytraces structure => generates hollow cube meshes Per-object attributes define materials Indestructible Frame cubes Exported as 3D textures One for level center One for gameplay ring
Voxel level generation process Build assets using traditional tools Voxelized asset! (hollow, surface cubes only) (Custom tool magic)
Base mesh
Generated
Colored
Frames
Voxelized entity generation Similar process to level generation Standard meshes -> custom format Non-uniform cubes Support animations Exported as individual cubes, no hierarchy Traditional keyframes and interpolation Separation into groups and sub-groups Needed for correct connectivity
Base mesh Colored Generated
Voxel System Over 1GB of memory used for Voxels Several voxel types in use: Level Voxels Static voxels for level center Curved voxels for gameplay ring Physical Voxels Enemy Cubes
Static Voxel Geometry Not actually Voxels Generates traditional meshes Polygonized during runtime With each explosion, visible geometry is recalculated Chipped away voxels become dynamic voxels Gameplay ring generates curved geometry
Physical Cubes Compute Shader does all work on GPU Physics Environment collisions Game object collisions (player ship etc.) Geometry generation Not point sprites, actual physical cubes Cubes have Individual lighting Material Cast own shadow
Semi-voxel curiosities Enemy Cubes While cubes are attached to enemies, they are updated by CPU Once detached, simulation is passed to GPU Reuse physics + collisions Unified memory advantage Collectable Green Cubes Separate physics model
DEMO
Fiber system Multithreaded framework for game code Hundreds of small tasks running independently No scheduling Resolve dependencies during runtime Very fast and flexible
Multiplayer and Determinism Deterministic model Same input -> same output Resogun has way too much stuff to sync traditionally Light weight only send input over network Progress when input from both players is available Input lag compensation, buffer input Multiplatform considerations Fiber system complications
Turbo particles Utilise Compute Shaders CPU decides on data from gameplay Passes data to CS CS creates particles and runs simulation Sub-frame simulation Collisions (e.g. beam->enemy) Used for Enemy beams Overdrive Beam Shockwave/bomb Lightning Phase End particle text
Development and Iteration Tweakables Enable runtime tweaking of variables ability to save them during runtime Level script and script integration Give control to designers, independence Used for level flow, weapon system, difficulty, scoring rules Exe and data Each time code changes need new exe for team Coders try to make themselves redundant for designers
Level Editor + Scripts Custom tool for generating attack waves Exports Lua script which are run in game (updated each frame) Can be updated during runtime via Debug Connection
TODO: attach images
Iteration process Play test sessions Trying out things is often faster than discussing them Allow for quick failure and iteration Weekly meetings kept quick and efficient Focused brainstorming sessions Maintain a cohesive vision
Design Define the creative box! Design is about setting constraints, clarifying intention Often less is more Easy to come up with ideas, hard to narrow them down
The path Many perfect paths don t get obsessed chasing the right one Choose one and stick to it Things are always changing New ideas require new features Old ones may prove obsolete Iteration! Final can be temp, temp can be final Have fun, and let the game decide!
VIDEO
Thank you!!