←back to thread

115 points nightowl_games | 7 comments | | HN request time: 1.267s | source | bottom
1. nightowl_games ◴[] No.42222008[source]
Made this in Godot 3. Majority of the game is written in c++ as a custom module, ie: compiled directly into the engine. We have a fork of godot that has slight tweaks to it. I profile the game using advanced tools and have rewritten several parts of it several times to be optimal. There is basically 0 gdscript running at runtime. The c++ is far more performant than GDExtension/GDNative/C#. The trees are streamed in and out of the viewport as they become visible. All the tree types and snow render from the same spritesheet. The tree types are pooled instead of created & destroyed. The thing that streams the stuff in and out is optimized. The skiers are rendered using a technique called 'SpriteStacking' where 3d voxel art is rendered into a 2d sheet and 'fanned out' to make a pseudo 3d effect. I even cahc spritestacks are optimized, etc. I even go as far as caching the rotation operations to fan those skier sprites out. The .wasm has been stripped down to ~2.7mb. I want to strip it further and get it smaller. Download size is king. Planning on releasing this on a web platform like crazy games or poki and hoping to build ad revenue.

Next steps are to make it so when you past the boundary fence you enter 'back country mode' that just goes forever and a popup tells you how far youve gone, but if you fall, its game over and ski patrol takes you back. I also want to iterate on the chairlift and make the bots 'queue up'. Not sure about if the chairlift is 'fun' or not. I want the mountain to feel like a real ski resort, but nobody wants to wait.

Anyways, this game is still in development, let me know what you think.

replies(2): >>42225509 #>>42227179 #
2. Rendello ◴[] No.42225509[source]
Awesome. I'm interested in making games that can run in the browser, I never considered that Godot might have this capability.
replies(1): >>42225539 #
3. nightowl_games ◴[] No.42225539[source]
It does, but it works best if you compile it yourself, strip the engine down and add your own core game code as c++ classes. Not for everyone, but works good for me as I like c++.

If you wanna go straight to the web, probably start with play canvas or even Defold. Godot works, but if your not a c++ guy or dont want to fork the engine, then your not going to be able to optimize your game as much as I have

replies(1): >>42225852 #
4. captaindiego ◴[] No.42225852{3}[source]
Do you know of any examples of doing something more complicated like this with Godot and C++ (past the normal docs)?... I've got some existing C++ game engine stuff I'd like to integrate with Godot for managing rendering side of things.
replies(1): >>42233240 #
5. djmips ◴[] No.42227179[source]
I like it! Played for about 30 minutes.

Is there a way to make the mouse pointer disappear when playing? System: Windows 10 - Browser: Chrome.

Thanks for sharing!

replies(1): >>42230079 #
6. nightowl_games ◴[] No.42230079[source]
I think you need the pointer to play this game! I could replace it with something more on theme.

Thanks so much for playing!

7. nightowl_games ◴[] No.42233240{4}[source]
https://www.youtube.com/watch?v=xo3z9IjGRSo

My colleague made this 3 years ago before we released our first game.

Basically we forked Godot, setup VSCode to compile it, and add new classes to a <repo>/modules/<project_name> folder and it works great. Since this video we've made a suite of macros that allow us to bind variables and methods to the ClassDB in 1 line each. Way nicer than default godot technique for adding new variables/methods.