News for hackers. Stuff that matters.
Re:Commander Keen's Adaptive Tile Scrolling by mortenjorck on Thursday July 27, 2023 @06:27PM (#36900978)
The fluidity of the scrolling in Commander Keen 4-6 was unmatched on PC for years, even as games moved to 256-color graphics. Between Carmack's incredible technical work and Adrian Carmack's [1] art, Id had perhaps the best-looking PC platformer well into the 1990s.

[1] No relation to the more famous Carmack, but IMO the unsung master of the 16-color palette.

Re:Commander Keen's Adaptive Tile Scrolling by Aeolun on Thursday July 27, 2023 @07:59PM (#36901668)
I think it might be hindsight, but a lot of these ‘revolutional’ developments seem kind of simple compared to a lot current development.

“Our memory is slow, so let’s redraw only things that changed” is kind of a given nowadays.

Still the optimization in 4-6 is fun. Did the whole thing in 1-3 just because of an assumption that the buffer would not wrap around, and then it did and all that work became obsolete.

Re:Commander Keen's Adaptive Tile Scrolling by Sharlin on Thursday July 27, 2023 @08:28PM (#36901871)
Games have redrawn everything on every frame for decades, certainly since GPUs became a thing. Memory speed is definitely not a concern. 2D windowing systems used to only redraw "dirty rectangles" but that changed when they moved to GPU compositing as well.

On the other hand, of course, CPUs do have a complex system of several levels of caches, but that's not primarily because of (lack of) memory bandwidth but memory latency.

Re:Commander Keen's Adaptive Tile Scrolling by badsectoracula on Thursday July 27, 2023 @10:06PM (#36902425)
> 2D windowing systems used to only redraw "dirty rectangles" but that changed when they moved to GPU compositing as well.

For Win32 and X11 at least the damaged region (or "invalid region") approach is still there and AFAIK recently (as in a few months ago) the modesetting driver for Xorg added the ability to use the damage regions when "TearFree" is enabled (this does server-side composition to avoid tearing - it is disabled by default) to only update the of the screen that changed instead of the entire screen.

Also i remember reading some time ago about some monitors being able to use partial frame data (the monitor "shadows" the frame) so that they can support faster updates.

I think the concept can also help with slow display tech like e-ink devices.

Re:Commander Keen's Adaptive Tile Scrolling by HWR_14 on Thursday July 27, 2023 @11:05PM (#36902719)
Games started redrawing everything because once you have a camera that rotates in 3D, the pixel reuse drops a lot vs one that pans over a 2D plane.
Re:Commander Keen's Adaptive Tile Scrolling by esprehn on Thursday July 27, 2023 @11:11PM (#36902756)
All modern web browsers still do tiling (at the compositing layer level). It's the only way to handle large layers and scrolling efficiently.

Some also implement partial redraw into the tiles to handle things like cursors blinking to avoid having to redraw the entire tile.

Re:Commander Keen's Adaptive Tile Scrolling by pjmlp on Friday July 28, 2023 @02:08AM (#36903528)
More like after shaders became a thing, and it hardly matters when it is an application runnning on the GPU that is responsible for actually drawing.

However it is still an issue if one wants to achive maximum performance, and it is done by only sending the vertices and textures to the GPU that are actually going to be visible.

Re:Commander Keen's Adaptive Tile Scrolling by djmips on Friday July 28, 2023 @02:25AM (#36903616)
Some modern game UI still use dirty draw tech.
Re:Commander Keen's Adaptive Tile Scrolling by II2II on Thursday July 27, 2023 @08:22PM (#36901827)
If I recall correctly, the original Macintosh would go as far as telling the software which regions of a window had to be redrawn at any given time so the idea itself wasn't exactly new. The thing is that these optimizations required tradeoffs. Figuring out which tiles had to be updated required storing extra data and doing extra computations. Not only did you have to recognize the value of these techniques, you actually had to write the code in a way that did not slow things down (and design the levels so they would not slow things down).
Re:Commander Keen's Adaptive Tile Scrolling by magicalhippo on Thursday July 27, 2023 @09:11PM (#36902082)
Windows has had this[1] for as long as I remember as well, at least since Windows 3 days so I assume since the very beginning.

