Sonic and Sega Retro Message Board: Basic Questions & Answers thread - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 410 Pages +
  • ◄ First
  • 408
  • 409
  • 410
    Locked
    Locked Forum

Basic Questions & Answers thread NEWBIES: Start here!

#6136 User is offline SonicoOurico 

Posted 10 November 2018 - 11:52 PM

  • Posts: 19
  • Joined: 05-August 16
I recently added the Sonic 3 pose to Sonic 2, but also wanted to add walls that would not let the player through.
Example:
Posted Image
Posted Image
This post has been edited by SonicoOurico: 10 November 2018 - 11:53 PM

#6137 User is offline TheInvisibleSun 

Posted 11 November 2018 - 02:17 PM

  • OVER THE TOP TECHNO-BLAST
  • Posts: 1390
  • Joined: 09-December 09
  • Gender:Male
  • Location:Buffalo, NY, USA
  • Project:Sonic 1 Color Contrast
If I understand correctly, you're looking for is the screen-locking code, correct?

I don't have the code off-hand at the moment, but I suggest checking out how Act 2 locks the screen after bosses.

#6138 User is offline SonicoOurico 

Posted 14 November 2018 - 05:12 PM

  • Posts: 19
  • Joined: 05-August 16
Doesn't work!

#6139 User is offline Ralakimus 

Posted 14 November 2018 - 07:54 PM

  • Posts: 292
  • Joined: 16-April 13
  • Gender:Male
What exactly did you do that doesn't work?

#6140 User is offline SonicoOurico 

Posted 14 November 2018 - 08:43 PM

  • Posts: 19
  • Joined: 05-August 16
I am trying to work with the background deformation, but I am having problems with the background.
Note:I used Parallax Editor from Selbi.
https://imgur.com/a/wZseu2e
here is the code:
Spoiler

This post has been edited by SonicoOurico: 16 November 2018 - 10:29 AM

#6141 User is offline SonicoOurico 

Posted 29 November 2018 - 07:53 PM

  • Posts: 19
  • Joined: 05-August 16
I'm trying to add the down attack from Sonic Mania to Sonic 2, a skill that Mighty has, but I want to make the screen shake the same as it does in Sonic Mania when it hits the ground
Here is the code
[/spoiler]
Mighty_DownJump:
tst.b $21(a0) ; is Sonic currently performing a double jump?
bne.w loc_169C2 ; if yes, branch
move.b ($FFFFF603).w,d0
andi.b #$70,d0
beq.w loc_169C2 ; if not, branch
move.b #1,$21(a0)
move.w #0,x_vel(a0) ; halt horizontal speed...
move.w #0,inertia(a0) ; ...both ground and air
move.w #$800,y_vel(a0) ; force Sonic down
bpl.s loc_169C2
move.b #$14,(Screen_Shaking_Flag).w
loc_169C2:
rts
This post has been edited by SonicoOurico: 29 November 2018 - 07:55 PM

#6142 User is offline MainMemory 

Posted 30 November 2018 - 12:55 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4221
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Normally, Screen_Shaking_Flag is processed by the level's scrolling routine to produce the effect. Do you have some code set up to read the value?

#6143 User is offline Natsumi 

Posted 30 November 2018 - 02:37 PM

  • Miss Fox
  • Posts: 171
  • Joined: 08-February 12
  • Gender:Female
  • Location:Otter's lap
  • Project:Being with my boyfriend
More importantly, that flag is never set, since the y_vel(a0) will always be positive. What I think you meant to do, is check for its value each frame to detect landing. However, in order to do this correctly and efficiently, you need to add some code checking for some flag (I assume $21(a0)), and if set, then save the value to the screen shaking flag. The routine where you should add it, is in a routine that is called whenever the player either lands on a floor or solid object. In sonic 2 Git disassembly, the routine you want is called Sonic_ResetOnFloor_Part3.
This post has been edited by Natsumi: 30 November 2018 - 02:40 PM

#6144 User is offline Strike 

Posted 07 December 2018 - 03:38 PM

  • Posts: 3
  • Joined: 30-November 18
  • Gender:Male
Hello everyone, this is my first real post!

What tool can I use to convert Lost World HKX files to Gens format?
This post has been edited by Strike: 07 December 2018 - 05:54 PM

#6145 User is offline SonicoOurico 

Posted 08 December 2018 - 05:10 PM

  • Posts: 19
  • Joined: 05-August 16
I can not make the tails carry the Sonic, the game simply hangs.
Here is the code:
Spoiler



Posted Image
This post has been edited by SonicoOurico: 08 December 2018 - 05:12 PM

#6146 User is offline MarkeyJester 

Posted 08 December 2018 - 05:57 PM

  • It's Saturday TV Toons!! (90's Style)
  • Posts: 1866
  • Joined: 22-July 08
  • Gender:Male
  • Location:Japan
  • Wiki edits:16
There are a few "4(a1)" in that code, this is supposed to be the mappings pointer in Sonic 2. I assume this code is ported from Sonic 3, the 4 should be a 1, or "render_flags" as the equates appear to be.

It would explain why the sprites are spazed all over the place, it would also explain a possible reason for the crash. There could be other reasons, but I'm sticking a bet with that for now.

#6147 User is offline SonicoOurico 

Posted 08 December 2018 - 06:58 PM

  • Posts: 19
  • Joined: 05-August 16
I did exactly what you said, but it did not work.

#6148 User is offline SonicoOurico 

Posted Yesterday, 09:17 PM

  • Posts: 19
  • Joined: 05-August 16
Does anyone know what this line means?
Spoiler


#6149 User is offline MarkeyJester 

Posted Today, 08:20 AM

  • It's Saturday TV Toons!! (90's Style)
  • Posts: 1866
  • Joined: 22-July 08
  • Gender:Male
  • Location:Japan
  • Wiki edits:16
These appear to be copying the X and Y speeds of an object to different RAM addresses.

The $FFFFB018 and $FFFFB01A is within an object in Sonic 2 I believe. I assume this is Sonic's object slot since he is usually the first object in the object RAM, I would also assume that 18 is the x_Vel (X speed), and 1A is the y_Vel (Y speed). I would also assume judging by your previous post regarding tails carrying Sonic, that a0 must therefore be Tails' object slot (probably $FFFFB040), so, this must be Tails copying his X and Y speed to Sonic's X and Y speeds.

X in mathematics is usually associated with horizontal (left/right) and Y with vertical (up/down). So the "move.w x_Vel(a0),($FFFFB018).w" and "move.w y_Vel(a0),($FFFFB01A).w" are copying Tails' Up/Down and Left/Right speed movement to Sonic, which makes sense as when Tails is to suddenly let go by perhaps landing while moving at speed, Sonic needs to move at that same speed in the same direction.

As for the "move.w x_Vel(a0),($FFFFF744).w" and "move.w y_Vel(a0),($FFFFF74C).w", well these are keeping a copy of the X and Y speeds in these RAM slots, I am not sure what for but there's bound to be a good reason.

Everything above I've just said is just an assumption, I am not really in any position right now to go looking through source codes to find out exactly what it's doing.

#6150 User is offline SonicoOurico 

Posted Today, 10:45 AM

  • Posts: 19
  • Joined: 05-August 16
Thanks it worked

  • 410 Pages +
  • ◄ First
  • 408
  • 409
  • 410
    Locked
    Locked Forum

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