u/gargamel1497

What's the REAL point of LWJGL 3?

A lot of those retro mods that want to see what Minecraft would have been use LWJGL 3 and that is very unauthentic as it wasn't a thing back in the day.

And some time ago on this very subreddit I asked this exact question, and the response was: LWJGL 2 had bad controller support, and that's why LWJGL 3 was needed.

Back then I took it as fact as I had no evidence to prove otherwise, but now I do.

So, for context, I am remaking an old mobile game, in Java using the JSFML library, and yesterday I thought about adding controller support to it.

SFML itself does not support gamepad controllers but there is this handy library called jinput which does, and it just so happens that it's included with literally every version of Minecraft.

I yanked jinput and jutils (a dependency of jinput) straight from my 1.7.10 .minecraft folder, added some changes to the event loop, and with very little hassle I have controllers working in my game now. Without any LWJGL involved.

I daresay adding controller support was easier than polling the keyboard events. The only hassle involved was the dirty hack to extract the natives and restart the JVM to use them, which Minecraft doesn't need to do because it uses launchers for that very reason.

The Joypad mod for Minecraft (yep, for 1.7.10 as well) does a similar thing. It also bundles its own copy of LWJGL for some reason, but it's also LWJGL 2.

So, it is possible to add gamepad support with LWJGL 2. It's not janky, it's not hard.

What is then the reason so many beta mods switch to LWJGL 3?

reddit.com
u/gargamel1497 — 11 hours ago

Forcing prev-gen consoles to load Amplified worlds

Amplified worlds are quite cool, and so is the LCE.

But such worlds are only available on those pesky nextgen consoles that force you to connect to the internet to tie your shoes and whatnot.

Since now we have the source code, I think it would be trivial to enable that option for those trusty old consoles that are actually good.

I bet it's locked behind an #ifdef clause. It's just the matter of removing it.

I'll try doing that but I just want to know whether anybody has done that before.

reddit.com
u/gargamel1497 — 1 day ago
▲ 11 r/lua

Who is behind luajiteditor.ru?

Hi.

Today I've found a LuaJIT decompiler that actually works, at luajiteditor.ru. However, it's a webapp (like everything these days....), and I thought about asking the creators of it if they could offer a standalone decompiler (so that I can hook it up to an automated script; and also for data preservation reasons).

But there is no copyright notice on their website, no About Us section, no contact information.

There is also no way to purchase the thing despite it claiming to be free only for a while.

And its English is textbook-level good, which is surprising for an .ru domain.

In spite of all those warning signs, I hope there is an actual human behind it.

Does anybody know who runs this website and/or how to contact them?

Thanks.

reddit.com
u/gargamel1497 — 4 days ago

Radeon HD3450 drivers

Hi.

Are there any working Radeon HD3450 drivers for Slackware? Ideally for an older version.

I know that the card works, as Windows XP manages to utilize the acceleration just fine (I used SDI to install the driver, no idea which driver it is, not that it matters.)

But on Linux, the usual 'Xorg -configure' method fails and trying to startx with the resulting xorg.conf results in X11 stating that no screens have been found.

With no xorg.conf however the desktop runs, but it's all VESA/LLVMPipe, which means it's very slow and totally unaccelerated.

Since glxinfo doesn't really exist on Windows (at least I don't think it does), my metric for checking whether a graphics card works or not is just to run Minecraft. Yeah, I suck.

On Windows XP I get ~80 fps and on the unaccelerated Linux session I get ~5 fps. On the same computer, with the same fullscreen resolution, and with OptiFine installed in both cases.

(It's probably a bad metric, but I'm an amateur, so please forgive me.)

Am I missing some proprietary driver? If so, where do I get it?

And would it work on older version of Slackware such as 12.2 and 13.37?

Thanks.

Excuse my ignorance.

reddit.com
u/gargamel1497 — 11 days ago
▲ 9 r/slackware+1 crossposts

I wrote a simple tool to easen the group management on old Linux systems

Hi. I've recently been experimenting with Slackware 12.2 on an old computer and a "feature" of old UNIX-likes showed its ugly head: groups.

These days groups are mostly a symbolic remnant but in the olden days groups were the realm-givers. You needed to be in the audio group to hear anything, in the wheel group to use sudo (that one remains), in the cdrom group to access the optical drive, in the netdev group to manage networking, in the plugdev group to mount devices, and so on.

And, back then usermod didn't yet have the -a flag, meaning that in order to add yourself to a group, you had to retype all the groups you already belonged to.

That isn't quite convenient, so I wrote a simple script to automate that.

I've called it 'addgroup', and at least on Slackware 12.2 it doesn't conflict with any system utility.

It can be used to either add a user to a group:

addgroup glowiak audio

Or to copy one user's groups to another:

addgroup glowiak \@root

(without the \. reddit sucks.)

Codewise it's not the best. It's about eighty lines of C99 code, and it's basically a Perl script sans Perl itself (I'm not proficient in Perl).

