how does the commander keen engine work?
this question has been bugging me fore a while. whenever I search it all I get is
"john carmack developed an engine that would make tilling smoother". it would be great if someone could tell me about it (not in extreme detail, but atleast at a high level), or redirect me to a link thanx :D
You're talking about technology so old, and for such a different platform (more or less direct interaction with old skool VGA/EGA videocards) that I doubt it would be relevant information for you. It's also likely that whatever conceptual idea's the keen engine uses for 'faster tiling' is common place nowadays.
More importantly, you can do pretty darn fast tiling quite easily with opengl/direcx/SDL ;) Then there's also the thing that all modern day computers have enough power to do a simple thing as tiling.
More importantly, you can do pretty darn fast tiling quite easily with opengl/direcx/SDL ;) Then there's also the thing that all modern day computers have enough power to do a simple thing as tiling.
I was just curious about it. I understand its basically pointless to do anything the old skool way with our new technology, I was just interested in how it worked.
It was essentially John working out some black magic with the panning registers on EGA cards that even the manufacturers didn't realize they could do.
Not unless you've seen many EGA cards in use today.
Quote:Original post by Menno
It's also likely that whatever conceptual idea's the keen engine uses for 'faster tiling' is common place nowadays.
Not unless you've seen many EGA cards in use today.
Quote:were did you find this out?
I failed to find a definitive article explaining the technique, but mentions of it are all over the internet. For example, on Everything2.com. I seem to recall I read the description in some interview, but I can't locate it.
I was pretty positive that the book Masters of Doom described it at least in a little bit. Seeing as how I no long have the book, I was unable to check. However, I found this over on the 3D Realms forums:
"I looked it up in the book. Here you go; From "Masters Of Doom;
The problem was that it simply took too much time and power for the computer to redraw the entire screen for every slight move. And that's when the leap came.
What if, Carmack thought, instead of redrawing everything, I could figure out a way to redraw only the things that actually change? That way, the scrolling effect could be rendered more quickly. He imagined looking at a computer screen that showed a character running to the rigth underneath a big blue sky. If that character ran far enough, a white putty cloud would eventuallt pass from off screen over his head. The computer created this effect in a very crude way. It would redraw every little blue pixel on the entire screen, starting at the top left corner and making it's way over and down, one pixel at a time, even though the only thing that was changing in the sky was the white puffy could. The computer couldn't intuit a shortcut to this drudgery just becasue a shortcut made sense. So Carmack did the next best thing. He tricked it into performing more efficiently. Carmack wrote some code that duped the computer into thinging that, for example, the seventh tile from the left was in fact the first tile on the screen. This way the computer would begin drawing right where Carmack wanted it to. Instead of spitting out dozens of little blue pixels on the way over to the cloud, the computer could start with the cloud itself. To make sure teh player felt the effect of smooth movement, Carmack added one other touch, instructing the computer to draw an extra stip of blue tile outside the right edge of the screen and store it in it's memory for when the player moved in that direction. Becasue the tiles were in memory, they could be quickly thrown up on the screen without having to be redraw. Carmack called the process "adaptive tile refresh"."
"I looked it up in the book. Here you go; From "Masters Of Doom;
The problem was that it simply took too much time and power for the computer to redraw the entire screen for every slight move. And that's when the leap came.
What if, Carmack thought, instead of redrawing everything, I could figure out a way to redraw only the things that actually change? That way, the scrolling effect could be rendered more quickly. He imagined looking at a computer screen that showed a character running to the rigth underneath a big blue sky. If that character ran far enough, a white putty cloud would eventuallt pass from off screen over his head. The computer created this effect in a very crude way. It would redraw every little blue pixel on the entire screen, starting at the top left corner and making it's way over and down, one pixel at a time, even though the only thing that was changing in the sky was the white puffy could. The computer couldn't intuit a shortcut to this drudgery just becasue a shortcut made sense. So Carmack did the next best thing. He tricked it into performing more efficiently. Carmack wrote some code that duped the computer into thinging that, for example, the seventh tile from the left was in fact the first tile on the screen. This way the computer would begin drawing right where Carmack wanted it to. Instead of spitting out dozens of little blue pixels on the way over to the cloud, the computer could start with the cloud itself. To make sure teh player felt the effect of smooth movement, Carmack added one other touch, instructing the computer to draw an extra stip of blue tile outside the right edge of the screen and store it in it's memory for when the player moved in that direction. Becasue the tiles were in memory, they could be quickly thrown up on the screen without having to be redraw. Carmack called the process "adaptive tile refresh"."
Quote:Original post by Muhammad HaggagQuote:were did you find this out?
I failed to find a definitive article explaining the technique, but mentions of it are all over the internet. For example, on Everything2.com. I seem to recall I read the description in some interview, but I can't locate it.
I think the whole technology is described in the Black Book or Abrash (Zen of Graphic Programming). Although I can't be sure because the book is a bit far from me at this time (a mere 1,000 km away, to be precise).
Google for "dangerous dave in copyright infringement" for an interesting read, it's mostly non-related but there is a quick mention of it (although it doesn't say much more than I did in my post, which wasn't much [smile])
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement