Basic Questions and Answers Thread

Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.

  1. RyeBread

    RyeBread Well-Known Member Member

    Joined:
    May 10, 2013
    Messages:
    155
    Location:
    Devon, UK
    Two small questions -

    How can I hide this spring? I want it to be slightly visible, but have it so the player will run into it and be bounced up. Currently elevating it above the grass makes the player run into it like it's solid, and having it below the grass makes it visible but not look very good.
    upload_2018-8-1_23-36-42.png


    The second issue is that the level starts with a red spring throwing the player forward. That works fine, and the spring despawns after which is all good, but Sonic is running towards the left which is just a visual issue but kind of ruins the automatic segment in terms of looks.
    upload_2018-8-1_23-38-23.png
     
    Last edited: Aug 2, 2018
  2. Pacca

    Pacca Why succeed when you can profit off of failure? Member

    Joined:
    Jul 5, 2014
    Messages:
    1,149
    Location:
    Triton (Moon)
    To make the spring hidden, you'd need to give the grass blocks priority. I'd reccomend copying them, then doing it, since making all the grass render above objects can cause problems.

    For the first issue, perhaps place sonic just above the ground, out of the springs reach? He should fall into position before the title card fades in.
     
    RyeBread likes this.
  3. AURORA☆FIELDS

    AURORA☆FIELDS the cute one here Member

    Joined:
    Oct 7, 2011
    Messages:
    715
    Location:
    Where I should've been a long time ago
    The issue with grass blocks and springs is, that nearly everything in Green Hill Zone is on low plane. In practice, this means that any object that is placed in front of the terrain, will never appear under it, Worse, if you make the grass high plane, the wall will appear in front of many objects as well (including Sonic), making it very ugly and apparent. One trick you could always try, is either modifying the spring art itself to remove parts of it, to make it look like its behind the grass (not recommended).

    You can also create a new object, that has the same grass, without the wall, and make that object higher priority than the spring. Then you can place it on top of that spring, and it will hide that part of the graphics. This is probably more technical thing to make it work, but there is an object (1C if I recall) that is meant for various graphic-only objects, used in few levels. The art you can get from GHZ art itself. I can not right now help any further, not at a computer.


    As for the spring, the object is designed to flip your facing direction. This of course makes little sense if you are going backwards by default. You can reprogram it to set you in a specific direction each time.
     
    ProjectFM and RyeBread like this.
  4. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,779
    Location:
    italy
    As Natsumi already said, horizontal springs always change your direction. Since you normally hit springs by walking or running into them, this is good and all, but it's indeed possible to hit springs while walking backwards. In this case, you're not actually walking, but since Sonic naturally faces right when you enter a level, he's effectively hitting the spring with his back. The simplest way to fix it, in my opinion, is to make Sonic face left when that particular level is loaded. All it takes is a cmpi.w which checks for the level number, an appropriate bne/beq according to your taste, and a
    Code:
    		bset	#0,($FFFFD022).w ; make	Sonic face left
    There are various places where you can do it, I'd suggest somewhere in the MainLoadBlockLoad whereabouts since checks for exotic levels (e.g. LZ4) are already done there.

    Also, this is long overdue (I rarely use my main computer anymore), but I wanted to say something to that guy who's trying to add the 7th emerald in Sonic 1. Aside from the obvious things you can easily figure out, such as increasing indexes from 6 to 7, there is one line which is easily overlooked. In the good ending, Sonic makes the 6 emeralds spin in the air; when they load, there is a line which ensures that they're evenly spaced, by increasing their angle by $2A (which is 42, which is ~255/6, since angles use a byte value, so the maximum is 255, and not 360). You should change that value to $24 (which is 36, which is ~255/7). Interestingly, both 42×6 and 36×7 = 252, but that's besides the point. This is the line, below the Obj88_MainLoop label:
    Code:
    		addi.b	#$2A,d3
    Thanks goes to Puto, since he's the one who told me this when I added the 7th emerald in my hack and the good ending looked wrong.

    And yes, I removed the 7th emerald afterwards anyway, because I suck at art and I couldn't figure out a proper palette for it.
     
    Last edited: Aug 2, 2018
    ProjectFM and RyeBread like this.
  5. Greenknight9000

    Greenknight9000 Well-Known Member Member

    Joined:
    Apr 30, 2014
    Messages:
    53
    Heya!
    I've been trying to change the special stage sprites (more specifically the jumping sprites - I'm trying to replace the bland orb-jumping sprites that Sonic and Tails uses with Mania's Bonus stage jumping sprites)
    I've been trying to follow Flamewing's tutorial, but where it says "I will assume that you have labelled these BINCLUDEd DPLCs as 'Obj09_MapRUnc', 'Obj10_MapRUnc' and 'Obj88_MapRUnc'" I don't really understand what it's saying, I also don't know where I have to put the Binclude command
    Currently, I decided to try and do Obj09 first as a test and keep getting this error on build
    > > >s2.asm(65976): error: unknown opcode
    > > > "MAPPINGS\SPRITEDPLC\OBJ09
    > > > BINCLUDE "mappings\spriteDPLC\obj09.bin"
    now, I'm sure this is an easy fix and I'm just thick as dogshit,but I really could use some of the community's magical knowledge once again.

    Another thing I wanted to say is that I've finally figured out what I want to do with this hack - a visual improvement over Sonic and Tails' sprites in areas where the sprites look strange ( and that's why I want to replace the special stage jumping sprites)

    EDIT:
    This is the code
    ; ----------------------------------------------------------------------------
    ; Object 09 - Sonic in Special Stage
    ; ----------------------------------------------------------------------------
    ; Sprite_338EC:
    BINCLUDE "mappings\spriteDPLC\obj09.bin"
    Obj09_MapRUnc:
    bsr.w loc_33908
    moveq #0,d0
    move.b routine(a0),d0
    move.w Obj09_Index(pc,d0.w),d1
    jmp Obj09_Index(pc,d1.w)
     
  6. Pacca

    Pacca Why succeed when you can profit off of failure? Member

    Joined:
    Jul 5, 2014
    Messages:
    1,149
    Location:
    Triton (Moon)
    The BINCLUDE is being read as a label, since it doesn't have a space/tab/etc. in front of it. If anything, even something that looks like code, is not separated from the beginning of a line, the assembler will assume its' a label, so it's important that you add a space or tab before the BINCLUDE.

    Also, "Obj09_MapRUnc:" needs to go above the BINCLUDE, not below it; labels almost always refer to whats' below them. In this case, the game would attempt to use that code as DPLCs, instead of the file you want it to use.

    Lastly, make sure you get rid of the original labels, too. In fact, I'd highly placing you new BINCLUDEs and labels where the old ones were. It's called "Obj09_MapRUnc_345FA:" in the Sonic 2 github disassembly.
     
  7. Greenknight9000

    Greenknight9000 Well-Known Member Member

    Joined:
    Apr 30, 2014
    Messages:
    53
    I'm using the HG assembly (IIRC), is there anything different I may have to do?
     
  8. Pacca

    Pacca Why succeed when you can profit off of failure? Member

    Joined:
    Jul 5, 2014
    Messages:
    1,149
    Location:
    Triton (Moon)
    Not likely. Most of what I said is applicable to every disassembly I've seen thus far. The only exception would be the name "Obj09_MapRUnc_345FA:"; it might be different in the HG disassembly.
     
  9. Greenknight9000

    Greenknight9000 Well-Known Member Member

    Joined:
    Apr 30, 2014
    Messages:
    53
    It built successfully
    the result however, cannot be said the same
    [​IMG]
     
  10. VLaD 7890

    VLaD 7890 Newcomer Member

    Joined:
    Jan 4, 2016
    Messages:
    16
    Location:
    Gornyak/Russia
    How to change the special stages in the game sonic and knuckles? Where to find layouts? For sonic 3 found, and for SK there is no.
     
  11. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,779
    Location:
    italy
    I'll try to explain this in simple English.

    You can edit the Special Stages using my editor.

    The Special Stages from Sonic 3 are not compressed, so they can be easily edited.

    The Special Stages from Sonic & Knuckles are compressed in the "Kosinski" format, so you should do more things. There is only one Kosinski entity with the data for the 8 Special Stages, it's similar to a ZIP file with 8 documents in it. If you want to edit one of the documents, you have to extract it from the ZIP file, edit it, and put it back into the ZIP file. In this case, you have to decompress the Kosinski data, split the data for the Special Stage you want to edit, and compress the new data back to Kosinski. Because of the compression, it is possible that the new data will be bigger than the old data. If this happens, it might be a problem.

    Of course there is much more to say, if you confirm that you can understand this level of English I will be glad to help you more.
     
  12. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    879
    Or... you could use S3SSEdit, which has native support for editing S&K Special Stages and even Blue Sphere stages.
     
    nineko likes this.
  13. Prilix

    Prilix A normal romhacker In Limbo

    Joined:
    Sep 19, 2017
    Messages:
    20
    Location:
    Argentina
    Because in Sonlvl, the object of the ring appears as unknown??
    upload_2018-8-3_19-52-1.png
     
  14. Pacca

    Pacca Why succeed when you can profit off of failure? Member

    Joined:
    Jul 5, 2014
    Messages:
    1,149
    Location:
    Triton (Moon)
    You need to update the SonLVL definitions. Download the correct ones for your game from the updater, then copy the files to the SonLVL folder in the disassembly.
     
  15. RyeBread

    RyeBread Well-Known Member Member

    Joined:
    May 10, 2013
    Messages:
    155
    Location:
    Devon, UK
    From what I know SonLVL definitions haven't been updated yet for Sonic 1 Hivebrain. That or I'm doing something wrong.

    Question: Is it possible to slow down the music in Sonic 1?
     
    Last edited: Aug 4, 2018
  16. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    879
    Yes, the Sonic 1 2005 object definitions have not been updated yet, so several objects will not be displayed properly until someone updates them. I personally have little time to do so, and it is not a very high priority.
     
  17. Prilix

    Prilix A normal romhacker In Limbo

    Joined:
    Sep 19, 2017
    Messages:
    20
    Location:
    Argentina
    Will be a little difficult place the rings... But I wait patiently.
     
  18. Pacca

    Pacca Why succeed when you can profit off of failure? Member

    Joined:
    Jul 5, 2014
    Messages:
    1,149
    Location:
    Triton (Moon)
    Is there a good way to compare the differences between two separate disassemblies? I found a bug in one of my projects that goes very deep into my project; so deep, in fact, that it was part of the initial commit. I wasn't very serious about it at first, and didn't use git until later on, so the initial commit was already modified. The bug/bugs involves level collision (one of the parts of the engine I know absolutely nothing about), and would be far easier to debug if I could see the differences between the initial commit disassembly and a clean one.
     
  19. Iso Kilo

    Iso Kilo Sonic 1 Beta Researcher Member

    Joined:
    Oct 9, 2017
    Messages:
    203
    Location:
    Small Town in BC, Canada
    While following the S3K Object and Ring Manager guide made by ProjectFM, he said you could compare a clean disassembly with the new Obj + Ring Manager one with a program known as ExamDiff.
     
  20. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    879
    You could set up a Git repository for a clean disassembly, then copy the files from your initial commit over it and compare them via git diff/git difftool, or just use a standalone diff program such as Kdiff3.
     
    AURORA☆FIELDS likes this.