HNHacker News
TopNewBestAskShowJobs

zubspace

1,645 karma · joined August 7, 2013

Fulltime C# developer. Freetime game designer. Made in Switzerland.

Blogging about game development, programming and design.

https://www.zubspace.com

submissionscomments
zubspace··on PIDs: Creating Stable Control in Games
The site explains the three parts of PID's very well.

On one hand I like PID controllers. It's a reusable concept which you can apply to a loot of stuff. On the other hand, in my experience it can be very tricky and cumbersome to tweak them.

In the given example, a PID makes perfect sense. There's a single, static target location you need to approach. Adjust velocity with a PID and you're done.

But what if the target location is not static? Imagine that the character needs to move to your mouse pointer? Do PID's still hold up? How do you handle the I and D term then?

It gets even trickier if you move to 3D. You maybe say, hmm, let's use a rigidbody this time instead of a kinematic body for the player character and use PID's to adjust forces to steer velocity and rotation.

But I never found a good way to do that, because in those other cases the error depends on the goal you need to reach, and if the goal constantly changes, I and D are kinda useless...

zubspace··on Jeff Lawson steps down as CEO of Twilio
If you want to see Jeff Lawson in action, you should watch a great talk of him about company culture and values [1]. Even though I'm a programmer and usually don't think too hard about such topics, I can fully relate to his ideas. He's sharing the process of how they arrived at twilio's company values [2], which really are exceptional.

Usually company values are just written down as a checklist somewhere, which you once read and then forget about. But twilio's values are fun to read, think about and easy to follow.

[1] https://www.youtube.com/watch?v=0CKI8Jah-Po

[2] https://www.twilio.com/en-us/company/values

zubspace··on Cheating is All You Need
What I would like to see is an AI which actively or passively assists you, like an improved Intellisense. Something which looks over your shoulder, figures out what you're trying to achieve and points at errors in your reasoning or stuff you did not consider.

It can summarize the thing you're looking at, tell you how to improve it regarding readability and performance.

On a press of a button you can zoom out of the code into an UML like overview and it will tell you what's going on and how it is connected. If you don't get it, it knows how to make you understand.

Then you can tell it in a few words what you want to achieve and it will assist you in finding a solid solution which matches the coding style of the rest of your project. And while you're coding and lose sight, it will help you achieve the goal.

The current state is sub-par in my opinion. I can write good code and don't need an AI to write it for me. But what I want is something which assists me with understanding code, improving code or extend code without taking the steering wheel away from me.

zubspace··on An Aperiodic Monotile Exists!
Procedural generation in games: Dungeon/Map generation or for combining or creating textures. And you could also used this maybe as an alternative to grid or hexagonal based games.

What makes this stand out is, that you can create larger structures of simple tiles, where repeating patterns and seams between tiles are less visible.

zubspace··on Unit Testing PDF Generation
Yeah sure, it just starts to be a problem when you're having dozens of tests failing because of small rendering changes which can be ignored. Someone still has to look at all the test output, compare it to the old state and update the tests with the new state. In our case this happened quite a lot.

This is not an issue at first, but the more you use tests like this and the more people work with your code, false positives start to drag you down.

zubspace··on Unit Testing PDF Generation
We do something similar, but from my experience small changes, like fonts or lines rendering a tad different after library changes can be quite frequent. Usually small changes you can't really see, only if you compare them as 2 layers in paint.net or something.

Adding something like an error margin for all pixels or subsections sometimes makes sense, but this can be tricky. Downscaling the image and comparing grayscale values with a small error margin is another option. It all depends on how accurate your tests have to be.

zubspace··on What's new in C# for Godot 4.0
I have written a few games in Godot, which also work in the browser for Ludum Dare. [1] Works great, 2D and 3D, with small differences, but I can only speak for GDscript. I'm not sure if C# exports are working.

First and foremost: Build time for all export targets together (windows. linux and web) takes less than 10 seconds and usually just work.

Some things like GPU particles had to be replaced with CPU particles and I remember that some texture compressions were not properly supported. But other than that, it mostly works out of the box. Can only recommend.

[1] https://ldjam.com/users/zubspace/games

zubspace··on Creative coding, making loops with Processing
What makes Processing useful for such visualizations? Haven't really looked at it, but the tutorial here [1] begins with rendering images and then combining them into a gif, which seems a bit awkward?

[1] https://bleuje.com/tutorial1/

