Better HN
topnewbestaskshowjobs
Log inSign up

mknsri

74 karma · joined Jul 11, 2017 (9y ago) · 22 submissions

Submissions

comment 3y ago · link · parent

Thanks! I got help for the 3D models and they turned out great.

comment 3y ago · link · parent

Yeah I remember that Android pretty good had documentation and tutorials about the native-activity. It was not really advertised, more of "do this if you really want to" kind of feature. But it worked perfectly.

comment 3y ago · link · parent

Exactly! Thanks for the kind words

comment 3y ago · link · parent

It depends a little bit on how comfortable you are with the platform and the technologies used in the codebase. Generally speaking you would look for the entrypoint into the application.

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

comment 3y ago · link · parent

I mentioned in a couple of places that I did use other people's file loading libraries (mainly Sean Barrett's excellent stb libs).

“If you wish to make an apple pie from scratch, you must first invent the universe” :)

comment 3y ago · link · parent

I could have definitely used that and I'm surprised I didn't realise it when researching how to include shader code. Luckily my setup required very little work and with my system I could share snippets between GLES and GL.

comment 3y ago · link · parent

Yeah the privacy policy page had an expired certificate and Google delists the app automatically when that happens.

comment 3y ago · link · parent

Thanks! Finishing such a large project feels great and you learn a lot when you have to implement so much you take for granted when using things other people have built

comment 3y ago · link · parent

Thanks, it's not the cleanest code and for example my immediate mode GUI is nowhere near IMGUI but theres still plenty to look at.

comment 3y ago · link · parent

You would have to write the platform code for iOS similarly to how the Android and Windows is written. The initial idea was to release it on iOS as well but at the end I didn't want to invest in buying a Mac, the license and the time to port 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.

comment 3y ago · link · parent

True, Casey/HH was a huge inspiration and the project started from following the first few days of Handmade Hero. I should mention it.

comment 3y ago · link · parent

The HTTPS certificate expired on my privacy policy page and Google delists the app when that happens. After you renew they require that you resubmit the app and I didn't bother since there were barely any downloads then.

comment 3y ago · link · parent

I wanted to include common code for all shaders in a simple way, but I was too lazy write a proper parser. So instead I used the C++ preprocessor and macros to include things from common shader code and combine them in the build step.

14.

Show HN: The full source code and assets for my custom game engine and game

128 points · by mknsri · 3y ago · 35 comments

comment 4y ago · link · parent

Yeah that works for selecting contiguous blocks of text. Multi-cursor editing allows for selecting rows that are further apart.

comment 4y ago · link · parent

I am aware that I could extend vim with all the missing features, but that seems error-prone and not worth the time investment, since other editors have them out-of-the-box.

comment 4y ago · link · parent

Oh yeah I did use "dd" and "p". They work OK, although they don't allow selecting multiple lines that don't follow each other.

comment 4y ago · link · parent

Yeah this is the way I tried it. I did not find as fast.

comment 4y ago · link · parent

I tried out vim for a month or so. I did enjoy using it, although I'm not sure if using vim just feels more productive because you press more keys to do the same thing. However multi-cursor editing and cutting whole lines in modern editors is way more conducive to my workflow and eventually stopped using vim.

Do vim users know if there was anything like Select next occurrence in vim? Feature discovery is not one of vims strong suites

EDIT: More specifically by multi-cursor editing I mean selecting multiple occurrences of a word, and then editing in place. For example selecting all occurrences of the word user -> (getUser, setUserId, variable declarations with user) and then replacing them with account. This can be done with vim but is nowhere near as fast, since every change needs to be done one-by-one. Or selecting all the above occurrences, and pasting them somewhere for an interface declaration.

comment 4y ago · link · parent

Care to elaborate? I've recently had to research E.164 and haven't come across this being mentioned. In fact I remember more sources claiming that the plus-sign is a required part of the format

21.

How I made a game engine and game from (almost) scratch(hockeyslam.com ↗)

3 points · by mknsri · 4y ago · discuss

22.

Stop abusing (virtual) animals when teaching programming(medium.com ↗)

2 points · by mknsri · 9y ago · discuss