[1]: https://learn.microsoft.com/en-us/windows/win32/gdi/clipping

Re:Commander Keen's Adaptive Tile Scrolling by peterfirefly on Friday July 28, 2023 @09:58AM (#36906863)
They needed the same info to do clipping (on both the Mac and Windows).

I think it is more interesting that the pipeline was invalidaterect/region => getevent => event was a draw event => draw region (or part of it). The getevent would only generate draw events if nothing more important was going (keyboard/mouse input, timer, message from other app/desktop accessory). It would also prioritize top windows first so you would only get a draw event for a window at the bottom once the windows above had no more dirty areas.

If you really knew what you were doing, you could short circuit this a bit and draw in your windows outside of draw event handling.

Re:Commander Keen's Adaptive Tile Scrolling by incrudible on Thursday July 27, 2023 @08:07PM (#36901722)
“Our memory is fast, so let us redraw everything” is a given. Our web APIs on the other hand are incredibly slow, so let us carefully track changes in a complicated runtime (or compiler) to avoid redundantly modifying properties in a tree.
Re:Commander Keen's Adaptive Tile Scrolling by dylan604 on Thursday July 27, 2023 @11:06PM (#36902729)
>I think it might be hindsight, but a lot of these ‘revolutional’ developments seem kind of simple compared to a lot current development.

Yes, it's you and your vaulted position of standing on the shoulders of those to whom these developments actually were ‘revolutional’. I equate the level of accomplishments from Id to be at the level of cavemen throwing rocks at the spaceship to cavemen buying insurance on TV levels of achievement.

Re:Commander Keen's Adaptive Tile Scrolling by x0x0 on Friday July 28, 2023 @12:54AM (#36903221)
If you weren't playing games in early 1997 then Quake started using voodoo cards, it's nearly impossible to understate the before vs after.

Carmack and id are responsible for at least 4 or 5, "I had no idea a computer could do that" moments for me.

Re:Commander Keen's Adaptive Tile Scrolling by fzeindl on Thursday July 27, 2023 @11:48PM (#36902953)
> “Our memory is slow, so let’s redraw only things that changed” is kind of a given nowadays.

Tangentially related: Android still doesn't get this. Turn on the screen refresh flashes in the developer menu and then look a your static screen and be amazed who often android draws even though nothing changed.

Re:Commander Keen's Adaptive Tile Scrolling by ajuc on Friday July 28, 2023 @01:55AM (#36903473)
With modern gpu pipeline and cost of cache misses compared to CPU cycle being what they are - it's almost certainly faster to redraw a few thousand sprites no matter what than to check what changed and redraw only a subset of them.

Energy efficiency is a separate matter.

Re:Commander Keen's Adaptive Tile Scrolling by djmips on Friday July 28, 2023 @02:23AM (#36903599)
That's not true at all
Re:Commander Keen's Adaptive Tile Scrolling by ajuc on Friday July 28, 2023 @02:32AM (#36903654)
Iterate over 1000 objects doing ifs and draw let's say 50 of them vs dump them in VBO and call glDrawArrays every frame drawing all 1000 of them?

I'm willing to bet :)

The difference in time spent by GPU between drawing 1000 and 50 sprites is almost 0.

Re:Commander Keen's Adaptive Tile Scrolling by dakom on Friday July 28, 2023 @03:05AM (#36903823)
Is there another way? I've only done WebGL, so not familiar with Vulkan/Metal/DirectX/etc. - but in my experience you're clearing the screen and re-drawing everything every tick no matter what. If only for applying post-processing effects.

Updating buffers is of course a totally separate thing, and on that side I don't think anyone updates everything every tick, usually there's some sort of scene graph that knows about dirty transforms and their children, so only those get updated..