Instead of doing it the proper way (that is, directly calling the system functions to handle groups), it literally calls /usr/bin/groups, and /usr/sbin/usermod.

It is bad, but I wrote it in less than an hour, entirely on that old computer without any internet access whatsoever, and with my only source of information on these topics being the manpages.

(It's quite an experience to be had, though it seems that these manpages don't cover everything they should.)

If you have an old Linux system and somehow need this, here are the archives: https://codeberg.org/glowiak/mmc-fbsd-bins/releases/tag/addgroup

It should also work on modern systems but since usermod now has the -a flag I don't see the point.

Anyhow, that's it. Thanks for reading.

reddit.com
u/gargamel1497 — 18 days ago

So many games are known for their source code being ugly and/or bad/inefficient. Terraria is the prime example, with its source code being so PTSD-prone that it doesn't even need to be obfuscated.

But it's not just it. Minecraft was full of dirty hacks during the Notch era. There was literally a public static final array of what blocks were affected by what tools, and for example workbenches and furnaces were missing from it (that's why it takes so long to break them in old Minecraft versions).

But it goes further. One of my favourite games is SuperTux 0.1.3 (this version specifically; while this game is developed to this day, later versions lose this "arcade"-ish feeling), and I sometimes use its source code as a reference for SDL 1.2 which is very useful when making games for old systems, and which nobody really uses anymore.

And, while it's not nearly as bad as that of Terraria, the source code of SuperTux is irritating to look at. Not only is the style it uses ugly, it uses it very inconsistently.

Sometimes it uses the GNU style, sometimes the "casual" style; sometimes it has spaces between operands, and sometimes it doesn't; the code is written in neither pure C nor in pure C++, but in a weird mixture of the two, there are unmarked variables magically popping out of nowhere (probably declared in some header file but used somewhere else entirely), and I could go on and on.

Those are just three examples I'm familiar with but the pattern seems pretty common.

And my question is why it's the case. Especially when it comes to open source games, whose code is widely available without the hassle of decompilation and deobfuscation.

I'm an amateur and in my quest to make my code look good I often invent overengineered abstractions while it seems like real game developers just don't care about this whatsoever.

Maybe I'm dumb (I most certainly am), but it just seems so weird to find out that all those professional programmers write code so bad and yet so successful.

reddit.com
u/gargamel1497 — 20 days ago

Hi.

What are the graphics cards from around ~2008 that would fit into a computer that's half the thickness of a regular tower PC, and that were not made by Nvidia?

I tried to search that for myself but couldn't find much.

Thanks.

reddit.com
u/gargamel1497 — 21 days ago
▲ 1 r/sfml

Hi.

How do I crop an SFML Texture?

That is, I want to draw only a certain part of it.

And I want to resize it as well.

I want to draw a certain part of a resized texture.

Other graphics libraries usually provide a means to do this in the form of a specialized draw function.

But, when I look at the RenderTarget class, there are no such functions. There are only extra arguments for RenderStates and some OpenGL-related stuff.

Is there even a way to implement that in SFML?

Thanks.

reddit.com
u/gargamel1497 — 23 days ago
▲ 7 r/kde

Hi. An old question here.

KDE has always been known for those pretty graphical effects. The desktop cube, the fluffy windows, all that graphical goodness.

The earliest video example of it I know of can be found back in 2006, though I don't think that at that time it was built into KDE itself.

And I am very interested in getting those effects to work.

I have been using the 32-bit version of Slackware 14.2 (from 2016) with KDE 4.14 on my main computer for almost half a year now and I want to get those graphical effects going.

When I try to enable them in the settings nothing happens and it says that they "require OpenGL" and refuse to elaborate further. That's a weird error to be had.

My computer is from ~2012 and running glxinfo shows that it supports OpenGL 3.3 (Core Profile), Mesa 11.2.2, GLSL 3.30 and has 1536 megabytes of video memory.

There is certainly some acceleration here, especially in games (though I don't play much of them, but Minecraft runs at 60fps).

A little netbook I have from around the same period has the exact same glxinfo output except that instead of 'Ivybridge Desktop' it has 'Haswell Mobile' (those are processor generation names I assume). And on this netbook all those effects work just fine by just enabling them in the settings. And it has a fraction of the RAM my main computer has. The netbook runs the exact same system - Slackware 14.2 i686 with - I think - the same packages installed.

Just out of curiosity I decided to pop an old 256MB Radeon (it supports OpenGL 2.0 at max) into my computer to see whether that would work (since in 2006 when it was new it would presumably work), but it didn't. (This time on Slackware 14.1 from 2013, and also on my daily 14.2; and yes, I used Xorg :2 -configure to generate a new config with the radeon driver enabled. I also tried it on OpenBSD 5.6 from 2014 with the same results.)

I know that KDE 4 remains a forgotten chapter of KDE history but I would be thankful if anyone could explain what's up with this. I haven't seen the requirements for those effects anywhere.

Thanks.

u/gargamel1497 — 29 days ago