don't click here

Sonic 3K Gens Chunk Overlay Lua Script

Discussion in 'Engineering & Reverse Engineering' started by Cokie, Aug 26, 2022.

  1. Cokie

    Cokie

    C. Okie Member
    48
    6
    8
    I wrote a Lua script for gens re-record and gens r57shell, that overlays a grid of the levels chunks as well as showing the playfield coordinate of the chunk the mouse is currently over. This is useful to use while working with a sonic level editor . It allows a more dynamic feel for where chunks should go in a sonic level editor like sonlvl or soned2. Figuring out how many ground. Chunks to place so you don’t have excess and have a part of the level where you walk unnecessarily long

    The GitHub: https://github.com/Cokie1/Sonic-3K-Gens-Chunk-Overlay-Lua-Script


    Here is a video of the script:
     
    • Like Like x 2
    • Useful Useful x 1
    • List
  2. Cokie

    Cokie

    C. Okie Member
    48
    6
    8
    PNG image.png I have a question of whether this icode will be 100% accurate. So the program shows a grid of the chunks in the level. I do this by drawing 4 vertical lines starting at the camera x pos coarse ( CamerX & 0xFf80) ) and 3 horizontal lines starting at the camera y pos coarse ( same method). The diagram shows this .. where the blue lines vert lines and the green are the horizontal lines drawn. The pink vertical and horizontal lines are the start of chunks of the level that aren’t drawn .My question is will this method always ensure an accurate grid of the chunks ? Specifically in levels whos Y wraps?
     
    Last edited: Aug 28, 2022
  3. Cokie

    Cokie

    C. Okie Member
    48
    6
    8
    Update. Levels that wrap Y like SOZ2 seem to work properly with my code .