Re:Commander Keen's Adaptive Tile Scrolling by izacus on Friday July 28, 2023 @05:33AM (#36904667)
This is nonsense, Android always did "this". It always rerendered only damaged regions and even after switching to HW accelerated rendering, it still only rerenders changed views.

And the animation framework always just "scrolled" the view (or screen) when it could.

Re:Commander Keen's Adaptive Tile Scrolling by anthk on Friday July 28, 2023 @05:09AM (#36904529)
Ncurses does the same on text, just redraw what it changes. Reason? Think about slow terminals or modems.
Re:Commander Keen's Adaptive Tile Scrolling by ygra on Monday July 31, 2023 @07:57AM (#36941327)
When I developed a text-mode UI library (not using curses) with a friend in university for fun, we tested this on his actual terminal connected via serial cable. You'll notice unnecessary redraws very quickly that way. (Granted, piping the output through some throttling may have had the same effect, but there was something about writing modern code (even as students) and seeing it work on decades-old hardware :).)
Re:Commander Keen's Adaptive Tile Scrolling by kolanos on Thursday July 27, 2023 @08:06PM (#36901721)
TIL that Adrian Carmack isn't related to John Carmack. Weird.
Re:Commander Keen's Adaptive Tile Scrolling by bombcar on Thursday July 27, 2023 @09:33PM (#36902210)
They continue to be the only two Carmacks I’ve ever heard of.
Re:Commander Keen's Adaptive Tile Scrolling by Dwedit on Thursday July 27, 2023 @09:12PM (#36902092)
What about Jazz Jackrabbit? That game had some seriously fluid VGA scrolling.
Re:Commander Keen's Adaptive Tile Scrolling by kemayo on Thursday July 27, 2023 @10:51PM (#36902666)
Came out in 1994, which more or less aligns with OP's "well into the 1990s" timeline.
Re:Commander Keen's Adaptive Tile Scrolling by marmakoide on Friday July 28, 2023 @04:19AM (#36904241)
In 320x200 or 320x240 VGA, you could had essentially the same trick for scrolling window over the VRAM, checkout Mode X VGA. The Allegro library had baked-in support for that, at least in the early 2000's.
Re:Commander Keen's Adaptive Tile Scrolling by kemayo on Thursday July 27, 2023 @10:51PM (#36902660)
I'm intensely weirded out to see that all of the classic Commander Keen games were developed-and-released between December 1990 and December 1991. That is a wild pace of graphical and gameplay development.

Check out the evolution from the first game: https://en.wikipedia.org/wiki/Commander_Keen_in_Invasion_of_...

To the last game: https://en.wikipedia.org/wiki/Commander_Keen_in_Goodbye,_Gal...

I was playing them at the time, as a young child, and I'd forgotten the pace at which things were apparently happening.

Re:Commander Keen's Adaptive Tile Scrolling by pbourke on Friday July 28, 2023 @12:58AM (#36903234)
Not to mention: Wolfenstein 1992, Doom 1993, Doom II 1994, Quake 1996. Unbelievable pace.
Re:Commander Keen's Adaptive Tile Scrolling by jandrese on Friday July 28, 2023 @01:20AM (#36903330)
The joke at the time was that if your machine was more than 6 months old it was obsolete. So many aspects of computers were developing at a breakneck pace it was almost impossible to keep up.
Re:Commander Keen's Adaptive Tile Scrolling by beebeepka on Friday July 28, 2023 @01:42AM (#36903427)
Re:Commander Keen's Adaptive Tile Scrolling by rob74 on Friday July 28, 2023 @02:28AM (#36903637)
Yeah, I had a pretty new PC (my first one after heavy-heartedly switching from the beloved Amiga to the despised PC) when Doom was released, and all my friends would come over to play because it could run it full screen (older 386 and weaker 486 CPUs were not fast enough, so you had to reduce the size of the game screen and play with an ugly static border around it). Then just a few years later I installed the Quake demo and all I got to see was an error message. The PC had a pretty exotic IBM "Blue Lightning" CPU which was a "486SX3", i.e. it ran at 75 MHz internally, 25 MHz externally, and didn't have a built-in FPU - which was a requirement for Quake. So I realized it was time to upgrade to a Pentium CPU...
Re:Commander Keen's Adaptive Tile Scrolling by dehrmann on Friday July 28, 2023 @03:06AM (#36903835)
You say you've had your desktop for over a week? Throw that junk away, man, it's an antique.
Re:Commander Keen's Adaptive Tile Scrolling by NovaDudely on Friday July 28, 2023 @02:18AM (#36903576)
We went from Wolf3D to Quake 3 in 7 years.

