News for hackers. Stuff that matters.
Re:Duke Nukem 3D Mirror Universe by Karawebnetwork on Friday March 19, 2021 @11:57AM (#26514848)
That's one of the things I loved most about games in the 90s. Everything is a pile of hacks and tricks.

I remember doing "reverse engineering" on a bunch of those as a kid and I can definitely attribute my passion for software to those experiences.

I was actually feeling a bit disconnected from my career at the moment and reading this thread awakened some of the excitement that was sleeping inside me! The 90's are a huge source of nostalgia for me.

Edit: It reads better in a thread reader such as https://threadreaderapp.com/thread/1372766463556083715.html

Re:Duke Nukem 3D Mirror Universe by ceejayoz on Friday March 19, 2021 @12:51PM (#26515593)
> That's one of the things I loved most about games in the 90s. Everything is a pile of hacks and tricks.

Command and Conquer: Red Alert had a rules.ini file you could tweak pretty much anything on. You could give an infantry unit rapid-firing cruiser artillery cannons that'd lay waste to anything within a couple screens in seconds. Much fun was had.

Re:Duke Nukem 3D Mirror Universe by m_myers on Friday March 19, 2021 @03:17PM (#26517261)
One of Red Alert's hacks was making dogs (the unit) distinct from dogs (the projectile). That is, a dog was a dog until it began its attack. At that point it transitioned into a dog projectile, which looked like a leaping dog but wasn't targetable. Then when it collided with the enemy (infantry only), the enemy was insta-killed and the dog transitioned back into an interactible unit.

What this meant is that you could use rules.ini to make an anti-infantry submarine that launched dogs, if you so desired. Or a dog artillery. Or a dog man that used his dog gun to shoot dogs at men.

Re:Duke Nukem 3D Mirror Universe by ACow_Adonis on Friday March 19, 2021 @04:23PM (#26517822)
I took advantage of that to defeat a hacker in an online game once.

the hacker had changed his infantry so they were very cheap, and fired different weapons. he planned to win by building a barracks and spamming out his super soldiers. but there's one thing he hadn't counted on: dogs.

not only did they have the dog projectile behaviour, but infantry also had a behaviour where they had a few seconds when emerging from a barracks where they had a running animation, we're targets, but couldn't fire.

by spamming dogs, and sitting one directly outside each barracks he built, I effectively plugged each inflow of super soldier, as the dog would turn into a projectile and instantly kill all emerging infantry.

good times. and that was a particularly satisfying rage quit...

Re:Duke Nukem 3D Mirror Universe by SketchySeaBeast on Friday March 19, 2021 @04:40PM (#26517959)
So which rules.ini does the game follow? Whoever hosts I would think? Were you hosting the hacker?
Re:Duke Nukem 3D Mirror Universe by sgtnoodle on Friday March 19, 2021 @05:54PM (#26518506)
I would have thought the multiplayer code would assume deterministic consistent calculations on all clients, and only share human inputs with a cycle delay to mask the network delays. If that were the case, though, then things would get weird very quickly, and likely end with a failed assertion somewhere and the game erroring out.

Perhaps instead all calculations are performed on one client, and the full game state is transfered to the rest, perhaps with some sort of delta encoding? That seems like a fairly high bandwidth approach for the 90s, but I suppose it depends on how clever they were with the state representations.

Explicitly sharing one client's rules.ini would of course be a reasonable hypothesis. Maybe there was a good reason for that during development, perhaps so that gameplay designers could quickly iterate without having to copy files back and forth with coworkers?

Re:Duke Nukem 3D Mirror Universe by NickNameNick on Saturday March 20, 2021 @01:10AM (#26520927)
As I remember, for direct-dial-up games, both players had to have an identical rules.ini file or the game would instantly announce a desync error when the second player joined the game.
Re:Duke Nukem 3D Mirror Universe by ACow_Adonis on Friday March 19, 2021 @08:20PM (#26519535)
sorry, was what, 20 years ago now? can't remember the details (or how the multiplayer aspect/engine worked back in the day) other than the story. I do remember I probably wasn't hosting, but I also didn't have insight into what the hacker was doing except what could be observed in-game :(
Re:Duke Nukem 3D Mirror Universe by spiritplumber on Friday March 19, 2021 @08:28PM (#26519596)
If it was the DOS version of Red Alert 1, it used the host rules
Re:Duke Nukem 3D Mirror Universe by reitzensteinm on Friday March 19, 2021 @04:55PM (#26518073)
I wonder if this means that if a dog is the last unit alive, it can't attack without triggering the loss condition.
Re:Duke Nukem 3D Mirror Universe by Nition on Friday March 19, 2021 @05:35PM (#26518348)
That's the sort of bug you suddenly wake up and think of a week after the game has shipped.
Re:Duke Nukem 3D Mirror Universe by rightbyte on Friday March 19, 2021 @06:34PM (#26518812)
Deep man. Deep.

Should be quite easy to test in a multiplayer game.

Re:Duke Nukem 3D Mirror Universe by bradbot on Friday March 19, 2021 @09:47PM (#26520036)
But what does a dog attach if it's the last unit alive?
Re:Duke Nukem 3D Mirror Universe by Nition on Friday March 19, 2021 @10:47PM (#26520375)
The parent comment meant your last unit alive. If the enemy had no units, you would have already won.
Re:Duke Nukem 3D Mirror Universe by spiritplumber on Friday March 19, 2021 @08:27PM (#26519585)
You could also make a dog that would turn into a bolt of lightning (and then back into a dog)
Re:Duke Nukem 3D Mirror Universe by schoen on Friday March 19, 2021 @11:53PM (#26520696)
Re:Duke Nukem 3D Mirror Universe by edbob on Saturday March 20, 2021 @02:47AM (#26521295)
Or a fireball.
Re:Duke Nukem 3D Mirror Universe by walexander on Friday March 19, 2021 @01:19PM (#26515896)
You could do a similar style of hacking in Dark Forces 2, which had "cog files" that were controlled client side and let you change the projectile of any weapon. At first it was fun to replace your pistol bullets with rockets, or have your rocket launcher shoot light sabers.

Eventually we realized you could actually make structures like bridges and stairs shoot out of your weapon, so it created this minecraft/gary's mod meta game of building platforms and structures out of your weapons, a decade before those came out. Fun times and definitely helped me on my career towards software.

Re:Duke Nukem 3D Mirror Universe by teamonkey on Friday March 19, 2021 @02:39PM (#26516911)
More than just config files, Cog was a powerful event-based scripting language

https://www.gamasutra.com/view/feature/131641/adding_languag...

Re:Duke Nukem 3D Mirror Universe by allan-a on Saturday March 20, 2021 @02:26AM (#26521212)
This was my main gateway drug into programming. I would love disclose some of the best hacks that I came up with someday! This game was one of the best FPS games ever.
Re:Duke Nukem 3D Mirror Universe by skocznymroczny on Friday March 19, 2021 @03:14PM (#26517224)
Doom was configurable like that with a tool called Dehacked. I remember mod packs for the tool, doing things like "mine layer", which set the rocket speed to 0 and made it cloaked, so that you could lay a minefield and then make the monsters walk into it. Or make the rocket launcher shoot lost souls, make chaingunners fly and many many more.
Re:Duke Nukem 3D Mirror Universe by tomduncalf on Friday March 19, 2021 @03:58PM (#26517608)
Wow I’d forgotten all about hacking rules.ini! That and hacking around with QuakeC and Quake level editors are fond memories of the earlier days of gaming :)
Re:Duke Nukem 3D Mirror Universe by spiritplumber on Friday March 19, 2021 @08:29PM (#26519603)
I was one of the contributors to That One Grenade Mod. Much fun, much desync when there were too many nail grenades around...
Re:Duke Nukem 3D Mirror Universe by elihu on Friday March 19, 2021 @11:15PM (#26520543)
One of the things I miss about those days is that the graphics and physics was done in software. That meant that the features weren't determined by industry standard APIs and what sort of hardware accelerators your customer had, they were just something you make up as you go along. Resolution and/or framerate were usually abysmal, but on the other hand you might try out some new game and it would do something weird and surprising that you didn't even know was possible.

There's something satisfying about knowing that someone could just start with a blank editor and create a whole world from first principles, and that's how a lot of games were made.

Re:Duke Nukem 3D Mirror Universe by tomaskafka on Saturday March 20, 2021 @06:49PM (#26526647)
I still remember 1999's Outcast with its software-rendered voxel engine, and level of detail absolutely outclassing every other game of that era: https://www.youtube.com/watch?v=6QgVGBqsJMA
Re:Duke Nukem 3D Mirror Universe by gagege on Friday March 19, 2021 @02:55PM (#26517063)
I've been working on a game and I've realized it's still all just a bunch of tricks. I think any art where you're trying to recreate/honor something in the real world in some way is all tricks and techniques. Everything from brushstrokes on a painting to plots in novels to special effects in movies and acting in movies is all just a bunch of tricks to make something look real. The better the trick, the less suspension of disbelief is required.
Re:Duke Nukem 3D Mirror Universe by schnevets on Friday March 19, 2021 @04:22PM (#26517809)
There is a possibility that software engineers 50 years from now will continue to appreciate "shrinkwrapped" products from the late 20th century. There are less hacks and tricks these days because codebases are perpetually changing.

If a company releases a tomorrow, and one week later a player discovers an exploit, it will likely get patched, repaired, and redeployed. So which version is "gold": the day 1 sale, or patch 1.01a? Obviously, it's a classic thought experiment, but games are a form of art where such revisionism is so prevalent.

Re:Duke Nukem 3D Mirror Universe by 0-_-0 on Friday March 19, 2021 @12:06PM (#26514989)
> That's one of the things I loved most about games in the 90s. Everything is a pile of hacks and tricks.

It still is, e.g. how shadows are done with shadow maps.

Re:Duke Nukem 3D Mirror Universe by Someone1234 on Friday March 19, 2021 @12:22PM (#26515196)
I agree. But it does raise an interesting philosophical question: At what level of advancement does a hack stop being a hack.

Like most would agree that Ray-Tracing is the "real deal" relative to shadow mapping, but with how far shadow mapping has come can it really be considered a "hack" still?

Re:Duke Nukem 3D Mirror Universe by seanwilson on Friday March 19, 2021 @01:12PM (#26515821)
> Like most would agree that Ray-Tracing is the "real deal" relative to shadow mapping, but with how far shadow mapping has come can it really be considered a "hack" still?

Even ray tracing isn't the real deal and isn't trying to closely simulate reality. You need to use hacks in ray tracing for soft vs sharp shadows, for light patterns on glass objects like wine glasses (caustics), to get illuminated surfaces to spread their colour to other objects (colour bleeding) and more.

Phonton mapping gets closer but is even more expensive:

https://en.wikipedia.org/wiki/Photon_mapping

Phonton mapping is trying to model the path of all photons being emitted from light sources back to the camera vs ray tracing that works backwards by tracing rays out of the camera back to the light sources i.e. ray tracing is an optimisation.

Re:Duke Nukem 3D Mirror Universe by gmueckl on Friday March 19, 2021 @05:29PM (#26518305)
This post deserves a long reply.

You seem to think that ray tracing as a very limited thing. I guess it stems from the fact that the nomenclature has become a bit murky in recent years. Ray tracing often is used to refer to the initial algorithm developed by Whitted. This has pretty much all these limitations you mention, but it is an obsolete method. What usually gets mixed in with ray tracing in marketing and non-expert discussions is also path tracing and its various variations. These methods are capable of solving the rendering equation exactly for a huge range of scenarios. Unfortunately, some variants deal with certain situations better than with others and there is no overall best algorithm. But you can most certainly trace absolutely perfect soft shadows or complex caustics with these methods. Color spills are a walk in the park even for simple unidirectional path tracing. The main limiting factor right now is that these are all Monte Carlo methods and need to draw high numbers of samples for each pixel to converge. This is why fast and accurate denoisers are such a huge deal at the moment. They are another hack, a last one that ideally fades away as the number of rays per second increases. Beyond that, it "just" comes down to modelling surfaces and materials accurately enough to get a photorealistic image.

As you mention photon mapping: it has pretty severe limitations, notably around the handling of specular paths and the biased artifacts created by the filter kernel (loght leaks, certain SDS-type paths aren't covered). There are some improvements like (A)PPM which converge to unbiased solutions with infinite runtime. At that point, path tracing based methods become more attractive w.r.t. runtime, memory requirements and implementation complexity.

Re:Duke Nukem 3D Mirror Universe by seanwilson on Friday March 19, 2021 @06:25PM (#26518746)
> You seem to think that ray tracing as a very limited thing.

My point was mainly that ray tracing is still a hack like polygon based rasterization is, that's a combination of clever tricks to get something to look good enough with modest resources.

Re:Duke Nukem 3D Mirror Universe by gmueckl on Friday March 19, 2021 @07:26PM (#26519198)
I'd advise you to be more precise in your wording. The terminology is a bit tricky. Path tracing (which I assume you're actually referring to) as a an algorithm isn't a hack at all. It's a direct Monte Carlo solution to the rendering equation which has a pretty straight, albeit long, derivation from Maxwell's equations. Ray tracing hardware (that is, hardware accelerated ray-geometry intersection computation) is still quite constrained computationally. That's why we see little actual path tracing in real time renderers at this time and more of the slightly more correct rasterization based hacks that include ray intersection queries instead of screen space/cubemap based guestimates. Calling them ray tracing is technically somewhat misleading in my opinion.
Re:Duke Nukem 3D Mirror Universe by account42 on Monday March 22, 2021 @05:25AM (#26538488)
You got that backwards, photon mapping is a hack in the same sense as shadow mapping while ray trasing is the real deal (although implementations will likely resort to hacks for perfromance reasons). Soft shadows are simply a matter of making light sources have a non-zero volume and while tracing rays from the camera instead of the lights is an optimization, it is a valid one that (given infinite rays) produces the correct result and is not a hack.
Re:Duke Nukem 3D Mirror Universe by core-questions on Friday March 19, 2021 @02:46PM (#26516973)
Is anyone doing realtime photon mapping, maybe using some of that RTX stuff?
Re:Duke Nukem 3D Mirror Universe by mike_d on Friday March 19, 2021 @04:11PM (#26517723)
Re:Duke Nukem 3D Mirror Universe by Frost1x on Friday March 19, 2021 @03:05PM (#26517155)
Here's where it gets tricky. I do a lot of modeling and simulation work that is often incorporated in interactive 3D environments and the conversation I have over and over where people fail to realize is that you're always taking shortcuts to simulate some aspect of reality.

The point of games is to get as close to reality that people suspend disbelief and can immerse themselves into the virtual reality you've created. Sometimes enough realism and immersion can be had at cheaper computational costs so these hacks (gross simplifications) are the way to go. Sometimes though, you realize if you can better model aspects of reality more accurately, you can get even better immersion a d suspension of disbelief.

In the world where more sophisticated computational models are utilized in these environments because the results are important, used beyond suspension of disbelief and actually need to map reality because the simulation is trying to accurately represent some aspect of reality for a real world decision to be made, you still have to take clever computational shortcuts. As far as we know that will always be true unless you build a simulation environment that can fully represent our reality which might never be possible from an engineering or even scientific standpoint.

So the discussion I often have is: what deviations from reality are we willing to tuck into our models and simulations? We already can't do all of existing science and we can't do what's beyond existing science so what tradeoffs can we accept in the subset of science for our simulation.

Even raytracing doesn't go far enough because it takes a lot of shortcuts with reality. Pretty much none of these engines take into account relativistic distortions of light (some work has been done) and they frankly don't need to for almost every application outside of visualizing gravitational lensing and black holes accurately. In sure some bright physicist reading this is aware of even more faults in light and photon models and simulation approaches I'm completely unaware of. The onion peels quite far. The most obvious missing aspect for all environments is that we always simplify the actual geometry of the space because we have to.

Re:Duke Nukem 3D Mirror Universe by gmueckl on Friday March 19, 2021 @05:42PM (#26518409)
Well, there is a very obvious limit to the fidelity of your simulation if presence is your goal: human perception. You don't need to crank up any details beyond what you can possibly perceive when using the simulation. Gravitational space distortions are the least worrisome effects in that regard. Light diffraction and polarization play a much larger role in our environment, although not often and if it happens, the untrained eye tends not to notice. I am talking about things like birefringent materials (quartz crystals) and diffraction effects like light reflected off of a CD or shining through a thin piece of cloth.

You can repeat the same process with each kind of sensory input a human can perceive and get to pretty hard limits on the requirements to get "perfect" realism. Human perception hasn't been researched in enough detail yet to give accurate bounds in all cases, but this is actively being worked on. The known bounds are mostly really conservative ones.

Re:Duke Nukem 3D Mirror Universe by schoen on Friday March 19, 2021 @11:58PM (#26520709)
I wonder if there's a problem where, in a realistic enough simulation, people could find or build objects that should be equivalent to instruments like telescopes and microscopes, and then expect them to work properly! (Or more generally, instruments that enhance their senses, like an ear trumpet or parabolic microphone.)
Re:Duke Nukem 3D Mirror Universe by nyanpasu64 on Friday March 19, 2021 @07:49PM (#26519316)
Missing features in most game engines include spectral rendering (supported in some programs) and diffraction effects/Fourier optics (I think only really supported in radar design programs, not visual renderers).
Re:Duke Nukem 3D Mirror Universe by _jal on Friday March 19, 2021 @12:30PM (#26515314)
This starts drifting way off topic, but hacks are typically characterized by being "clever". Which is hard to define, but is usually surprising in some way.

I think it stops being a hack when the surprise is gone - when you've explored the mechanism, understand the tradeoffs, where it does make sense and doesn't, etc.

Re:Duke Nukem 3D Mirror Universe by meheleventyone on Friday March 19, 2021 @12:56PM (#26515655)
I'd say a hack is a technique with caveats that let's you work around a limitation. Ray tracing is still too computationally expensive so the current raster pipeline is all a hack to work around that fact. It's also an incredibly well established and close to ground truth hack but there are lots of caveats where things go astray. Off the top of my head transparency is still largely problematic.
Re:Duke Nukem 3D Mirror Universe by dfxm12 on Friday March 19, 2021 @02:11PM (#26516599)
At what level of advancement does a hack stop being a hack.

Maybe when it becomes documented or otherwise supported?

Re:Duke Nukem 3D Mirror Universe by tshaddox on Friday March 19, 2021 @02:43PM (#26516941)
I think when we talk about something being a hack, we have a context in mind and a goal in mind, and the "hack" is just the way we achieved this goal that wasn't immediately obvious within this context. Of course, once this non-obvious solution becomes well-known, it's incorporated into the context and thus is no longer thought of as a "hack."
Re:Duke Nukem 3D Mirror Universe by globular-toast on Friday March 19, 2021 @01:58PM (#26516401)
> Everything is a pile of hacks and tricks.

It still is. Everything is. If an individual or company is working at a level that feels comfortable then what they're doing is easy now and anyone can do it. Everyone has to work at the level where it all feels like a hack because if you don't, someone else will.

Re:Duke Nukem 3D Mirror Universe by GordonS on Friday March 19, 2021 @01:33PM (#26516061)
Ah, I remember decompiling Quake mods, and learning about how the AI worked, A* search etc. At that time I was still on dialup, and there was a fraction of what's available now on the Internet available - it was really useful for learning, and game mods was a big part of keeping me interested in computing.
Re:Duke Nukem 3D Mirror Universe by arendtio on Friday March 19, 2021 @07:01PM (#26519039)
Actually, I hate it: Once you have discovered the hacks, there is no way back and those carefully designed illusions are lost for you, forever ;-)

But yeah, the ideas some people come up to make something work are pretty amazing.

Re:Duke Nukem 3D Mirror Universe by bschne on Friday March 19, 2021 @07:07PM (#26519077)
I figure to a certain kind of player the appreciation for how it was done is just as, if not more beautiful than the illusion ever was.
Re:Duke Nukem 3D Mirror Universe by Shivetya on Friday March 19, 2021 @12:40PM (#26515427)
oh I think it was far earlier, I remember disk doctor days and editors letting you change values if not finding hidden commands to give you more power.

Heck even yanking a floppy out to avoid a death was not uncommon with some games.