zubspace··on Interactive Music Theory Cheat Sheet
I'm on the fence about apps like Simply Piano. I have a subscription since more than half a year and yes it's fun and I'm making progress albeit slowly. But I have the impression that it focuses too much on simple songs or techniques.

When I look at the introductory piano books of my wife I'm completely overwhelmed. Like my mind is unable to process the notes without an app that tells me what keys to press. Can't really explain it. I won't cancel my subscription yet. but I think that at some point 1-to-1 interactions with a teacher is invaluable.

zubspace··on Ask HN: How to move from traditional tech into game dev?
Wow, love your game! Interesting to hear the story behind it.

I just came out of Ludum Dare this weekend and always play with the thought of entering the indie game dev scene, but I'm just too afraid of leaving my stable dev job.

zubspace··on Ask HN: Is it just me?
Concentrate on the stuff you can do well. I'm sure everyone has some traits or some skills he can rely on. Practice those skills, improve them, be open to new ideas.

The thing is, even if I know or see things I don't like, often it is actually quite hard to figure out a way to improve the situation, a way which works for everyone in the team. Those things take time. You can try to improve those things, but be prepared for a bumpy road. Going in full head on can be painful, things can get personal or you'll do or say things you could regret. Sometimes it's better to wait it out, sometimes it's better to take it slow. And sometimes it's better to just leave it and concentrate on the stuff you can do well.

I don't want to sound like a know-it-all and possibly there are companies which are hopelessly lost. But there are always things to learn and to improve on a personal level. And I'm sure you'll feel better, if you don't try to fight every upward battle.

zubspace··on Ask HN: Is it just me?
I've been working more than 11 years at my current small company. There are often times where things do not work the way I want. Bad communication, new strategies I don't like, different opinions on how do something, bad or sloppy code I need to cleanup, crappy processes, etc... etc...

But still, after all those years, I don't feel bad about it. That's life and life is a mess sometimes. There are things you can change and there are things you can't. And most often a change takes quite a lot of effort or leads to nothing.

You need to distance yourself from this mess. This is easier if you first and foremost take care of yourself. Lead a good life, take care of your family, do sports, do something else than think about your job all the time.

And on the job, just try your best and even if things fail, learn from them and carry on. Hope this helps a bit. Stay strong and all the best to you!

zubspace··on Re-using the heat in bathwater in Britain
Maybe just one or two hot water bottles? [1] We use them in Winter to warm our feet in bed. But they are very versatile and can also be used to alleviate any kind of tension.

I also use one while I code: I put it inside of a small (baby-)sleeping bag wrapped around my feet. Sounds weird, but it's so comfortable!

[1] https://www.google.com/search?q=hot+water+bottle&tbm=isch

zubspace··on Godot 4.0 will discontinue visual scripting
Wow, I completely missed that one! [1]

Thanks for pointing that out. You just improved my life :)

[1] https://godotengine.org/article/gdscript-progress-report-fea...

zubspace··on Godot 4.0 will discontinue visual scripting
I am really looking forward to Godot 4. GDScript improved a lot.

I'm mostly excited about callables (function pointers), easier signal handling in combination with await (former yields) and an improved tweening system. The scripting environment inside of the editor with inbuilt documentation, code completion and debugger is really an achievement.

The only thing I miss are static typing and refactoring tools. You can use type hints, but you need to fall back to dynamic typing at some places for example because there are no generic collections.

Therefore I'm quite excited about the dotnet6 branch being merged into main a few days ago [1]. This is a huge step and will probably make some unity developers consider Godot for their next game.

Also there's GDExtension, the successor of GDNative, which will make it easier to integrate C++ code [2].

I could never imagine myself using Visual Scripting, because you can express yourself so much easier in Code.

[1] https://github.com/godotengine/godot/pull/64089

[2] https://godotengine.org/article/introducing-gd-extensions

zubspace··on The Case for C# and .NET
About the 'dependency problem':

It's not as bad as in npm with node_modules, because .NET provides a lot of base functionality in the standard library.

But when you start to use multiple nuget packages, sooner or later you will also enter dependency hell, where managing versions and updates of nuget packages gets very painful.

All in all we have to reference about 10 external libraries. The visual studio nuget package manager started to be frustrating if you need to manage those dependencies in multiple solutions. We therefore switched to Central Package Management [1], but then you realize, that you're just shifting the problem around. Now we have to put the whole dependency tree into the file 'Directory.Packages.props' and have to manage the version of 140 libraries. If there are version conflicts, we force nuget to use the latest version and just hope for the best.

