Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.
Have you messed with the level drawing routines?
No, not to my knowledge. :
ok, so that's one place to stay away from. When are they gonna learn to make their own code, and whatnot? At least i'm working on mine.
Though with mine, using sonic 3 animation data in sonic 1 to get my project going right. (Richter Belmont in sonic 1)
You realize that changing the animation scripts from S3 to S1 will not make your project any easier right? If you've actually taken the time to study the code, you'd realize they are similar that it isn't even funny. The main differences that come to mind is the fact that S3's Sonic's animation script adds provisions for the reverse gravity specific code animations and Tails holding Sonic. In other words, you're wasting your time back porting a nearly identical animation script. The only real way to fix your animations is to actually understand how the system works. Plain and simple. Changing the amount of frames being used per animation is being called somewhere in there and you just need to find where.
wait, crap, wrong topic
uh, I borked my mappings, and how do I fix them
I have a bug with my ported Tails character in S1 where if he stands on top of a monitor and then rolls, he'll destroy it and cause an issue where he's basically stuck walking in midair and he can go through the walls and other stuff that's not supposed to happen. Since he can fly to land on top of them quite easily, I can forsee this being too easy to trigger.
Sonic can't destroy monitors with a roll when standing on top of them, so I was wondering if someone knows how I can make the same apply to Tails? I'm not sure what part of the code is making that check for Sonic so that he's not allow to break them from that position.
Are you sure it's not just the slope glitch? An example can be seen here: http://www.youtube.com/watch?v=eEQY4d7FVl4
Explanation from retro:
This is from Sonic 3, the variables are in different locations in other games.
Maybe. It behaves similarly, but some things like destroying enemies from above doesn't reset it. I'm thinking the flag they're referring to is status flag #3,$22 in Sonic 1. Still I don't know how to apply a fix by looking at the locations on the monitor and/or sonic objects where that flag exists. I guess theoretically Sonic could trigger it too if he could destroy the monitor with a roll while standing on it ('still looking for whatever makes him not do that).
Edit: vvv He's structured to be nearly identical to Sonic's object in S1 line for line. Hardly anything besides his sprites and tails made it through and the little bit that did doesn't really look like it has much to do with this interaction, but I could be wrong. I also just checked to see what happens in S2 and neither character can destroy a monitor from above in that game either. Strange. Looking at the S2 code now...
I don't know how you ported tails, but it sounds to me that you took the code from Sonic 2, made necessary edits and added flight then just ran it. That would explain why the physics work slightly different since you didn't use Sonic as a base and then added the necessary bits of code, and also why you get slope glitch since the engine wasn't programmed to handle the physics from later games. What you could do is looking at the RAM while playing and look at how the flag value becomes different when doing different things (I personally use Gens11b RAM viewer). I know there's a way to edit RAM values while ingame but I'm not quite sure how to do that without converting it to various cheat codes so if anyone knows how to do that easily then please do tell .
OK. Though i've noticed something. A routine for sonic running around on loops.
When I tried Porting Sonic 3's Sonic art,map,cues,anim to sonic 1, i've noticed when idol his waiting anim is normal. when walking his animation is that of walking on a loop. first Rotated.
do I change the "Running/walking around a loop" routine to fix this bug, to instead of jumping a certain amount of frames, to using a different animation from 15, 30, 45, 60 degree rotate.
This way i can redo My Richter Belmont in Sonic 1, since his walking and running takes more frames than sonic's
From my experience in porting over Tails to Sonic 1 (which isn't very great, but getting better as I progress), It would be WAAAAY easier if you used Sonic as a base. It'll make everything work perfectly. Good luck.
(BTW, this isn't to you TimpZ. I'm just pointing out something you said. This is to FFUser.)
As TimpZ points out, this is slope glitch. Amusingly, something similar also happens in Stealth's "Knuckles in Sonic the Hedgehog" hack, as I recently found out (you have to roll or spindash, then jump from the monitor). In S1 and S2, this happens when an object that should clear bit 3 of the character's status byte ($22) does not, for a variety of reasons. In your case, when the monitor is destroyed by rolling while you are on top of it is treated as if you landed on the monitor while rolling -- the game does not check if you were standing on it or not.
Since you did not add additional code, it is likely that Tails' different hitbox causes the issue; I am guessing here, but if you are using Sonic 1's rolling code, it does not take into consideration the fact that Tails is shorter than Sonic, so when you roll, Tails is pushed down into the ground (monitor) further than he should, and gets within range of the monitor's hitbox.
You can also fix this by adding code to the monitor object to check if the character is standing on it and clear the flag as appropriate.
I can think of no enemy that will clear slope glitch; other than that, this description is correct.
Actually, i'd like to ask since Flamewing had some great information, have you changed Tails' collision height?
I found what was causing the monitor destruction problem for Tails and fixed it (it was actually something that matched Sonic's object too closely). Basically under anything that fixes Tails' standing/collision height. E.g
move.b #$F,$16(a0) ; sets standing height to only slightly higher than rolling height, unlike Sonic
subq.w #1,$C(a0) ;used to be #5. I just changed it to #1 to fix the problem like it is for Tails in S2
The last line for Sonic will subq.w #5 from his y position ($C(a0)) instead of #1 which is a problem for Tails because his collision height is supposed to be lower.
To TheStonebanana. You should make this change as well if your Tails character object doesn't have the adjustment already (the thing I posted about a couple pages ago to fix Tails from hovering above ground when he lands didn't include this necessary adjustment, sorry).
Edit: Oh wow I didn't notice all these other posts before I posted. I was fixing it and forgot to refresh before posting.
Yeah, I've already done this. That's why I was asking you about the collision height, because I had a slightly similar problem.
Alright, sorry for the double post here, but I have more news...
THE SAGA CONTINUES!
So, yes, I've been having quite some misadventures trying to port Tails' Tails, and apparently messed up level loading routines, so I decided to start fresh. I got a new dissasembly, applied the correct codes, and, it's finally working. Kinda. Look here:
Other than Tails' pallet, which I have yet to fix at the moment, his sprites are all garbled. I've ported over all Sonic 2 animations, and other things needed to operate, and I'm pretty sure that if this is fixed, I'll have this all ported. (And, as a bonus, you don't have to hear from me as much! )
So... What exactly is the problem?
(Before you ask, I have ported the Sonic 2 QueueDMATransfer codes and such to Sonic 1, allowing this to be playable.)
Are you using the mappings for Sonic?
Did you port the mappings properly? Sonic 2 uses a different mapping format than Sonic 1.
Also, did you port over the dynamic pattern loading cues?
Alright, so after a bit of work I got him unscrambled. In a way. You see, now (I think) it's just a matter of getting the Tails stored at a RAM location, as at the moment, Tails is either being followed by freaky red rings:
or his head is bobbing like he's listening to the hottest jam of the century or something.
I understand that this is probably (according to earlier posts) because it's being pointed to an area that rings are stored at, but I don't really get it, as in a guide to porting the spindash, which even uses the QueueDMATransfer like Tails' Tails do, it points free space to this location. I just want to know if this is an error on my part, or on the guide's.
((Here is the link, btw: http://info.sonicretro.org/SCHG_How-to:Add_Spin_Dash_to_Sonic_1/Part_2
I had the same problem.
They are being loaded over the VRAM location of the rings. This is different than the RAM space you just freed up with that part of the spindash tutorial. What you need to do to remedy this is find a free space in VRAM to load the tails into. If you start the game up with an emulator like Regen (with debuggers) and use the VDP debugger tool, you can see how the tiles are loaded into VRAM right below the pallete display. Scroll down and you'll see where Tails' tiles are being loaded in (which is presumably the same spot Sonic would've been loaded in since you used Obj01's code to port him in there). It's just enough space for Sonic, but not Tails AND his tails unfortunately.
MarkeyJester posted some code a couple of pages ago that will allow you see the free space in VRAM more easily. You can use that to visualize and find some space to load them into VRAM without overwriting something else.
What I ended up doing though was removing the tiles for the points that display when you destroy an enemy since it's not really detrimental to the game if they're not in there. You'll still have points added to your score.
If you want to do that (even if it's just for testing), In the folder "_inc/Pattern load cues.asm" comment out these two lines:
;dc.l Nem_Points ; points from enemy
also under obj05_Init, if you have this line:
you can change that to:
so that his tails are loaded closer to Tails in VRAM (in Sonic 2 he's loaded into VRAM location $7A0 which is $10 away from where his tails are loaded, but in Sonic 1 it's likely that you loaded him into $780, so $10 from that would be $790).
Ralakimus helped me even further to allow the Tails' tails animation to display properly in certain situations. It's a pretty quick fix.
I can pm you that if you want, but first let me know if the method helped you get his tails displaying properly in the first place if you choose to try it.
Separate names with a comma.