News for hackers. Stuff that matters.
Re:Super Mario 64 HD by dmbaggett on Friday March 27, 2015 @12:18PM (#9277199)
Fun fact: we (Naughty Dog) actually had Crash Bandicoot running on SGI workstations in high resolutions using (I think) OpenGL back in 1996. You had to use the keyboard to play, though. :)

See http://all-things-andy-gavin.com/video-games/making-crash/ for more making-of details.

EDIT: And they were running 200Mhz MIPS CPUs - blazing fast!

Re:Super Mario 64 HD by jimmaswell on Friday March 27, 2015 @12:37PM (#9277338)
That blog post series is highly informative and interesting, and goes over a lot of cool technical specifics. I highly recommend reading it to anyone who hasn't.
Re:Super Mario 64 HD by kylek on Friday March 27, 2015 @02:10PM (#9278041)
Considering the N64 is powered by a 93.75 MHz NEC VR4300 CPU (which powered _printers_ such as https://en.wikipedia.org/wiki/HP_LaserJet_4250 ) it is quite blazing fast :)
Re:Super Mario 64 HD by dmbaggett on Friday March 27, 2015 @02:19PM (#9278109)
Indeed. The PS1's CPU ran at 33MHz!
Re:Super Mario 64 HD by ak00 on Saturday March 28, 2015 @03:48AM (#9280777)
Hey I'm mainly a lurker on hacker news and haven't posted yet, but I just wanted to let you know that Crash Bandicoot is what got me into video games and probably technology in general when I was a kid. If it wasn't for that game there is no way I would have taught myself how to make video games or eventually become a programmer myself. Thank you guys so much for making such an awesome, influential game!
Re:Super Mario 64 HD by Keyframe on Friday March 27, 2015 @03:33PM (#9278527)
I remember getting a VHS tape from Alias|Wavefront as a PowerAnimator demo or something and there were you guys from Naughty Dog demoing Crash on Indigo2s!
Re:Super Mario 64 HD by mcescalante on Friday March 27, 2015 @10:18PM (#9280209)
Oh man how I would love to get something from the Crash Bandicoot series running on my computer now.
Re:Super Mario 64 HD by aktau on Sunday March 29, 2015 @12:31PM (#9285420)
I you've got a Mac, check out OpenEmu.

Otherwise, go for the lower level part: mednafen.

Re:Super Mario 64 HD by coldpie on Friday March 27, 2015 @01:20PM (#9277674)
I read that series of posts a while ago and it is fantastic. Props to the author(s).
Re:Super Mario 64 HD by andrewingram on Friday March 27, 2015 @08:23PM (#9279909)
Does that mean you remember Rings of Power? That was like the 3rd videogame I ever owned. It was hard.
Re:Super Mario 64 HD by dmbaggett on Friday March 27, 2015 @10:40PM (#9280275)
I remember it, but I didn't work on it. Rings was the game that Jason and Andy had most recently shipped (via EA, I think) when I met them.
Re:Super Mario 64 HD by rsync on Friday March 27, 2015 @01:32PM (#9277768)
SGI Indy with the N64 dev board ?
Re:Super Mario 64 HD by dmbaggett on Friday March 27, 2015 @02:28PM (#9278171)
I don't remember what model they were, but I remember they cost between $20K and $100K, depending on the spec. :)
Re:Super Mario 64 HD by bananaoomarang on Friday March 27, 2015 @12:37PM (#9277334)
Damn that's cool :P
Re:Super Mario 64 HD by frozenport on Friday March 27, 2015 @02:09PM (#9278034)
Was it OpenGL?
Re:Super Mario 64 HD by curiously on Friday March 27, 2015 @01:08PM (#9277569)
One of my all time favorite is Crash Bandicoot.

Love reading gems like this!

can't find the bit about the opengl tho

Re:Super Mario 64 HD by dmbaggett on Friday March 27, 2015 @01:23PM (#9277704)
Maybe Andy forgot to mention it; it's been a while since I've read the whole series.

The code was C and lisp so it didn't really require any effort to port other than replacing the rendering pipeline. And we used the SGIs to pre-render every frame anyway, to precompute the polygon sort order. (The PS1 had no Z-buffer, so you were stuck sorting polygons at run-time if you didn't do something clever.)

So we already had the rendering pipeline ported. Obviously you couldn't save your game to the memory card, etc. -- some stuff didn't work. But the game was playable (albeit very frustrating with keyboard controls).

Re:Super Mario 64 HD by marktangotango on Friday March 27, 2015 @01:52PM (#9277908)
That blows my mind, I always assumed it did have a z buffer. So what did you guys do to remedy 'z fighting' triangles? My interest is; I wrote a 3d renderer in Java using fillPolygon() many years ago, and used polygon sorting in place of a z buffer. Z fighting was of course a problem.
Re:Super Mario 64 HD by dmbaggett on Friday March 27, 2015 @02:15PM (#9278082)
Some day I will write this up for real, but without going into detail, here's a summary.

The camera in Crash was on a rail. It could rotate left, right, up, and down (in Crash 2 and beyond, at least), but could not translate except by moving forward/backward on the rail. This motivates a key insight: if you're only rotating the camera, the sort order of the polygons in the scene cannot change.

This allowed us to sample points on the rail and render the frame at each sample point ahead of time, as a batch job, on the SGI using a Z-buffer. (We may have done the Z-buffer with software; I don't remember.) Then we could recover the polygon order of each frame by looking at the Z-buffer. And, even better, at run-time we could simply not render at all those polygons that weren't ultimately visible in the pre-rendered scene. This solved both the sorting and clipping problem nicely, and made the look of the game closer to 3K polygons/frame vs. the 1K polygons we were actually rendering in real time. (Many polygons were occluded by other polygons.)

The trick, though, was what exactly to do with this sort/occlusion information. In a nutshell, what I did was write a custom delta-compression algorithm tailored to the purpose of maintaining the sorted polygon list from frame to frame, in R3000 assembly language. Miraculously, this ended up being quite feasible because the delta between frames was in practice very small -- a hundred bytes or so was typical. And if a transition was too heavyweight (i.e., the delta was too big) we'd either sample more finely in that area or tell the artists to take stuff out. :)

One thing nobody talks about but which is obvious in retrospect is that without a Z-buffer you're pretty screwed: sorting polygons is not O(N lg N) -- it's O(N^2). This is because polygons don't obey the transitivity property, because you can have cyclic overlap. (I.e., A > B and B > C does not imply A > C). This is why virtually every game from that era has flickery polygons -- they were using bucket sorting, which has the advantage of being linear time complexity, but the disadvantage of being wrong, and producing this flickery effect as polygons jump from bucket to bucket between frames.

I'll leave the matter of weaving the foreground characters -- Crash himself and the other creatures -- into the pre-sorted background for another day.

Re:Super Mario 64 HD by q7 on Friday March 27, 2015 @02:41PM (#9278253)
I think Andy Gavin already wrote up quite a lot about those details, here: http://all-things-andy-gavin.com/2011/02/02/making-crash-ban...
Re:Super Mario 64 HD by iNerdier on Friday March 27, 2015 @02:32PM (#9278199)
I had to make an account to say this, please do the write up! I've been fascinated by crash ever since playing it in the 90s and had that reawakened after reading Andy Gavins blogposts.

Hearing how you managed to squeeze all this stuff out of what sounds like it was an experimental platform for 3D is just amazing.

Re:Super Mario 64 HD by marktangotango on Friday March 27, 2015 @02:41PM (#9278254)
Seems like that scheme doesn't necessarily solve z-fighting, unless your method also split overlapping polygons something akin to Newells algorithm.

>>I'll leave the matter of weaving the foreground characters -- Crash himself and the other creatures -- into the pre-sorted background for another day.

Please do \drool

Re:Super Mario 64 HD by dmbaggett on Friday March 27, 2015 @03:50PM (#9278614)
We didn't split polygons, and you are correct that this doesn't provide an absolutely perfect solution either. However, it does in practice eliminate the flickery polygons, because the polygon ordering is far more stable than it is with bucketing.

And you can actually see a difference between Crash 1 and Crash 2+ if you pay close enough attention. For Crash 2, Stephen White cloned the PS1's renderer in software for the SGI so that it was pixel-for-pixel accurate. He did this in like two days, thereby earning himself a place in my top-5-programmers-I've-ever-worked-with list.

If you look closely during Crash 1 while you're moving Crash, you can see sometimes see what Andy not-so-affectionately called "crispies". These are pixel-size flickery bits caused by the subtle difference between the SGI's renderer and the PS1's hardware renderer. Just the difference in the way the two implementations rounded fractional coordinates showed up in the game.

Re:Super Mario 64 HD by curiously on Friday March 27, 2015 @05:00PM (#9278969)
What stood out to me was the graphics in Crash bandicoot series. They always looked very good compared to other games which has the weird jumpy textures and very rough looking meshes.

I must say going with very minimal texture on Crash is intriguing. FF7 also uses very little I believe during combat, they all look like color shaded mesh but it clearly looks good on Crash.

All these development stories from 90s is fascinating, especially because there's a fond childhood attachment to the PSX.

On one of the Playstation Underground Magazine discs there are entire series on the development on Crash Bandicoot. These are truly a gem. Myself having watched the entire series.

https://www.youtube.com/watch?v=QSYlbS5vGNA

Re:Super Mario 64 HD by dmbaggett on Friday March 27, 2015 @05:10PM (#9279009)
Yes, exactly: Crash was flat-shaded (not textured), and I believe it was Jason (Rubin) who made that call.

Crash also benefited from the (at the time) novel rendering model that Andy, Mark (Cerny) and Jason developed. This basically allowed any vertex of crash to move anywhere in the animation sequences -- which was huge, because it allowed Jason to approximate traditional squash-and-stretch even on that limited hardware.