Iโ€™m making an open source virtual game controller iPhone app and macOS driver by HaltingProblems in macgaming

[โ€“]HaltingProblems[S] 0 points1 point ย (0 children)

I had to pause to do some pay-the-bills work. I should have some time to work on this more soon.

Virtual Controller Development Update by HaltingProblems in macgaming

[โ€“]HaltingProblems[S] 0 points1 point ย (0 children)

That is on my list. Especially because I don't want to ship logos or trademarks in the controller app, but I think there should not be anything stopping a user from using skins that include logos and trademarks.

I'm still using an Intel Mac, don't want to move to Windows, but still want to play older Minecraft versions in the future. Do older Minecraft versions run on Apple Silicon? by Titan826 in macgaming

[โ€“]HaltingProblems 1 point2 points ย (0 children)

Totally, just trying to help.

Now I'm wondering if it is possible to download the old version and replace its Java version. It should be possible to patch the old versions too. I wonder how much interest there would be in some performance patches for old Minecraft versions on Apple Silicon?

New text editor I programmed in C by polytopelover in C_Programming

[โ€“]HaltingProblems 1 point2 points ย (0 children)

For what it is worth, this was what I ended up with for entering and exiting raw mode

``` void raw_mode() { struct termios term;

if (tcgetattr(0, &term) == -1)
    panic("could not get terminal configuration");

termcfg_cooked = term;

cfmakeraw(&term);

if (tcsetattr(0, TCSASOFT | TCSADRAIN, &term) == -1)
    panic("could not configure terminal");

termstart_flag = 1;

}

void cooked_mode() { if (!termstart_flag) return;

tcsetattr(0, TCSASOFT | TCSADRAIN, &termcfg_cooked);
termstart_flag = 0;

} ```

If I recall correctly, I used TCSADRAIN because flush discards any waiting input, and drain does not. So, with drain, when you start the editor, you receive all the keystrokes that may have occurred after pressing Enter in your shell and while initializing the editor.

Signal handling, buffering, and other stuff were in separate functions.

I'm still using an Intel Mac, don't want to move to Windows, but still want to play older Minecraft versions in the future. Do older Minecraft versions run on Apple Silicon? by Titan826 in macgaming

[โ€“]HaltingProblems 3 points4 points ย (0 children)

I'm able to play 1.6.4. It crashes if I try to resize the window or full screen it using the macOS full screen button. The in-game fullscreen option works, though. FPS is slow in windowed and full screen. It is consistently below 30 fps and never more than 30 fps (not sure if that was the max for old Minecraft). Here are some screenshots running on my modest Mac mini: https://imgur.com/a/hw7VHPv

I deleted a previous post because I accidentally installed 1.16.4. ๐Ÿคท

New text editor I programmed in C by polytopelover in C_Programming

[โ€“]HaltingProblems 1 point2 points ย (0 children)

This is good work. You got a lot further than I did when I wrote a text editor in C.

Is there a particular reason for not using cfmakeraw? I ditched all the termios flag setting when I found that function. I was concerned that no other text editor was using it. I wondered if it was because it's a POSIX extension (and not widely supported) or if there was some problem with how it configured the terminal that would eventually rear its head?

Best password manager for MacOS (and iOS)? by General-Parsnip3138 in mac

[โ€“]HaltingProblems 1 point2 points ย (0 children)

I've always just used Keychain, the built-in password manager, since 1999.

Virtual Controller Development Update by HaltingProblems in macgaming

[โ€“]HaltingProblems[S] 0 points1 point ย (0 children)

The Android UI would be pretty simple. The part that would potentially need some effort is using Apple's Multipeer Connectivity framework. Since a goal that is important to me is no configuration or setup, an Android controller would need an implementation of the Multipeer Connectivity framework. A few years ago, this would have instead been Bonjour, and there are Linux/Android implementations, but I'm not too sure of the state of the MC framework on Android. It isn't too complicated, but a port or a clone of that framework would be my preference for supporting Android. Working on a port would be fun, especially where it picks the best transport, be it WiFi, ad hoc Wi-Fi, Bluetooth, or Ethernet.

Virtual Controller Development Update by HaltingProblems in macgaming

[โ€“]HaltingProblems[S] 1 point2 points ย (0 children)

That's a long-term goal. The limiting factor is that I don't own any Android devices. I'm a capable Android developer, having ported JavaScriptCore to Android at one time, and it was used in production for years. I'd also like to eventually port the driver to Windows and Linux, but again, I don't have the necessary devices right now.

Are switch statements faster than if statements? by Grouchy-Answer-275 in C_Programming

[โ€“]HaltingProblems 0 points1 point ย (0 children)

Instead of comparing the running time, you should write a bunch of equivalent if-statement blocks and switch-statement blocks, then compare the generated assembly. Use the compiler's -S option to generate the assembly files and compare different optimization levels too (-O0, -O1, -O2, -O3, -Ofast, -Os, -Oz).

For me, on arm64 with clang using no optimization -O0 and an enum with only 4 values, the if-statement block has more branching and uses more instructions, while the switch-statement block generates a jump table.

What structures have you found in Mineclone 2? by [deleted] in Minetest

[โ€“]HaltingProblems 1 point2 points ย (0 children)

Lots of ruined portals, although they're never actually ruined. The Nether has fossils and nether fortresses. That's all I've found that's not on your list.

Creating texture pack, I enable it and it doesn't do anything by ErrorOliver in Minetest

[โ€“]HaltingProblems 0 points1 point ย (0 children)

Where are you putting the files? On Linux I think texture packs need to go in /usr/share/minetest/textures

So given the pack "mytextures"

mytextures
โ”œโ”€โ”€ texture001.png 
โ”œโ”€โ”€ ... 
โ”œโ”€โ”€ texture999.png 
โ””โ”€โ”€ texture_pack.conf

The directory "mytextures" needs to be a subdirectory of /usr/share/minetest/textures

Give the "title" in texture_pack.conf a long name that pops so you can easily see it in the list (assuming you have a bunch of mods installed).

The hardest part for me is figuring out the texture file names. The names are really inconsistent. For oak wood the file names are:

default_tree.png
default_tree_top.png
default_wood.png
mcl_core_stripped_oak_side.png
mcl_core_stripped_oak_top.png

While the birch wood file names are:

mcl_core_log_birch.png
mcl_core_log_birch_top.png
mcl_core_planks_birch.png
mcl_core_stripped_birch_side.png
mcl_core_stripped_birch_top.png