Managing versions of dependencies and dependencies of dependencies is a major pain, but it's an ubiquous pain all programming environments share. And no, .NET won't relieve you from that.

[1] https://docs.microsoft.com/en-us/nuget/consume-packages/cent...

zubspace··on Meta is inviting researchers to pick apart the flaws in its version of GPT-3
I have no knowledge of such things, but it seems they run Cuda jobs on about 150 nodes?

But why do they have so many problems to keep this cluster stable? Network failures? Bad GPU's? Bad drivers? Bad software?

Running fixmycloud and going after all those cryptic errors every day seems like a nightmare to me...

zubspace··on Git Fork: A fast and friendly Git client for Windows and Mac
Our whole team works with git fork and we're really happy with it. You can browse the repo at a specific commit, branch, merge, rebase and blame everything from the gui. I rarely need to fall back to the command line and there's even the option to add custom commands to the gui. And it's really fast, even with multiple repos.

Just had an issue today and Dan replied in less than 5 minutes. Thumbs Up

zubspace··on How I Started to See Trees as Smart
I always use a small tupperware container to catch flies on a flat surface, seal it of with a piece of cardboard and release it outside.

You also avoid the mess left behind when clapping them. And in some way it also feels better.

It's actually a fun hobby of mine and after a while you can catch them nearly always. I also love watching my children trying to copy my approach. Highly recommended!

zubspace··on The Curse of Systems Thinkers
It just takes time, a lot of time. And meetings, endless meetings about what to make and how. Constant reviews of the progress and the code. And documenting everything.

I don't think, that this is necessarily bad. I even think, that this is a must for a large team. But it changes the way you code.

Right now I have the time and opportunity to 'form' the code the way I want. I can try different approaches, rip out or rewrite bad code and add features as I see fit. That's what I call liberty. I don't feel like a raw coder. Instead I feel like an artist in my own universe I where I'm in charge.

This feeling can get lost, when you need to request, plan, control and review every single change in coordination with multiple team members. You're not in charge anymore. You're not the artist, but a cog in the wheel.

I think some people like one way or the other. But it's hard to transition.

zubspace··on The Curse of Systems Thinkers
I work in a small organization which is kinda chaotic, meaning we have a lean process. Very agile, short standup each morning, but nearly no sprint planning.

I think, it's liberating to work in such a company as an experienced developer. You get difficult tasks sometimes, where you need to be the System Engineer and understand the system fully. But you're free to approach the problem in any way you see fit. This requires a lot of trust from the company and your team, but I believe that's a good thing.

It's also a nice for customers, who sometimes have crazy requirements, but they still get results in a reasonable amount of time.

On the other hand, this approach completely destroys newcomers. It's nearly impossible for them to approach a System which they can't fully grasp and is in constant flux. We mentor them, give them easy and introductory task, review their code, but still... It takes a massive amount of time. And I think, it's one of the reasons a company like this has a hard time growing.

And there's the risk of the 'not so competent programmer', who knows how to fix stuff, without thinking far enough.

I don't know, if I'm a System Engineer, but I think it aligns with the description in the article. However, I fear the day, we all agree to overhaul our processes, after which we need to plan and document and review everything.

It seems to be a necessary evil for a company to grow, but at the same time we would also destroy a lot of the liberty we currently have and I don't know which side is worse.

zubspace··on Web3 is centralized and inefficient
That's what they want you to believe. The truth is, to keep the influx of money into the crypto-sphere flowing, you need more people to invest money. This gets harder though, because most people who really care about crypto already invested.

There are only so many monkeys you can attract.

NFT is a solution to this problem: You promise a high return of investment for additional monkeys to invest.

This keeps on going until the whole thing crashes down burning. Those who invested first and really care already pulled out their share. The monkeys will suffer though.

zubspace··on Show HN: PDF API – Generate, convert, and modify PDF documents
There are so many ways to layout text on a PDF page, that this is nearly impossible to implement for all scenarios. I don't know a PDF editor which works in all cases.

Sometimes text is positioned absolute to the page border, sometimes relative to other elements, where moving a word shifts all following elements around. There can be multiple matrices involved for positioning text elements. Sometimes text elements are all positioned independently, sometimes by using newlines with custom size. Text elements can span multiple lines or words but sometimes each letter is a single text element where it is even hard to determine, which letters go together or if there's meant to be a space. Additionally fonts can be subsetted, where it's impossible to use other unused letters without knowing the original font. And than there can be OCR'ed PDF's, where an image of scanned text is overlayed on top of the real text. Oh and there can be clipping paths: Rectangles which erase all text below.

