> a lighting trick from John Carmack's Quake is still used in Half-Life: Alyx, over 25 years later> a simple string of letters controls how lights flicker, with each character representing a brightness levelIn the 90s programmers knew how to code. Nowadays, it's unoptimized AI slop written by jeets.
White men know how to code. AI shills are indians
>>751687761What gay ass language is this?
>>751688001C++ though Quake was written in C
>>751687761>const char *flicker = https://www.youtube.com/watch?v=32Hp1LW08Yc
MMAMAMMMMAMMAMAMAAAMAMMMA
>>751688126Quake 2 was written in C++So is legacy quake 2 code
>>751688425>Quake 2 was written in C++No? I think it wasn't until DOOM 3 was when the engine started using C++.Valve's Goldsource, Source, and Source 2 were all written in C++ though.
>>751687761>carmack wouldn't use % but power of 2 &>carmack wouldn't use strlen but sizeof for constant length datathe code looks like dogshit i wonder if it's even from carmack at all
>>751687761why is it a string thou, this seems really unefficientliterally wasting bytes of ram there
kinda funny that he was working on meta quest shit competing with alyx
>>751688425Up until Quake 3 was written in CDoom 3 was the first use of C++
>>751687761>In the 90s programmers knew how to code.I might be missing something, but isn't this about as basic as it gets pretty much? It's just iterating over an array/pointer/whatever and doing a basic if statement?Like this is the stuff you learn 10 minutes into a youtube tutorial.
>>751687761post the original code and not an LLM's impression of it
>>751687792Proof that Americans aren't white.
>>751688748From what I understand, alot of people just randomly attribute stuff to Carmack. Like everyone says fast invert square root was Carmack, but it was something that he picked up from someone else. Basically if there was any code magic in an ID game, everyone just assumes Carmack did it.
>>751689107https://en.wikipedia.org/wiki/Elegance
>>75168910740 years ago a lot of things were new ground and fresh methods to solve an unsolved problem.Besides, anyone talking about modern code and programmers as if its better or more correct is mentally retarded.We have 800MB "apps" that take 100x the CPU requirements to do the same thing as a text messenger from 1998. And they run worse and slower despite having 100x the CPU and resources.
>>751689471someone post the meme and github page.
>>751687761If it ain't broke, don't fix it.
>>751689349Yup.>everyone keeps talking about Carmack's lightwhat about Carmack's shadow? https://en.wikipedia.org/wiki/Shadow_volume
>>751688001do they really not even teach kids C++ anymore?
>>751690114there's nothing about it that makes it C++ it's just C>"just" C muh muh muh what about C80 C89 C99 C11 C17 C23 MUH MUH DICK
you retards are hopeless
>>751690380LOL code in OP is even wrong it doesn't shimmer at all
>>751687792India is number 1. Top American CEOs? All Indians. Wealthiest Americans? All Indians. Apologize.
>>751688927Maybe it was written with C in mind and the bit size was the same? Not a compsci guy.
>>751688927>literally wasting bytes of ram thereHow many flicker patterns do you intend to have where that would even be an issue?
>>751687761Don't fix it if it ain't broken.
>>751687761>In the 90s programmers knew how to code. Nowadays, it's unoptimized AI slop written by jeets.>null-terminated string>strlen>bytes when you mean bitsThat code is already slop.
>>751690843>fell for itgood goy yes believe everything you see and are told
>>751690380I fell for fake a OP again
Weird how carmack is an indian loving AI tranny now though.But I guess you didn't know that one did you
>>751687761>using strlen to go over the entire string every time looking for a null terminator to find its length (no, MSVC doesn't optimize it)>instead of saving its length or, God forbid, using std::string like a sane personquality Valve code, no wonder their modern wokeslop barely runs
ooh mamma
>>751690380Alsohttps://github.com/id-Software/Quake/blob/bf4ac424ce754894ac8f1dae6a3981954bc9852d/QW/progs/world.qc#L337
>>751690380OP code does this with a single hardcoded lightstyle (mmmammamamamammaa)
Let's post some webms/gifs from cool retro games then.
>>751690583>>751690673You're both fucking retarded, learn to comprehend a joke when you see it.
>>751688351lolled
>>751692047Couldn't light strobe have just been "ma"?
>>751687761
>>751693928Maybe there's a noticeable delay when the loop ends before it restarts, so they extend the loop long enough that you should pass by before the reset.
>>751691840>using the standard library for anything performant
>>751693929Carmac's code lives on.
>>751687761c = m? But c isn't m. What is this woke insanity?
>>751694362retard
>>751687761MAMA MAMA MAMA PLEEEAASEcan't you flicker my lightscan't you flicker my lightscan't you flicker myah ah ah
>>751694690OpenGL had trouble with animated textures
>>751693445NTA lrn2joke first you abysmally unfunny clown
>>751689256obsessed
>>751693929neat
>>751687761Isn't this directly tied to the Hammer editor? IIRC you could manually type in your own flicker options.
>>751695716Yeah I thought it looked familiar. I'm not a coder, but would that have anything to do with it being stored as string as others are suggesting?
>>751687792>Japan devs are 80%+ into AI>Japan that low>chatGPT exclusive chart buy an ad
>>751688236>>751688351kek
>>751688126>>751690114it would compile under C, so i say it's C>>751688748this, the strlen() is particularly egregious here
>>751695878>>751695716Yes, Doom/Quake engine used string of letters instead of list of numbers for brightness as a small lifehack for level designers. Entering nmponmpo is easier than 130,129,132,131,130,129,132,131 etc
>>751687761this is just a cached comparison, except cached against something simple so it looks silly and high iq at the same timeheres another set of examples:>I flip a coin, if its heads, flip again, if its tails return the number of heads flipped correctly. Technically doesn't even have to be 50/50, can be 99/1simply rand a float between 0 and 1 with relevant degree of precision, then cache a raw integer array representing that random value but multiplied by 1000 that inside its value contains the resulting amount of heads results. can easily cache for any amount>an A* pathfinding map that never changeswhen you calculate a path from X to Y, remember it. Then absorb the result into any bigger path that contains it (eg X-1, Y+1) and simply count the steps from X-1 to Y, and when asked 'how to get from X to Y' again the answer is 'X-1 to Y+1 but 2 steps earlier'>basic culling trickinstead of checking all the models for individual models to render, only check the ones the player is guaranteed to see (using their FoV) + 1 large tile extra, because theres always models that are big enough to appear on a tile next to them if placed on the edge as to avoid pop in
That's because you had to actually figure out how to do shit back then because this shit was an entirely new medium and technology. You read about the shit Miyamoto wanted to do in SMB1, on a fucking Famicom/NES, like Mario punching, kicking, using a gun, riding a dinosaur, etc. Even ignoring how many buttons are on a NES controller they had to tell him to chill out. Eventually he got his wish with Yoshi in SMW and Mario having a more expanded moveset in Super Mario 64.Carmack being able to replicate Mario's scrolling levels on a PC was a feat of engineering in 1990 compared to how stiff PC platformers often was compared to arcades/consoles, and laid the groundwork for the FPS genre.20-30 years ago I was making shit in RPG Maker and Half-Life 1/2 mods and that was pretty streamlined and straightforward for the day, enough to make simple stuff and rudimentary programming systems if you wanted to go really off the wall. These days there is so much that is pre-made for you. That's why Halo Studios' last hail mary involved a switch to Unreal engine, and now you got Xbox's boss soft launching an AI slop initiative. They were so dependent on contractors instead of attempting to build and retain a team with institutional and technical knowledge that they just went with the shit every amateur and design school teaches people on. The shareholder appeasing strategy of making shit and firing people after the game ships has finally caught up to a lot of devs leading to these bloated development times and paint-by-numbers programming entirely dependent on the Unreal cartel.
>>751697167completely clueless. sad to see.
>>7516987011 and 3 are real application, 1 especially if its not a 50/50 and the 3rd trick is used everywhere. instead of iterating over every object, calculating if its in the right tile then doing stuff if it is, instead you have a cache of units per tile and then iterate through the tiles. literally every culling and pathfinding algo relies on that
>>751687792Show per capita, micropenis TimmySHOW. PER. CAPITA.
>>7516987012 is only useful in a niche case where the >map is big>uses A* >the map pathability is never modifiedwhich isnt something that happens in games but is/was used by Google maps
>>751698885>>751699347yeah you've heard of those algorithms and understood nothing about them. sad. and flickering lights have nothing to do whatsoever with anything you said. very very sad. my advice: stick to vibecoding
>>751699859>yeah you've heard of those algorithms and understood nothing about themNot true, I wrote them in my own stuff before I found them online by googling later. Just be creative 4head
THE MAMA THE MAMMA THE MMMAMA
>>751687761Uh... Why not an array of 0 or 100s? What is the point of the m a branch?
>>751689107if you tried to shove this into an "enterprise" code base today you'd be knocked down at the review step. "Using a string for this is pretty hard to grok"You'd be forced to make some kind of LightController class, and then some unique type to represent the flicker, and probably a few other random points of abstraction.