Sonic and Sega Retro Message Board: How to fix the scattered rings underwater - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

How to fix the scattered rings underwater This is for Sonic 1, Sonic 2 and also S3K!

#16 User is offline ICEknight 

Posted 28 March 2012 - 12:04 PM

  • Posts: 8953
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18
This is very interesting, I can't believe I didn't remember the rings having the wrong gravity when underwater. Good work fixing them!

View Postredhotsonic, on 26 March 2012 - 06:38 AM, said:

This has never been applied to any Sonic game IIRC. Can't be too sure about Knuckles Chaotix as never played that game.

They ended up not adding water to any level, so no need to check.


Which makes me wonder if there could be any remnants (not counting graphics) of water implementation in the game...

#17 User is offline vladikcomper 

Posted 28 March 2012 - 01:20 PM

  • Posts: 169
  • Joined: 13-June 09
  • Gender:Not Telling
  • Location:Russia
  • Project:Sonic Winter Adventures
  • Wiki edits:1

View Postredhotsonic, on 28 March 2012 - 10:18 AM, said:

View Postflamewing, on 27 March 2012 - 05:46 PM, said:

Now that I looked more closely at the code, I think it should also be asr instead or lsr


I'm not at home at the moment so I can't test it out, but what will be the difference? To me, once all bits have shifted to the right, the new bit introduced may be a 1 instead of a 0 (depends if it's a negative value).

ASR shifts arithmetically, which means -4 will become -2 after shifting.
%1111111111111100 -> %1111111111111110

LSR shifts logically ignoring source data's sign, so -4 will eventually become 32766!
%1111111111111100 -> %0111111111111110

If you're calculating signed numbers, there will be a huge bug with it.
However, if you were dealing with shifting left (in case you wanted to multiply something by power of 2), there would be no difference between ASL and LSL, expect for ASL would set Overflow bit if sign bit was changed after operation.
This post has been edited by vladikcomper: 28 March 2012 - 01:22 PM

#18 User is offline redhotsonic 

Posted 28 March 2012 - 04:15 PM

  • Also known as RHS
  • Posts: 1097
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic 2 Recreation
  • Wiki edits:24

View Postvladikcomper, on 28 March 2012 - 01:20 PM, said:

View Postredhotsonic, on 28 March 2012 - 10:18 AM, said:

View Postflamewing, on 27 March 2012 - 05:46 PM, said:

Now that I looked more closely at the code, I think it should also be asr instead or lsr


I'm not at home at the moment so I can't test it out, but what will be the difference? To me, once all bits have shifted to the right, the new bit introduced may be a 1 instead of a 0 (depends if it's a negative value).

ASR shifts arithmetically, which means -4 will become -2 after shifting.
%1111111111111100 -> %1111111111111110

LSR shifts logically ignoring source data's sign, so -4 will eventually become 32766!
%1111111111111100 -> %0111111111111110

If you're calculating signed numbers, there will be a huge bug with it.
However, if you were dealing with shifting left (in case you wanted to multiply something by power of 2), there would be no difference between ASL and LSL, expect for ASL would set Overflow bit if sign bit was changed after operation.



I see. I have tried it and have noticed a slight difference. With lsr, some rings were in the same place as another (one directly behind another), and ASR seems to fix this. I will apply this to the guide.

#19 User is offline KingofHarts 

Posted 23 April 2012 - 09:23 AM

  • Amigo
  • Posts: 1373
  • Joined: 07-August 10
  • Gender:Male
  • Location:CHICAGO, IL
  • Project:Finding a job, Sonic Triad Studio, Sonic 1 REV C
  • Wiki edits:1
http://info.sonicret...erwater_Physics
Here you go. I just copied and pasted from the OP. Slapped headers on the thing, and added the page to the How-To guide, categories, and the template at the bottom.
If anyone knows how to put in a contents table, please do it, cuz it could use one. I just figured it would be fine on one page... seeing as how this is essentially the same guide for all three games, for the most part.
EDIT: Why the fuck does my Wiki Edits stay at 1??? I have certainly made way more than one... both major and minor. :argh:
This post has been edited by KingofHarts: 24 April 2012 - 04:10 AM

#20 User is offline redhotsonic 

Posted 26 April 2012 - 07:32 AM

  • Also known as RHS
  • Posts: 1097
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic 2 Recreation
  • Wiki edits:24
Thanks for doing that, mate. I hope it comes useful for everyone!

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users