And each PDF-Producer creates a different PDF structure.

For reading, PDF's are awesome. For editing, PDF's are a nightmare.

zubspace··on Odin Programming Language
I'm intruiged by the vendor libraries [1] and EmberGen is definitely a nice showcase they have [2]. It's a nicer C with similarities to Zig.

I'll definitely take a look. But I'm hesitant to fully dive in. I'm a bit overwhelmed by all the new "niche" languages coming out lately. Usually they have very valid use cases but mostly fall flat regarding tooling (debugging..), available libraries and documentation.

It takes so much time to really grok a new language and then the next new shiny thing comes out...

[1] https://github.com/odin-lang/Odin/tree/master/vendor

[2] https://jangafx.com/software/embergen/

zubspace··on A Review of Shader Languages
Shaders would be so much more accessible, if there simply was an easy way to debug them. How many developer hours would have been saved with a simple printf statement? Or god forbid a step-through-debugger where you can inspect values...

The most common cause for errors in my shader code are values outside of the expected range or matrix transformation errors where I have to go through them step by step on paper...

So, how do you debug shaders? Is there a reliable tool which actually helps? Or am I missing something?

zubspace··on Inkscape 1.1.2
The thing is, I'm spoiled. There are so many great vector applications out there. We're in an age, where we're able to run awesome vector applications in a browser. How cool is that!

I'm just saying, that Inkscape needs to massively improve to stay relevant. For example, I realized that I'm completely going crazy when an app just crashes on me. I'm not used to that anymore.

Well, I understand, that Inkscape can be usable as long as you're doing simple stuff and as long as you're staying on the happy path.

But a graphic application needs to get out of its way for the user, who just wants to be creative. And as I was using inkscape, I used more time fighting it than creating.

In my opinion it needs to completely revamp the UI and streamline everything. Similar to what Blender did. But right now, I have a harder time using Inkscape than Blender, which us not a good place for Inkscape to be in.

zubspace··on Inkscape 1.1.2
A few days ago I tried 1.1.1 after a long absence on windows. I don't want to rain on your parade, but to be honest, it was a miserable experience.

Don't get me wrong: Inkscape is huge, it's quite an achievement and I'm glad we got an open source vector app. But everything feels so strange and awkward to use. And when you get further with your project, the input lag gets out of hand. Path effects and filters are cool, but the UI feels... Just strange. And they add even more lag to everything.

Oh and there's also the random crash now and then...

The exporting side could use some love too. You need to fallback to the commandline to export all layers or groups for example. But it's really cumbersome. And for some reason you can't even disable anti-aliased edges and it cuts of filters. Oh well...

Unfortunately I don't have enough time to contribute, sorry. Bought Affinity Designer this week and immediately fell in love. Everything just works, the UI is well thought out and it's snappy.

I don't know: I love open source. For example Blender or Gimp are great and improved massively over the years. We need something like Inkscape, but the current state simply doesn't cut it for me, sorry.

zubspace··on What’s so hard about understanding consciousness?
The interesting bit is not the sensory input. We mostly know how the sensors work and how they are triggered.

The fun question is, what exactly is connected to those sensors and experiences them and where is the location of that thing?

It's like we're sitting with a VR headset in our brain, playing that game we call life. But, where exactly are we and how is that headset connected to our sensors?

zubspace··on What’s so hard about understanding consciousness?
Well said. I think one of the problems is, that most just think that consciousness is a given and have a hard time to acknowledge, that we actually have no damn clue what it really is.

It's easy to say, that believing in a soul or something like it is hogwash, but just closing your eyes and telling yourself "I think and therefore I am" does not bring us any closer to an answer.

We have to assume that all unfalsifiable arguments could be true until we have proof, that they are incorrect. That is the only scientific approach.

zubspace··on What’s so hard about understanding consciousness?
I can completely follow your logic. And I completely agree that going supernatural or decending into a soul-debate is not constructive. That was not my intent.

Still, you and I can probably agree to some extent, that there is an inner eye inside of our heads looking outside. It also makes sense to me, that those processes could spawn from a feedback loop inside of a brain. Still. why did this inner eye spawn in this head we are in? There are 8 billion heads, why this one?

I'm not arguing for a soul or something. But I find it intruiging, that there had to be a mechanism which made your inner eye spawn at the place, where it now is. Only, what mechanism? Can it be explained physically? In my opinion it has to be, but maybe we missed it up to now

← PreviousPage 2 of 13Next →