So from software Ray Casting to full 3D acceleration in that time period.

7 years ago from now we had Uncharted 4, it is behind were we are now but not as much as you would think.

Re:Commander Keen's Adaptive Tile Scrolling by HideousKojima on Friday July 28, 2023 @09:23AM (#36906412)
And in some cases games have gone backwards, this video comparing Arkham Knight to Gotham Knights being a prime example:

https://m.youtube.com/watch?v=2L3hVUPSDGc

Re:Commander Keen's Adaptive Tile Scrolling by ryandrake on Friday July 28, 2023 @05:43PM (#36913764)
For comparison, a little over a month from now will be GTA 5's 10 year anniversary, and GTA 6 is still nonexistent. Who thinks the technology leap between 5 and 6 will be anything remotely like the difference between Wolf3D and Quake 3?
Re:Commander Keen's Adaptive Tile Scrolling by Cthulhu_ on Monday July 31, 2023 @10:58AM (#36943589)
But also, only a few years after Wolf3D we got Toy Story in 1995, the first major CGI full feature film. Six years later in 2001 we got The Spirits Within, the first attempted full-feature photorealistic film (it hasn't aged well and it bankrupted the company at a cost of $137 million at the time). And now we live in an age where realtime graphics look better than pre-rendered CGI films from 20 years ago... which also includes Lord of the Rings come to think of it.
Re:Commander Keen's Adaptive Tile Scrolling by midoridensha on Friday July 28, 2023 @06:07AM (#36904868)
And somehow they managed this incredible pace of software development without modern tools like git, or probably any kind of revision control system even (RCS/CVS/ClearCase were available on Unix systems, but in the DOS world I don't think there was anything).
Re:Commander Keen's Adaptive Tile Scrolling by BlackFingolfin on Friday July 28, 2023 @08:24AM (#36905824)
Fun fact, Doom was actually developed on a NeXTStation, so with a Unix based OS (and predecessor to modern day macOS).
Re:Commander Keen's Adaptive Tile Scrolling by phkahler on Friday July 28, 2023 @09:50AM (#36906768)
>> And somehow they managed this incredible pace of software development without modern tools like git, or probably any kind of revision control system even...

It's not that hard when one guy is writing the rendering code, another doing game logic, one doing artwork, one level design, and one doing sound. Nobody is really stepping on anyone's toes.

Re:Commander Keen's Adaptive Tile Scrolling by midoridensha on Monday July 31, 2023 @12:58AM (#36938960)
Yes, that keeps people from stepping on each others' toes, but revision control systems are really useful even for a single developer working alone, just to track changes, make changes to try something out and be able to revert easily, etc. You can do all that of course by making a bunch of ".bak files by hand, but a modern revision control system makes it much easier.
Re:Commander Keen's Adaptive Tile Scrolling by adamddev1 on Friday July 28, 2023 @06:49AM (#36905093)
Carmack talked about how they released those first games on the Lex Friedman podcast. Having a previous framework and pipeline seemed to help get them out really quick.

https://youtu.be/I845O57ZSy4

Re:Commander Keen's Adaptive Tile Scrolling by HNDen21 on Friday July 28, 2023 @09:30AM (#36906500)
See also John Romero on the Tim Ferriss podcast a few weeks ago https://podcasts.apple.com/us/podcast/681-doom-legend-john-r...

He talked how they were always working on 2 games and would do a press release with a shipping date before they more or less even started lol

Romero just released a new book 10 days ago... Doom Guy: Life in First Person https://amzn.to/43M0rSg

Re:Commander Keen's Adaptive Tile Scrolling by beardedmoose on Friday July 28, 2023 @12:50PM (#36909684)
Great book so far BTW. Man, Romero had an interesting/rough childhood, that's for sure.

The crazy part was also working 2 full time jobs essentially, 8 hours at softdisk then they would use those PCs at night for 8 hours to crank out their private games, also borrowing them on the weekends to get more work done.

Re:Commander Keen's Adaptive Tile Scrolling by auselen on Saturday July 29, 2023 @09:52AM (#36920333)
I understand that they could work 16 hours a day, but I wouldn’t believe they can separate two businesses like that. I would have told the same thing though.
Re:Commander Keen's Adaptive Tile Scrolling by rasz on Thursday July 27, 2023 @11:47PM (#36902951)
unmatched, other than Golden Axe DOS port shipped a month before first Keen :-)
Re:Commander Keen's Adaptive Tile Scrolling by NovaDudely on Friday July 28, 2023 @02:37AM (#36903675)
Ha... look at that. Not bad at all! I wonder how many machines at the time could power through that? ;)

