News for hackers. Stuff that matters.

ensiferum

Another fluxbox user here. I've basically ran the same configuration for nearly 15 years now. Everything is in muscle memory and never changes. Totally the best UX
Qt also has QML which allows you to do things similar to what you would have with the combination of HTML,CSS and JS
Re:Unit Testing is Overrated (2020) on Thursday April 07, 2022 @07:24AM (#30943082)
And the sunset calculator doesn't need a location provider. All it needs are location coordinates which can be given to the calculate function.

In fact the whole thing then becomes a standalone function which takes Location and other relevant parameters and returns the computer sunrise/sunset values. Pure function and super easy to unit test.

If one needs to do a lot of "mockups" for your unit tests then maybe one needs to consider the API and class design. Removing needless coupling helps testability by removing the need to use mocks in the first place.

Re:Eigen: A C++ template library for linear algebra on Monday April 04, 2022 @12:37PM (#30908681)
Any idea about perf diff between this and GLM? In Computer graphics my use case is with fixed 4x4 matrices and vec4s. Thanks!
Re:Spin – WebAssembly Framework on Friday April 01, 2022 @03:04PM (#30882066)
No, not original Claim about WASM but your original Claim that about hot reloading and WASM.

"Hot reloading is a good example."

Again. You don't need WASM for hot reloading.

Re:Spin – WebAssembly Framework on Friday April 01, 2022 @09:13AM (#30877759)
But that's sort of moving the goal posts now. Original claim for WASM was that it allows hot reloading. Which is a thing you can do with DLLs just fine.
Re:Spin – WebAssembly Framework on Friday April 01, 2022 @05:46AM (#30876566)
But you can already do this with DLLs or with SOs files. You can keep your network logic for example inside another module (perhaps the host app) and then load the logic that acts on the received data as a dll.

Process separation and IPC natively using a library such as Qt is literally a few hundred lines of code.

Yeah this is impossible because code that isn't written cannot document itself and then the only option is to have a comment. And sometimes the meaningful thing is exactly what doesn't exist. For example here we're not doing X because of Y.
Re:WebAssembly in my browser desktop environment on Tuesday March 29, 2022 @02:57AM (#30839626)
Your first GitHub Link is 404
Re:Show HN: 2D Game engine and editor for Windows and Linux on Thursday March 10, 2022 @04:00AM (#30624767)
Thanks, that link seems interesting and relevant!

Well, ... the Qt3D is a higher level framework that isn't really relevant to the stuff I'm doing considering that I'm basically running my own "framework", i.e. my game engine that renders to my rendering surface.

In my use case what I really need is just to have Qt provide me a rendering surface with good performance (and ideally with working integration with the rest of the widget system) and then get out of the way.

Re:Show HN: 2D Game engine and editor for Windows and Linux on Thursday March 10, 2022 @12:51AM (#30623621)
Sorry no. Never developed for Mac and juggling Linux and Windows is already a lot.
Re:Show HN: 2D Game engine and editor for Windows and Linux on Thursday March 10, 2022 @12:43AM (#30623582)
Hi, thanks. Honestly.. I haven't compared. I've built this as a passion project not as a "product" with a product/market fit or competitive landscape in mind. I mean there are already so many engines out there that you can't even give them away for free. So i built it with the features that i had in mind and what i have needed for my demos and what i need for my games.
Re:Show HN: 2D Game engine and editor for Windows and Linux on Thursday March 10, 2022 @12:38AM (#30623566)
Currently the game engine .WASM is about 12mb.

The demo games have Emscripten filesystem images that vary from 6mb to 100mb. These sizes reflect the combined size of the raw game resources (i.e. fonts, textures, audio files etc)

Re:Show HN: 2D Game engine and editor for Windows and Linux on Thursday March 10, 2022 @12:25AM (#30623499)
Hi, you're absolutely correct. Tooling and the whole content pipeline is super important.

I chose Qt because I'm already very familiar with it and I know that it can do so much stuff out of the box and I want the editor to work as any other app as much as possible, i.e. tooltips, shortcuts, cut/copy/paste keyboard focus etc.

So everything works fine (as long as you know Qt's quirks) except that:

OpenGL support is kind of a mess. You have QOpenGLWidget, QGLWidget,QOpenGLWindow, QGLwindow which can all support OpenGL rendering. The problem is that while QOpenGLWidget works nicely with the rest of the toolkit ( context menus etc) the Performance is very suboptimal. I found it to be an magnitude of order worse than just using a window. I'm sure there's something else going other than just FBO overhead.

Another problem related to this but not unique to Qt is how to render to multiple window surfaces but to keep to a nice framerate. If you use vsync on each surface your framerate will be your display sync divided by the # of your surfaces. If you don't vsync then you're running a busy loop and burn cycles in a busy loop. I've tried many ways to do this nicely and haven't found a perfect solution yet. Would be very happy to hear some suggestions. Currently I'm just adding a little thread delay to cap the CPU use but this creates little hiccups in animation sometimes.

Show HN: 2D Game engine and editor for Windows and Linux

https://github.com/ensisoft/gamestudio

Hello HN,Just wanted to show this little 2D game engine that I've been working on for some time (around 2 years on the editor part, longer on some of the components).It's quite full featured but obviously this a project of such magnitude already that the work never really ends. That being said it's definitely already at a point where games can made and published. The editor runs natively on...

( Read More... | 21 comments | 121 points | on HN )
Re:What it's like to ride 900 km in a day on Sunday November 21, 2021 @03:05AM (#29294879)
Years ago I hikes around Annapurna in Nepal. Going through Thorong La (spelling) pass goes up to 5400m and can have snow any time of year. I saw several unprepared hikers who had simple summer gear with them only. The locals hike this route in flip flops sometimes. Fee years after that there was the big earthquake which killed ppl at Mt. Everest and around the same time that Annapurna area got around 2m of snow in 24h. Several ill prepared hikers got lost and died in the snow storm.
Re:Intermittent fasting prompts anti-inflammatory response on Saturday November 13, 2021 @11:58AM (#29211234)
Fasting isn't starving. It's living off of the food and energy you ate before. I.e. done properly you're tapping i to your bodyfat for energy and there's absolutely no hunger.
Re:Tips For Making a Popular Open Source Project in 2021 on Friday November 12, 2021 @09:25AM (#29199524)
"But many of my repos are still stale though I think my code is good enough."

The reality is just like with sellable (software) products (code) quality doesn't matter when it comes to "success".

Re:But What's Up with That ¥? on Friday November 12, 2021 @09:21AM (#29199483)
Looks like i replied to wrong comment. Wanted to reply to use linguae below. Sorry about that.
Re:But What's Up with That ¥? on Friday November 12, 2021 @05:40AM (#29197965)
But you can always just use a different layout for your keyboard. So eve with a keyboard with physical key engravings in Japanese you could just use a US layout.
Re:Pyjion – A Python JIT Compiler on Tuesday November 09, 2021 @10:55AM (#29163388)
Haha that's the rabbit hole. Two weeks later you're compiling your own kernel from sources just to be able to get that specific version of libc so that you can get libfoo working so that you can get libbar working so that you can get... You get the idea.
Re:Ask HN: Starting a career as a programmer in my mid-40s on Sunday November 07, 2021 @12:57PM (#29141757)
Do you have a training/learning curriculum ready?

You'll need to study the following.

* Computer science basics. The fundamental building blocks for computation. The bread and butter of algorithms and data structures. There's no way around this.

* You'll need to learn at least one or two programming languages in order to create actual computer programs and their related tooling.

* You'll need to learn at least one computational platform and its APIs and tools and generally how to build software for it. For example one of Windows, Linux, Android, Mac or web. Choose one.

* You'll need learn how to apply software to solving problems in any particular domain.

* You'll need to learn a ton a about the tools and practices of the trade. Distributed computing, databases, embedded, debugging, tools chains, design patterns, frameworks, APIs, libraries etc. Not all are applicable. What you should focus on depends on what what you want to work with and in which domain.

Re:How does a game engine work? an overview (2016) on Sunday November 07, 2021 @05:54AM (#29138253)
Nice, mine is a 2D engine. http://github.com/ensisoft/gamestudio
Re:How does a game engine work? an overview (2016) on Sunday November 07, 2021 @04:11AM (#29137709)
That seems like an overly narrow stance on the subject. Not all games are AAA level and not all game engines need to be competing in the same category with UE4/5/CryEngine/Unity etc. trying to reach maximal "realism". Not all engines are 3D, not all engines need/want to have realistic physics models or state of the art graphics and rendering.

Is Box2D not a "real" physics engine but a toy physics engine because it's not simulating physics in 3 dimensions?

Games are games and there are a multitude of categories and multiple different dimensions how to judge any particular game or its engine. Saying that something is not a real game engine because it doesn't meet some random narrowly defined criteria is pointless.

Re:Optick: C++ Profiler for Games on Friday November 05, 2021 @05:32AM (#29117074)
Nice, but it only supports Vulkan?

I did something similar in a few macros myself by creating nested scopes which record the current time on enter and exit. However I'm leveraging the UI built into chromium for the visualization.

https://github.com/ensisoft/gamestudio/blob/master/base/trac...

Re:Finishing my first game while working full-time on Thursday November 04, 2021 @12:12PM (#29108954)
I was spending anything from 12 to 16h per day (including weekends) for about 10 months working on my game engine after i quit my day job. Now that I'm working again i still try to throw at least 2-3h at it after work. Mostly i enjoy bit but sometimes there are moments when it begins to feel like a grind too. But unfortunately there's no choice but to grind through those boring tedious parts just go get it done. The key i find is to find the balance between doing the "fun stuff" abd the boilerplate "just has to be done" parts.

It's on GitHub here http://github.com/ensisoft/gamestudio

Re:Curves and Surfaces on Tuesday November 02, 2021 @03:25PM (#29086247)
Thanks for these!
Re:Anatomy of a Terminal Emulator on Tuesday November 02, 2021 @01:22PM (#29084360)
Well yes like I said on Windows you can access the terminal and set its properties without encoding terminal escape sequences in the output stream. On Linux afaik escape sequences are the only way. On MacOS i have no idea. Generally speaking the escape sequences aren't "standard" but different terminals (and these days terminal emulators) all have their own codes. Hence ncurses which tries to encapsulate this and provide a uniform API so that the application doesn't have to deal with these murky details.

Have you double checked with s hex editor what is in the txt file? Suppose it could also be your text editor that doesn't want to render those codes.

Re:Anatomy of a Terminal Emulator on Tuesday November 02, 2021 @11:39AM (#29082866)
Is this on Windows? If so Windows provides a typical Win32 type of HANDLE API for the console which can be used to change the properties of the console among other things.
Yes actually I think my bank sent me a message and asked me to call them. But either case it was all legitimate and my card was renewed.

Older »