• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

How Sega brought Shenmue back to life on modern systems.

IbizaPocholo

NeoGAFs Kent Brockman
https://www.pcgamer.com/how-sega-brought-shenmue-back-to-life-on-pc/

When did you start work on the project?

We first took possession of the Shenmue archive back in October 2015. Ramp up was slow while we picked through the massive data archive and planned the approach we would take to porting the project. Over the lifetime of the project, probably at least 20 people have touched the code, although the peak team size was probably around 10 developers.

Was bringing a 20-year-old game to modern PCs difficult?

Incredibly difficult! At D3T we have worked on some very challenging projects, but this was by far the toughest. For example, there was no source code for the Dreamcast libraries, but luckily the Shenmue 2 Xbox version had source for the ported Xbox libraries.

It was definitely not a case of dropping the Xbox libraries in and building Shenmue, but it gave us a good starting point. Even with that there were still many files missing which we had to reverse engineer from assembly code.

The Dreamcast and Xbox had 32-bit processors, but PS4 and Xbox One are 64-bit. This has a big implication with how memory and data are handled. It was a massive engineering effort to convert the code and resulted in many obvious and many subtle bugs, some of which were still being found close to release.

Working on a Japanese-developed game must’ve been tricky too...

The original code was written by Japanese developers, so all the comments are in Japanese. We used Google Translate a lot to try and get a handle on what the code was doing, but it’s often not clear. Shenmue 1 had the additional problem for us that the game logic was written in a separate scripting language and ALL the function names and variables were in Japanese too!

Interestingly, we found that once the resolution was increased existing bugs became more apparent. There’s also the issue of widescreen, with the game being designed to run in a 4:3 ratio. This meant many of the cutscenes didn’t work correctly, so we had to add black bars at the sides.

The original games were technical marvels and they were highly tuned for the specific hardware platforms, which didn’t give us as much performance headroom as we were expecting, given their age.

Were there any quirks of the Dreamcast hardware that made getting the first game working on PC especially difficult?

The Dreamcast hardware had some features which would prove difficult to emulate, particularly the audio and graphics systems.

The audio on the Dreamcast is mainly driven by a completely different chip to the main CPU. This chip is loaded with different programs defined by the original developer, specifying things such as loop points, reverb, volumes, envelopes, etc. We didn’t have the source data for this, which meant a lot of reverse engineering to get it sounding okay.

Regarding the graphics, the Dreamcast GPU had some powerful and unique features not found on modern cards. The two features which caused us the most headaches were the modifier volumes used for shadows and light volumes, and the ability to sort transparent geometry on a per pixel level. The lack of modifier volumes on our target platforms led us to use a hybrid stencil shadow approach similar to the Xbox version of Shenmue 2. This is different to the original and artefacts can occasionally be seen because of this.

Did you find anything interesting in the source code?

The moon in Shenmue 2 is not a texture. It’s an actual 3D object in the distance correctly lit by the sun direction. This produces accurate phases. We were surprised by this level of detail! The Lucky Hit games adjust the physical behaviour of the ball based on the weather and temperature, calculated by the time of day. For cutscenes, the game switches to high definition heads and hands, which allow for more expression. In Shenmue 1 the game logic is all written in a scripting language. For Shenmue 2 they got rid of it and wrote the logic in C code directly.

More at the link.
 

dirthead

Banned
haha they really lost the Dreamcast source code? Man, Sega is pathetic. Honestly, the game logic in Shen Mue is simple enough where you have to wonder whether it wouldn't have been simpler to just rewrite the whole thing.
 
Last edited:

Xerazal

Neo Member
haha they really lost the Dreamcast source code? Man, Sega is pathetic. Honestly, the game logic in Shen Mue is simple enough where you have to wonder whether it wouldn't have been simpler to just rewrite the whole thing.
you'd be amazed with how many companies lose the source code for their games. Example, SE lost the source code for kingdom hearts. The remasters is actually a recreation of the game made by reverse engineering the original game, recreating the game with assets ripped from the ps2 disk.
 

dirthead

Banned
you'd be amazed with how many companies lose the source code for their games. Example, SE lost the source code for kingdom hearts. The remasters is actually a recreation of the game made by reverse engineering the original game, recreating the game with assets ripped from the ps2 disk.

So many wasted man hours.
 
D

Deleted member 738976

Unconfirmed Member
The biggest crime is still the Panzer Dragoon Saga source code being gone.
 
well at the time, they probably didn't think they'd need to repackage the old titles. The source code for a lot of old games are gone now.

Yeah, I'm sure back then no one would have thought we'd be gullible enough to buy ports and remasters of old games we already owned on our new consoles. I've bought plenty, but I still feel guilty everytime I do.
 

Spukc

always chasing the next thrill
it was a good game back in the day on the dreamcast.
but the games aged like old milk.

surpassed in gameplay by almost any modern open world game imo.
 
If this was a 3-year effort I feel like it would have been more worth everyone's time to have programmed it from the ground up in a modern engine. Modern lighting, 60fps+. I mean 3 years is a normal game's development cycle. If they weren't going to remake any art or music assets aside form the UI I feel like those 3 years could have been much better spent.
 

Alx

Member
I don't understand how Sega can keep losing its source code. For older games like Panzer Dragoon Saga I can imagine that they didn't have many convenient or reliable ways to keep and store backups at the time, but for a game released in 1999 there's no excuse, you could at least keep a couple of CDs in a box.
(also code comments in any other language than English should be a no-no, but even today it's not something that is universally done)
 
Last edited:
I don't understand how Sega can keep losing its source code. For older games like Panzer Dragoon Saga I can imagine that they didn't have many convenient or reliable ways to keep and store backups at the time, but for a game released in 1999 there's no excuse, you could at least keep a couple of CDs in a box.
(also code comments in any other language than English should be a no-no, but even today it's not something that is universally done)

Didn't they lost the code for Sonic? What would you hope after that? The worst of all, there is a rom filled with archives at SEGA's created lonnnnnnnnn time age, so it's not like they were not aware of the issue.
 
Top Bottom