Talking about these little tile and scrolling tricks. Golden Axe on the Master System had to get around the sprite size limit by having the entirety of the graphics live on the background layer. This meant everything sat and moved in an 8x8 pixel grid. A neat little hack even if it made the whole thing a little chunky.

Re:Commander Keen's Adaptive Tile Scrolling by bzzzt on Friday July 28, 2023 @04:47AM (#36904385)
While I have a fondness for that game it really didn't come close to running as fluent as Keen on my 8MHz EGA machine at the time ;)
Re:Commander Keen's Adaptive Tile Scrolling by green_leaves on Friday July 28, 2023 @05:02AM (#36904486)
Not an original PC game, but the PC port of Caveman Ninja, VGA and also from 1991, was amazing. Smooth parallax scroll with tons of sprites in screen. It recently got a remake on Steam.
Re:Commander Keen's Adaptive Tile Scrolling by liendolucas on Friday July 28, 2023 @05:13AM (#36904547)
> best-looking PC platformer well into the 1990s

I think I'd pick Prince Of Persia, not to diminish Commander Keen a single bit but I always found PoP visuals and game dynamics unmatched for its time. I'm also getting biased for two reasons: I played PoP when I believe I was 7 years old and made a magic impression on me when I first played it and is also is my favourite platformer of all times. But of course PoP lacks of the scrolling at all which is Commander Keen's black magic.

Re:Commander Keen's Adaptive Tile Scrolling by npsomaratna on Friday July 28, 2023 @09:35AM (#36906552)
There is a magic about the character movements in PoP. I recently replayed it—almost 30 years after I first played it. There is a fluidity in how the prince moves that is still impressive today.

I understand that Jordan Mechner put in a ton of hours rotoscoping the movements. (Example: https://www.youtube.com/watch?v=fCy8WqAgPbY)

On a tangent, Mechner is an incredibly talented (and in my opinion, severely underrated) game designer. "The Last Express" is a masterpiece, and wondrous in a different way.

Re:Commander Keen's Adaptive Tile Scrolling by liendolucas on Friday July 28, 2023 @10:26AM (#36907261)
> There is a fluidity in how the prince moves that is still impressive today.

Yes it is very impressive even today. Those tons of hours on rotoscoping paid off immensely. I haven't played "The Last Express" though I've seen some screenshots and looks a very nice game. Somehow the artwork resembles the style of Alphonse Mucha: https://en.wikipedia.org/wiki/Alphonse_Mucha

Re:Commander Keen's Adaptive Tile Scrolling by nurettin on Saturday July 29, 2023 @01:59AM (#36917364)
I'd say PoP is bland and stale in comparison, but that's probably because there's lots of animations going on in the background for Keen. And it is faster paced. I enjoyed PoP2 better compared to PoP. It had grander visuals, epic escape and puzzle scenes.