[HN Gopher] Shenmue (1999) reverse engineering reveals possible ...
___________________________________________________________________
Shenmue (1999) reverse engineering reveals possible sun position
oversight
Author : BafS
Score : 174 points
Date : 2025-03-12 17:00 UTC (1 days ago)
(HTM) web link (wulinshu.com)
(TXT) w3m dump (wulinshu.com)
| yoyohello13 wrote:
| Man I loved this game so much as a kid. I remember being
| enthralled by opening the drawers, lol. I basically played it
| once a year every year from ages 9 - 16. Some of the enchantment
| was lost when I played the remaster recently, but still such a
| great world they built.
| AlecSchueler wrote:
| What didn't work about the remaster or was it just a matter of
| shattering the illusion of your memories?
|
| I've been thinking about the game a lot since having my first
| child last year. She often lifts things and rotates them in her
| hand just to see and experience them. When I was a kid playing
| Shenmue I always found it funny that they added that mechanic
| because "who does that?" but now I feel a very deep
| appreciation for it.
| yoyohello13 wrote:
| > What didn't work about the remaster or was it just a matter
| of shattering the illusion of your memories?
|
| At the time it was a unique, first of it's kind, game. Now
| there have been a lot of advancements since then so I didn't
| have the same "Wow" feelings of just being in the world. But
| the nostalgia still hit me hard and it still has a special
| place in my heart.
| ethagnawl wrote:
| I don't think applies to you but I imagine people playing
| this series for the first time today probably think,
| _What's so special? This feels just like every other open
| world game_, even though it's really the other way around.
|
| It's similar phenomenon to people hearing the Beatles or
| the Rolling Stones (or any of the artists they ripped off
| ...) with modern ears.
|
| There's hope, though. I do think in both cases, it's
| possible to develop an appreciation once you learn about
| the lineage of a particular work.
| havblue wrote:
| I had played Morrowind and gta3 at the time, but I missed
| the train on Shenmue. So ten years ago I bought a used
| Dreamcast and a copy of the game and... The game was
| sloooow. Granted, the system I bought was dying as well,
| but just going into drawers was slow. So no immersion to be
| had unlike many of the games at the time gave me.
|
| I guess it depends on what you're trying to accomplish with
| playing Shenmue now. Is it the story or the immersion?
| soupfordummies wrote:
| An all-timer for me as well! So much strange magic in there. No
| game before or sense has quite that vibe. Maybe a product of it
| coming out at just the right time.
|
| "Do you remember... that day?"
|
| "The day it snowed?"
|
| NO! The day I got it right as it came out. A Friday after
| school and I played for like 4 hours straight. Yes! I remember
| THAT day!
| WXLCKNO wrote:
| There was something very special about it, I agree that no
| game has made me feel that way since.
|
| Half Life 2 did but in a different way.
|
| Maybe when a game just leapfrogs what's been thought of as
| cutting edge and you're so amazed that you forget that you're
| playing a game.
|
| I'm not sure if my fascination for Japan started with Shenmue
| but it certainly grew from there. I was so happy to visit for
| the first time last year.
| mywittyname wrote:
| I traded a bunch of PSX games for a Dreamcast just so I could
| play Shenmue. My parents were pissed, but what a great game
| (and great console).
| regus wrote:
| Shout out for stilling calling it PSX
| VBprogrammer wrote:
| I remember driving a forklift for hours!
| fredrikholm wrote:
| Me and my friend completed the game together as kids, and I
| vividly remember us being stuck at this stage looking for
| sailors (IIRC).
|
| It accidentally imbued a lot class awareness into us; all we
| wanted was to revenge our father but here we were, driving
| boxes around hours and hours being paid pennies.
| byproxy wrote:
| Same! So satisfying to just explore the world they built, to
| the point of me neglecting the actual story a lot of the time.
| Hell, I think the only reason I advanced the story was to
| unlock new dialog from the NPCs. I loved the whackiness of 'em.
|
| Unfortunately, I think the lost enchantment is just a product
| of aging. Things I were so enthusiastic about as a child
| (videogames, particularly) no longer have the same appeal,
| despite my best efforts to reignite some passion. That said, I
| did put in a good chunk of playtime with the remaster and I was
| still having fun with it. Though, not to completion as my
| attention span for videogames has dwindled.
| fredrikholm wrote:
| It was so extremely ahead of its time.
|
| A seemingly unlimited amount of content, nearly everything
| could be interacted with, and the graphics were _very_ good
| compared to other games in 1999. Heck, the y had _teeth_
| meshes.
|
| The background music for nearly every environment lives rent
| free in my head some 20-odd years later.
| AdmiralAsshat wrote:
| Reminds me of a similar story about Blast Corps, specifically how
| they implemented logic to correctly display apparent retrograde
| motion vis-a-vis the orbit of Venus from the perspective of
| Earth...all just for what basically amounts to a background
| animation. [0]
|
| [0] https://www.youtube.com/watch?v=FZ6eNJi02Qk
| soupfordummies wrote:
| Well that's ANOTHER oddball, semi-forgotten, great game!
| toast0 wrote:
| Nintendo and Rare (as "Xbox Game Studios") figured out how to
| work together, and as of Feb 2024, you can play Blast Corps
| on the Nintendo Switch Online Expansion Pack (along with a
| bunch of other Rare games)
| goosedragons wrote:
| It's also on Xbox via Rare Replay. And you get to keep it.
| rawling wrote:
| Isn't this just... they made the planets have the correct orbit
| times, and retrograde motion just drops out from that?
| gs17 wrote:
| Yeah, it's impressive that they bothered to animate them with
| the correct ratio of periods, but it's not like they had to
| add epicycles.
| QuercusMax wrote:
| When I took the sophomore-level Computer Graphics class as an
| undergrad in 2001, the final project was to build a solar
| system simulator in OpenGL. It didn't have to be especially
| faithful (all orbits perfectly round, don't care about
| starting positions, etc). The most complicated part was
| implementing a view from a planet's surface which would
| rotate at the proper rate for the given planet. This was not
| a difficult assignment (for me, can't say anything about my
| classmates!).
|
| Making it marginally more accurate for a real product would
| only have been a bit more effort.
| antithesizer wrote:
| Saty?
| QuercusMax wrote:
| I don't know who that is... I went to Kent State.
| klysm wrote:
| This is one of those things where it's like if you have to
| program them to move, it's probably just easiest to program it
| to be somewhat faithful instead of making up some other values.
| mywittyname wrote:
| To me it feels like one of those escapades we go on when we
| want to focus on doing some "fun" work.
| pipes wrote:
| Someone in the YouTube comments claims he was an intern at
| rare at the time and he was responsible for this. Who knows,
| they could be lying.
| wk_end wrote:
| The tl;dr (though you should read!) of the "oversight" is that
| there's a constant used to adjust the sun's position that's
| seemingly based on latitude; in the first Shenmue, it's set to
| 22, and in Shenmue II - which uses much of the same code - it's
| set to 35. This is odd, because Shenmue I takes place at latitude
| 35deg, and Shenmue II at 22deg - precisely the other way around.
|
| If that's what's going on, it's sort of hard for me to wrap my
| brain around how that might've happened. I could see them
| "fixing" the Shenmue I code base and then forgetting to "unfix"
| it for Shenmue II, but I can't - even knowing that there were
| already plans for where the sequel would be set - come up with a
| story for how they would've accidentally used Shenmue II's
| latitude for the original game.
| chickenzzzzu wrote:
| Maybe the code was written at the early onset of the game, and
| originally the locations were flip flopped in super early
| development. Then later they decided on the locations that
| became permanent, and nobody bothered to fix that part of the
| code?
| mook wrote:
| Maybe they realized the bug early in Shenmue II's planning and
| decided to just move the game to where the bugged value was
| correct, not knowing that it was fixed in code in the mean
| time.
|
| (This has an approximately zero chance of being correct.)
| boudin wrote:
| I wonder if it could be linked to the original development on
| the Sega Saturn, if I remember well the video of the prototype,
| Shenmue on Saturn was spanning across both Shenmue 1 and 2
| ac2u wrote:
| I wonder if it has anything to do with the default cutscene
| that plays on the start screen if you don't progress. That
| cutscene would have been set in China as its Shenhua reciting
| the games central prophecy
| gpderetta wrote:
| Wild guess: they set it wrong on the first game (possibly by
| looking up the wrong parameter). On the next game, when they
| went to fix the sun position for the new location they realized
| the mistake and changed it to the original location as an
| easter egg.
|
| The coincidence of the wrong position matching the location of
| the next game is strange though.
| bbayles wrote:
| Fantastic game!
|
| The same development studio, Sega AM2, recently had a developer
| reveal that he had put an Easter egg into Fighters Megamix for
| Saturn. However, he mistakenly introduced a crash bug in it.
|
| This set me off looking for the Easter egg. After a couple days
| of reverse engineering, I finally found it [0]! I love looking
| for this stuff.
|
| [0] https://32bits.substack.com/p/bonus-fighters-megamix
| kowlo wrote:
| What a game. Lost hours to QTE Title (one of the games within the
| game) https://www.youtube.com/watch?v=drdFhBKDvIQ
| chiffre01 wrote:
| Playing through Shenmue 1, they did a really good job capturing
| the vibe of the area. Looking at random points in Yokosuka just
| feel like Shenmue.
|
| https://www.google.com/maps/@35.2781594,139.677597,3a,75y,27...
| soupfordummies wrote:
| Looks like a good spot to practice my moves...
|
| If you google "Shenmue locations in real life" there's a lot of
| cool stuff. They really did do a great job on that and the ERA
| as well.
| pkdpic wrote:
| Also playing through on Steam Deck. Steam QTE problems really
| haven't hindered my enjoyment at all. Kind of shocking how well
| it's aged overall and how different it is playing through as an
| adult.
|
| I am waaay better at driving that forklift 20+ years later. The
| foreman loves me now.
| drooopy wrote:
| I replayed Shenmue on my Deck about a year ago and I had the
| same QTE problems. The solution was to download a custom,
| community-made control scheme from the Steam workshop.
| pandemic_region wrote:
| Is it typical for Japanese towns to have all the electricity
| wiring above ground? Is it on purpose, maybe related to
| historical earthquake trauma?
| Daz1 wrote:
| Yes and also there is zero aesthetic thought put into
| japanese towns which is why they're so ugly, everything is
| functional
| pezezin wrote:
| I would say that functionality requires a minimum sense of
| aesthetics.
|
| Most Japanese towns are not even functional, they are just
| a chaotic maze of tiny streets and ugly buildings. I know
| because I live in one.
| stavros wrote:
| Looks exactly like Greece!
| tech2 wrote:
| Athens being its own special hell, looking across the
| city from Lykovounia and seeing everything in the city at
| the same ~5 storey level of dark concrete.
| lmm wrote:
| > Is it typical for Japanese towns to have all the
| electricity wiring above ground?
|
| Yes
|
| > Is it on purpose
|
| Yes? Electrical wiring is built deliberately, of course it's
| on purpose. Where else would you put it, and why? You're
| implying it's somehow normal to bury it? That sounds like it
| would be expensive, both to build and to maintain.
| pretzelhands wrote:
| I'm not sure about your location, but around here (Austria)
| it is indeed much more common to have electrical wiring
| that runs through the ground than above air. The only place
| where you see wiring above ground is usually out in the
| rural areas.
| PinkMilkshake wrote:
| > You're implying it's somehow normal to bury it? That
| sounds like it would be expensive, both to build and to
| maintain.
|
| Yes, it's normal. It's called undergrounding.
| wahnfrieden wrote:
| You wrote condescendingly without even apparently knowing
| why
| Cthulhu_ wrote:
| > You're implying it's somehow normal to bury it? That
| sounds like it would be expensive, both to build and to
| maintain.
|
| It is in my neck of the woods (the Netherlands) too, the
| only places you see overground electricity is high tension
| lines outside of towns. Here's a random suburb I just
| picked randomly, looks like it was built in the 80's:
| https://maps.app.goo.gl/7DeZiTyKuB4DZKdG8. Or else
| Amsterdam, which is much older:
| https://maps.app.goo.gl/FWm6vYgbV5h2CkZu5.
|
| I'd argue (based purely on gut feeling and handwaving) that
| having it out in the open is more expensive and dangerous;
| weathering, wind, trees, cars crashing into it, people
| climbing up into it, birds, etc.
|
| Anyway, your comment sounds like US defaultism, be wary of
| that.
| serf wrote:
| >Anyway, your comment sounds like US defaultism, be wary
| of that.
|
| i'm a US citizen that is surrounded in underground
| electrical networks; i'm not sure there is really a 'US
| defaultist' stance on whether or not one prefers above or
| underground wiring.
| bondarchuk wrote:
| It depends a lot on the soil, in holland it is
| extraordinarily easy to bury stuff. Beware of netherlands
| defaultism ;)
| pezezin wrote:
| Pretty much all Japanese cities look like that.
| dfxm12 wrote:
| Hasn't changed much since 1986, either. Speaking of Sega games
| set in Japan, the Yakuza games do a good job at this as well,
| at least for Kabukicho and Dotonbori. I even knew to get crabs
| at Kani Doraku because of the games! It's like virtual tourism
| in some ways...
| indrora wrote:
| A friend of mine through sheer luck happened to be able to take
| a two month trip to Yokosuka nearly all expenses paid. She
| spent the first week or so just plotting out the map of Shenmue
| and the local map to see how much was rearranged.
|
| The town is definitely Different but recognizable in a lot of
| ways. Lots of small landmarks that were gently adjusted or
| changed to make it simpler
| bitbasher wrote:
| Ok, but do they know who Lan Di is?
| TapamN wrote:
| Shenmue is one of my favorite games. I did a bunch of Ghidra
| reversing on the Dreamcast version last year, since I wanted to
| add improvements to it. Like adding bilinear filtering on the sky
| background, making time run a bit (faster so you can see time
| specific events like Christmas/New Year more easily,) getting the
| game to run without disc swapping on an ODE, and adding
| antialiasing (which would require mipmaps to improve rendering
| performance, which would require higher texture compression
| levels to get them to fit, which would require a different
| texture format that supports that...) I never got around to
| actually implementing any of that, outside of doing some
| experiments, like forcing bilinear on all 2D elements.
|
| I don't think I found the sun/moon code (or more likely I did,
| but didn't realize what exactly it was doing, Ghidra SH4 has
| serious problems with floating point instructions making
| following anything that uses them almost impossible) but I did
| find most of the other time related code for updating the
| clock/calendar.
|
| One weird thing I found while doing that is about the in-game
| watch. You always have a watch in your inventory, so you'd think
| it would be hard coded in, but it's treated like any other item.
| The game also has code to check if the watch is missing and add
| it back in anyways. But the code that draws the on-screen clock
| also checks if you don't have the watch, and won't draw the clock
| if you don't have it (or at least part of the UI clock logic is
| disabled, I haven't actually tried seeing what happens if you
| don't have a watch to verify if my interpretation is correct).
|
| On the PAL version, the code that checks for a missing watch is
| at 0x0c180dc6 (that's where the code is loaded into memory,
| subtract 0xc010000 to get the address in 1ST_READ.BIN), and I
| think the code for drawing the clock (or at maybe it was just
| updating the hands of the clock?) is at 0x0c18290a.
|
| Dreamcast Shenmue has code to support other video modes, like
| alternate resolutions (320x240p!), antialiasing, and 24/32 bit
| color. They're a bit bugged, like when using antialiasing, the 2D
| elements being squashed into the left half of the screen, and
| some strange issue with the screen position for the RAMDAC being
| setting incorrectly, causing the screen to vibrate left/right by
| a pixel or two, but the 3D models were drawn correctly.
|
| 24-bit color worked surprisingly well (even if the flag intended
| to enable it didn't seem to work, and I had to force it
| elsewhere.) I would have thought that having less video RAM free
| would have caused serious problems, but the game just loaded
| fewer NPCs. It was strange playing without dithering.
| makotech221 wrote:
| wouldn't using an emualtor allow you to do most of that stuff
| TapamN wrote:
| Some of it, but I'd rather use real hardware.
| ac2u wrote:
| Is it true that lucky hit in Shenmue 2 used historical weather
| data so that humidity had an effect on the wooden pegs on the
| board?
| NooneAtAll3 wrote:
| I wish the article spent 2 sentences _introducing_ wtf Shenmue is
| donatj wrote:
| It's a game, for Dreamcast. Certified classic. Amazing
| technical demo for the time. Redefined what games could be. The
| Yakuza games would not exist without it and are generally
| considered it's spiritual successors.
|
| Shenmue was one of the first 3D games where realistic human
| characters had details like individually movable fingers. It
| was a very big deal for the year it came out.
| qingcharles wrote:
| My all-time favorite game. What's the best version to play these
| days?
| billfruit wrote:
| While not Shenmue, Yakuza:Like a Dragon: Infinite Wealth,
| released in 2024 has got good reviews.
| pkdpic wrote:
| Playing it on Steam Deck right now. Only issue is with QTEs but
| honestly hasn't bothered me at all. Thought that might ruin it.
| Overall it has been an excellent way to replay it so far.
| ghostly_s wrote:
| I'm not sure a single person in this thread actually read the
| article rather than just taking an opportunity to say how much
| they like the game.
|
| I read it and I'm not sure I get the point--it seems in the end
| what they discovered is the simulated sun position in the first
| two games are based on each other's locations. Not familiar
| enough with the series to understand what implication that has,
| but in any case, is it an easter egg or an oversight? It can't be
| both.
| denz88 wrote:
| The first game is set in Yokosuka, Japan, which has its
| latitude at 35deg north. The second game is set in Hong Kong,
| which has its latitude at 22deg north. It seems like whoever
| coded this data into the games may have swapped them.
| regus wrote:
| I was really hyped for Shenmue when it came out on the Dreamcast,
| but I wasn't crazy about it once I finally played it. It was a
| glorified point and click adventure game, and it ultimately had
| no ending or purpose. It was an interesting and ambitious idea
| for a game though, they threw the kitchen sink in there.
|
| My favorite part of the game was playing space harrier in the
| arcade.
| ascagnel_ wrote:
| While it's not a direct continuation, the Yakuza (and later
| Like a Dragon) series is a spiritual successor in some ways.
| isthisfoss wrote:
| I really hate this analogy. Yes it's also published by Sega
| but the director, development team, and gameplay elements are
| quite different. Shenmue to me was mainly about NPC
| interaction and open-world exploration whereas Yakuza is just
| a straight brawler re-intepreting classic Yakuza tropes.
|
| The move from Shenmue I to Shenmue II almost makes me think
| that was the direction Yu Suzuki was heading but never really
| ended up there. Have not played Shenmue III yet so I could be
| wrong.
| tt_dev wrote:
| Didn't read the article but man do I love this game.
| Ros2 wrote:
| The moon in-game also has a complex implementation. I don't think
| anyone realized this until the team porting the games to modern
| consoles pointed it out in an interview
|
| https://www.phantomriverstone.com/2020/09/ryo-goes-to-moon-s...
| mtillman wrote:
| I read every piece of US magazine coverage during the development
| of this game until finally 3-4 years later I bought my Dreamcast
| on launch and eventually Shenmue followed by a boot disc and
| Shenmue 2 (UK). 6 years of waiting to spend countless hours
| playing Space Harrier and Pachinko not to mention find some
| sailors. Absolutely loved this game.
| pkdpic wrote:
| I just coincidentally found my old dreamcast while cleaning out
| my dad's storage space... Guess I'll be buying some batteries for
| my VMU...
|
| Also excellent write up and discovery, truly inspiring
| *clap_emoji *bow_emoji
| nanna wrote:
| Shenmue I and II will stay with me forever. I waited and waited
| for Shenmue III, and swore that when it came out I would buy
| whatever it took to play it, but the reviews were so poor that I
| haven't even tried it. Is it worth it?
| ac2u wrote:
| Haven't yet completed it. In my opinion, although the originals
| had a clunky control scheme, it still had charm. Really bugs me
| how they moved the camera to an "over one shoulder" view rather
| than directly behind like in the first games. (nitpick) They
| also changed the iconic font used in the for no good reason.
| dfxm12 wrote:
| Shenmue is in a unique genre. The gameplay of III is more of
| the same, but not very innovative on top of what came before
| it. So, if you like I & II, you'll probably like III. The game
| plays as if it came out in 2003, not 2019, if that makes sense,
| but it takes full advantage of the graphics capabilities of the
| PS4. I understand mixed reviews. If you did enjoy I & II, the
| gameplay feels nostalgic & familiar, and you've probably played
| nothing like it in the past 20+ years. If you didn't, the
| gameplay probably seems antiquated, if not quaint, and you
| understand why there aren't many games like it.
|
| My qualms with the game were more story related.
___________________________________________________________________
(page generated 2025-03-13 23:02 UTC)