Show HN: The full source code and assets for my custom game engine and game
I always enjoy reading posts about indie game development and looking at the source code of games other people have built. So for any game I release I naturally I want to do the same.
https://github.com/Mknsri/HockeySlam
Hockey Slam is a hockey shootout game on Android which I built almost from scratch. Some of the engine features include 3D graphics with PBR materials, a rudimentary physics system, replays, a multithreaded job system and a hot-reload DLL platform for developing on Windows.
I detailed the creation of the game in it's own post, but now that time has passed I am releasing the source code and assets under the MIT license. You can still find the making of here: https://hockeyslam.com/makingof
I'm happy to answer any questions you might have.
37 comments
[ 1.8 ms ] story [ 94.2 ms ] threadDid you release it? If so, how is it doing compared to your expectations? (I looked for it on the Play store but couldn't find it)
Edit: As for the release, I think it barely broke a couple of hundred downloads. I didn't do any real marketing and had no real goal of really getting the game out there as it was a learning experience for me first and foremost.
> The game has been since delisted on the Play Store, however you can download the APK here.
Though that would be one hell of a project.
“If you wish to make an apple pie from scratch, you must first invent the universe” :)
This is something I posted on Casey's first handmade video, together with some counter arguments to his rant on the shortcomings of c++ and windows. He has since disabled comments.
For Hockey Slam you can look for the entrypoint in Windows:
https://github.com/Mknsri/HockeySlam/blob/main/windows/win_m...
or Android:
https://github.com/Mknsri/HockeySlam/blob/main/android/app/s...
Then start tracing through, looking at any function calls that look like they contain anything interesting. Additionally in this project you can jump straight to the entrypoints of the game code:
https://github.com/Mknsri/HockeySlam/blob/main/game/game_mai...
Or the rendering code:
https://github.com/Mknsri/HockeySlam/blob/main/ogl/ogl_main....
Another way would be to look at the files and see if anything catches your interest, for example if you want to learn about the UI system, you could look at how a button is defined:
https://github.com/Mknsri/HockeySlam/blob/main/game/imui_sys...
Fabien Sanglard has great articles on studying classic video game engines, and could be used as a guide on how to approach codebases: https://fabiensanglard.net/quake2/index.php
...how!? How did you even learn how to do this? I've never seen a github repo or documentation or tutorials that even mentions doing this. Nothing on the developer.android website, nothing in any YouTube tutorials. I'm blown away.
you can use NDK to create an app with c++
All the NDK demos/examples I've seen are usually using JNI in some fashion.
Also, the graphics look great.