kartoffelsaft

joined 1 year ago
[–] [email protected] 1 points 1 year ago

One library I've become very fond of using is Raylib. It has a ridiculously simple interface. If you just want to program a game and don't want/need the details of OpenGL/Vulkan/DirectX (which I'd suggest you do at some point anyways), then It'd be my pick.

[–] [email protected] 1 points 1 year ago (1 children)

It's a setting you can change. The default is a "quick generation" mode which looks as similar to the world seed/settings as it can without taking the performance hit of actually generating it. But it can either be changed to generate the chunks genuinely out to the render distance (which would be lag hell for 128 chunks) or to only render already generated chunks (like you suspect). Only the latter works in multiplayer though.

[–] [email protected] 1 points 1 year ago

Huh. When I took Calculus II in community college, the professor introduced sum notation and like 2/3 of the class was like "wow that's cool I didn't know about that". I don't remember ever being formally taught it before that but it still surprises be how few people where already familiar with it.

[–] [email protected] 2 points 1 year ago

I haven't actually. I'll go do that now.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

Moving the cursor will confuse bash and you can get the same effect by just omitting the last \n.

When I was testing it I did not get the same effect. Instead it would only put the background behind what I had typed and not the whole line. Doing it now it seems to be working with the omission. I would assume it's a terminal emulator bug because I believe I have changed emulators since I wrote it. I've now removed it, thanks for fixing a bug.

Avoid doing external commands in subshells when there’s a perfectly good prompt-expansion string that works.

I wanted my home directory to not get shortened to ~, and if there is some way to do that with \w it isn't easy to find out how.

Also, what's the reasoning for avoiding it (besides it being idiomatic)? I'm sure there is one, but I don't think I've run into it yet.

You seem to be generating several unnecessary blank lines

I just like the look of it, and I have the screen space to do it.

[–] [email protected] 1 points 1 year ago (3 children)

I have this in my laptop's .bashrc

PS1='\e[0m\n\e[40m[\e[32m\u\e[37m] [\e[31m\A \d\e[31m] [\e[33m`pwd`\e[37m]\e[K\n\e[K\n\e[1A'
PS0='\e[0m\n'

hintsome of the escape sequences move the cursor

full explanationgenerates the prompt:


[username] [00:01 Thu Jan 1] [/home/username]
█

with a slightly brighter/darker background (depending on terminal colors), while also resetting it to not effect the appearance of command outputs

  • \e[0m\n: new blank line
  • \e[40m: sets the background color for the prompt
  • [: literal text
  • \e[32m\u\e37m: username in green, reset color for brackets
  • ] [: literal text
  • \e[31m\A \d\e[31m: time/date in red, reset color
  • ] [: literal text
  • \e[33mpwd\e[37m: calls pwd, prints it in orange
  • ]: literal text
  • \e[K\n: fill the rest of the prompt line with the background
  • \e[K\n: fill the line where commands are typed with the background
  • \e[1A: move the cursor up so that it's in the background-filled area

I am colorblind so I may have gotten colors wrong, but that's hardly where the interesting bit is.

[–] [email protected] 2 points 1 year ago (1 children)

There is this excellent video which shows how a simple C program looks in assembly (don't worry about it being C, the program is simple enough to be understood without C knowledge). There's also this which does what the video shows automatically for you. Neither of these are fully sufficient to understand assembly but they are still incredibly useful resources.

Also: watch out for AT&T syntax vs Intel syntax if you're doing x86. It took me way to long to figure this out. And as another commenter mentioned look at TIS-100, but also some other similar games (sorted from easiest to hardest, TIS being harder than all of these): Human resource machine, EXAPUNKS, Shezhen I/O, and Box-256

[–] [email protected] 1 points 1 year ago

I sent an application last night as notherealfluffy and I'm not whitelisted yet (albeit it hasn't been 24 hours). I'm a bit afraid that if it's being manually added to the list then whoever is doing that might attempt to fix what appears to be a typo but isn't.

[–] [email protected] 8 points 1 year ago

Not really an answer to the question, but does anyone else think that the phrases "take a shit" and "give a shit" seem swapped? You say you're gonna take a shit when you are giving one to the toilet, and you say you don't give a shit when you are unwilling to take shit.

[–] [email protected] 0 points 1 year ago (1 children)

One of the reasons I really disliked Reddit and stopped using it years ago was this way of using the voting system. If I make a post, and it gets voted something like +4-10, and a reply that is some rewording of "that's a dumb statement", what am I to think? I'm certainly not going to change my mind, no one gave me a good reason to.

If one is voting because they feel they can’t stand behind their opinion if they expanded it in text… I don’t know what to tell ya.

I'm inclined to believe a lot of people do this. This is not to say they are terrible for doing this, it's that it's human nature. Replying to someone with a well thought out post takes effort and, from my experience, makes the me realize i don't know shit about the subject. Point is, this way of using the voting system breeds half-thought opinions which is a host of a lot of other problems.

[–] [email protected] 3 points 1 year ago

I think wikis have already gotten there, at least for games. All of the game wikis have gotten consolidated into fandom/Wikia, which, from my experience, has enshittification levels that makes viewing Reddit from a phone browser feel likea slick experience. You can't avoid it either. Wikis that used to be very good (at least compared to fandom, like gamepedia), have somehow gotten all pulled into the enshittification vacuum.

A few days ago I was on the Minecraft wiki, but I was playing b1.7.3 so I was viewing it on wayback. And holy shit, before fandom bought out gamepedia (albeit I was looking at the pre-gamepedia wiki), the wiki was actually usable.

[–] [email protected] 1 points 1 year ago

If you are to believe that Reddit is setting the API pricing as high as proposed to eliminate 3rd party apps, rather than to recoup costs of allowing their existence (which I wouldn't put it past them to lie like that to make it sound more palletteable), then it's reasonable to believe Apollo's existence doesn't cost them 20M$. In fact I'd be surprised if it even costs them the 10M$ figure because Reddit's reaction implies a number that high must be extortion.

view more: ‹ prev next ›