News for hackers. Stuff that matters.
Re:Commander Keen source code released by Arjuna on Tuesday September 16, 2014 @05:29PM (#8327215)
A little slice of history regarding one of the technical foundations of Commander Keen, for those that aren't aware:

"Then, the first breakthrough. John Carmack devised a smooth, scrolling routine similar to that used for the background of Nintendo games but never before possible on the PC." [1]

The technique is called, adaptive tile refresh. [2]

[1] http://www.3drealms.com/keenhistory

[2] https://en.wikipedia.org/wiki/Adaptive_tile_refresh

Re:Commander Keen source code released by vidarh on Tuesday September 16, 2014 @07:59PM (#8327770)
It's fascinating that this was something new on the PC that late.

This is roughly how most scrolling on the C64 happens (though it works by reducing the visible display by 8 hires pixels on either side of the screen, and scrolling at most 8 hires pixels before you need to shift "tiles" / characters). I'm not sure it was new with the C64 either. While most C64 games used sprites for the movable objects, there are absolutely exceptions that tracked damage.

On the Amiga, however, the method described is basically pretty much how you're expected to do scrolling from the outset(it has much more extensive support for it than EGA did). AmigaOS even came with built in support for managing damage lists for such objects ("bobs" for "blittable objects") and double buffering from 1985, though most games would have used their own code for it.

For these systems redrawing the whole screen was simply never seen as viable, or worthwhile. The Amiga hardware support for doing this kind of scrolling + the use of the blitter for moving game objects and replacing damaged sections made this method the obvious choice.

Even double-buffering was sometimes seen as too wasteful, with a solution being to sort damage lists and tie updates to the raster interrupt to update the screen before the raster beam reached it.

Re:Commander Keen source code released by kabdib on Tuesday September 16, 2014 @09:03PM (#8327944)
Yup. We were doing quite similar things on the Atari 6502-based computers (it helped that there was hardware scrolling, but only to a degree). The PC graphics hardware was just embarrassingly awful (it's like the hardware engineers on the CGA decided to make it insanely hard to do any animation -- WTF, you're doing a color display on a consumer product?)

Ah well, they won, and Atari / Amiga / Commodore lost; better doesn't mean you win.

Re:Commander Keen source code released by ekianjo on Tuesday September 16, 2014 @11:55PM (#8328503)
> Ah well, they won, and Atari / Amiga / Commodore lost; better doesn't mean you win.

This being said, Atari and Commodore had several YEARS of opportunities to launch new machines and "kill" the PC (or at least become something that would last longer than a generation), and did not do anything. The Amiga 1200 and Falcon were both very late to the party and underpowered when PCs started to be cheap enough and way more powerful than these machines.

PC gaming also benefited from the fantastic works of Origin (before they were acquired by EA) with a bunch of exclusives (Wing Commander 1 was a revolution in 1991, and convinced many people the PC could also be a gaming platform).

I was on the Amiga during that period and I could see the tide coming, while Commodore and Atari stood and just watched. What a pity.

Re:Commander Keen source code released by kabdib on Wednesday September 17, 2014 @12:41PM (#8330880)
No kidding about the lost opportunity. It was frustrating enough from inside Atari (both the Warner and Tramiel companies).

- Warner was all about politics, and marketing had taken over major engineering decisions. It was one big balled-up rollerskating disaster as marketroids failed to grasp things on the level of: Adding a HELP key to a computer keyboard does not mean that you automatically get help in every application, especially not game cartridges with very limited space.

- Tramiel was all about not spending money. Vendors who were in the know (like DEC, who serviced our Vaxes until the Tramiels stopped paying for maintenance) demanded payment up front, with cashiers checks or other guaranteed instruments.

Both of these organizations were really tough to do good, high visibility products in. Lots of good stuff got canned (by people with political agendas to push), or couldn't be developed because of the lack of good people.

Sometimes I daydream about how things worked out in an alternate universe ... :-)

Re:Commander Keen source code released by vidarh on Wednesday September 17, 2014 @07:54AM (#8329515)
Commodore was severely dysfunctional as long as it existed. I recommend the book Commodore: A Company on the Edge (there are two editions - the new edition was meant to be split into two volumes, but only the first volume covering the "8-bit years" have been published). Given that Tramiel brought a lot of that dysfunction with him to Atari it is not much of a surprise that they ran into problems too.

Lack of proper R&D investment was a recurring theme at Commodore from the beginning, but there were tons of problems. Not least towards the end - well after Tramiel - there was Bill Sydnes: Commodore actually hired the guy behind the PCjr - sometimes described as the worst flop ever. So they hired him, and he did his best to live up to his reputation from the PCjr.

The worst part was that he proceeded to make decisions based on ludicrous ideas that "everyone" in the Amiga market could have told him were idiotic (trying to shift more of Commodore's business to the PC division; release a new flagship Amiga model with IDE in the Amiga market? I still remember the total shock and disbelief everyone I knew had when the A4000 was finally unveiled, too late, at too high a cost). The worst part of course being that in doing so he also cancelled or demanded changes to a number of projects that were much better. E.g. there was the A3000+ which would have been a far better machine than the A4000 with the same CPU models, and was far cheaper, and was almost ready by the time Sydnes cancelled it (there exists a number of prototype models, and they still work), and had SCSI. And added a DSP.

But even with proper management there was the Motorola problem - their inability to boost the performance of the 68040 far enough, fast enough. It's not clear Commodore would have had the resources to pull through a PPC transition the way Apple did.

Re:Commander Keen source code released by grimman on Wednesday September 17, 2014 @04:15AM (#8329024)
Arrogance, plain and simple. I'm not entirely sure it's warranted, but it brings Apple to mind. They, too, experienced a massive slump... but at least they recovered.

Funny thing is, it seemed to be that Amiga would be making a comeback in the early 2000s as well, with "new" hardware (PPC, and still relatively underpowered). Alas, things fizzled out. Way too late to market, and way too little buzz.

Re:Commander Keen source code released by ekianjo on Wednesday September 17, 2014 @04:26AM (#8329058)
Actually the PPC Amigas were already available in the late 90s (my memory is not clear on when anymore, but maybe 97-98), but they were anyway too expensive and too underpowered to change anything. However it's been interesting to see that third parties have been pushing the hardware forward, as well as the OS (Eyetech for Hardware, MorphOS for new OS inspired and partly compatible with AmigaOS). There's still a very small and niche community using "modern" Amiga. But it's only a shadow of what it was...
Re:Commander Keen source code released by grimman on Thursday September 18, 2014 @04:50AM (#8334287)
They used Motorola CPUs all along, but they kept doing so in the face of their diminishing (relative) performance, THAT'S what I was trying to point out. :)

AAPL bailed and went with Intel as we all know. I can't help but wonder what would have happened if the Amiga rights holders would have done something similar.

Re:Commander Keen source code released by acdha on Tuesday September 16, 2014 @10:10PM (#8328136)
Don't forget that the B in IBM stands for business. It took æons for the PC world to realize that graphics mattered for more than pie charts and other “serious work”. Sound was similarly AWOL for a surprising amount of time other than for basic alerts.
Re:Commander Keen source code released by to3m on Tuesday September 16, 2014 @08:49PM (#8327899)
The BBC micro had a similar arrangement to the Amiga or EGA, and this was the way a number of games (Repton, Exile, Ravenskull, Uridium, JCB Digger, amongst others) did their full-screen scrolling. (I think the stride was inferred from the displayed total though so when scrolling horizontally some flicker at the sides was pretty much inevitable.)

Double buffering was rare, due to a distinct lack of memory, and games would have had to use dirty lists as a 2MHz CPU just isn't fast enough to redraw the entire screen each time.

Re:Commander Keen source code released by sprokolopolis on Tuesday September 16, 2014 @07:02PM (#8327588)
I remember reading in Masters of Doom that they had actually asked Nintendo if they could license games to get them on personal computers, Obviously, Nintendo declined. They were able to get the first level of Super Mario Bros running on personal computers and used that method in the Commander Keen series.
Re:Commander Keen source code released by hadoukenio on Tuesday September 16, 2014 @07:38PM (#8327702)
I recommend Masters of Doom to everyone. It's wonderful, historical, nostalgic and inspiring.
Re:Commander Keen source code released by ekianjo on Tuesday September 16, 2014 @11:59PM (#8328520)
Pretty good, but the technical explanations were pretty light at times. I'd really like to have the narration they had and on top of that, much more details about the technical side and how it was achieved. When you talk about literature you actually quote authors, when you talk about hackers I think it's appropriate to go back to the code and what it does, too.
Re:Commander Keen source code released by prezjordan on Tuesday September 16, 2014 @10:52PM (#8328290)
Seconded. One of the best books I've ever read - I honestly wish I could forget it and start over.
Re:Commander Keen source code released by easytiger on Wednesday September 17, 2014 @07:26AM (#8329465)
If you like that you will also like a book called Showstopper which is similar but about early challenges at Microsft building the NT kernel
Re:Commander Keen source code released by AtmaScout on Wednesday September 17, 2014 @12:39PM (#8330861)
It is funny that you mention this book. I've read Masters of Doom and just received this one. I'm excited to read it.
Re:Commander Keen source code released by sprokolopolis on Tuesday September 16, 2014 @09:53PM (#8328093)
I meant Super Mario Bros 3. Sorry about that.
Re:Commander Keen source code released by caf on Wednesday September 17, 2014 @01:24AM (#8328710)
That Wikipedia link claims that Commander Keen was the first PC sidescroller, but it was predated by (at least) Captain Comic.

I'm not sure if you'd call Sopwith a sidescroller but it managed to scroll sideways on CGA.

Re:Commander Keen source code released by jodrellblank on Wednesday September 17, 2014 @01:36PM (#8331224)
Re:Commander Keen source code released by antimagic on Wednesday September 17, 2014 @12:42PM (#8330889)
When I read the description of how EGA worked, you can't help feeling that the engineers that created it had planned for exactly the use-case Carmack put it to. In particular, providing for a buffer that was larger than the screen, the ability to move the offset inside the buffer for the screen's origin, and wrapping of the buffer is exactly the feature set that you need to implement scrolling. I don't think it was blind luck that these features were all available on the card.

This is often cited as the first example of Carmack's genius when it came to computer graphics, and he certainly deserves credit for being one of the first/astest third-party developers to realise the potential of the EGA card. But if I was one of the engineers that had designed EGA, I would be rather miffed to see how much Carmack is praised for this when it seems relatively clear that he was just using the hardware as it was intended to be used.

Re:Commander Keen source code released by sillysaurus3 on Tuesday September 16, 2014 @07:37PM (#8327698)
Does anyone know where the "adaptive tile refresh" source code is in the codebase?
Re:Commander Keen source code released by readerrrr on Tuesday September 16, 2014 @07:51PM (#8327747)
Look at id_rf.c and .asm files.