[Tutorial] How to Easily Import Original Level Art using SonLVL

Discussion in 'Tutorials' started by ProjectFM, Nov 2, 2021.

  1. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    900
    Location:
    Orono, Maine
    This was written by UnlimitedTrees. These are not my words. I'm just reposting this because I hear that's the easy way to get likes and engagement and the genuine human affection I've been lacking. The original post can be found here.

    About three years ago, I wrote a guide for importing level art into SonLVL. This was originally posted at SFGHQ, along with an old disassembly I made that just removes all the level assets to make importing new art quicker. I've noticed that a lot of ROM hacks nowadays still don't have new art outside of simple palette changes, and the guide I wrote pretty much gained no attention at SFGHQ. So, I've decided to repost it here in the hopes that it could help out beginners who don't know of a good, easy way of importing level art into the game.

    Special thanks to LuigiXHero for originally teaching me this method. Also shout outs to VAdaPEGA lol !!


    Beginners' Art Importing Guide - How to Easily Import Artwork
    I've noticed that in the hacking community, not many people know how to actually make custom artwork for ROM hacks. So, not only have I created a disassembly specifically for this purpose, but also decided to make a simple public guide that teaches people how to easily import art. So here we go.

    First you'll need the following tools:
    -A basic Paint program (I use Paint.NET but you can use whatever)
    -a tool called "IrfanView"
    -SonLVL

    Next, you're going to want to make a little spritesheet which will contain all the art you'll be importing.
    If you're importing chunks, you'll want to make sure the size of the picture is a multiple of 128 (or 256, if you're using the original Sonic 1 disassembly). If you're importing blocks, you'll want it to be a multiple of 16.

    Anyways, once you've saved the art, you then want to open the file in IrfanView. Then, you'll want to go to Image>Decrease Color Depth. At this point, you're going to want to then set the Color Depth to 4BPP (16 colors)

    Step1.png
    Step2.png

    Once this is done, you're going to want to go to Image>Palette>Edit Palette.

    Step3.png
    Step4.png

    Here, you're going to see all the colors used. This is where SonLVL comes in. You'll notice that in InfanView it shows the RGB values. You want to take these values and copy them into the color palette. Once you've copied all the colors, you're going to want to then export the color palette as a JASC-PAL.

    Step5.png
    Step6.png

    After you've exported the palette and put the palette file somewhere, you want to go back to InfanView, and go to Image>Palette>Import Palette. From here, you want to select the palette file you exported. After this, you want to then save the picture.

    Step7.png
    [​IMG]
    Step9.png

    Finally, you want to go in SonLVL, and in the Art section, you want to go to the chunks and simply import the art. Make sure you have the correct palette line selected, by the way! Then after this, you're done and you can now use the art in the level and give the blocks collisions.

    [​IMG]

    P.S. Pepsi in Sonic 1 turns 5 years old pretty soon. It's crazy how much has happened since then...

    By the way, I just wanted to say that, over the years, I've thought a lot about everything. I've been moving on to do my own crazy things, but I still have hope for the ROM hacking community. This community is capable of incredible things, you just need to make that first step...

    Here is what I've managed to pull off using the level importing method:

    1.png
    2.png
    [​IMG]
    [​IMG]

    And while I'm at it with reposting, here are my words in response because I believe out there exists somewhere someone who may actually find my words useful.

    I think delving into code would be better for a separate guide rather than cramming it all in into this SonLVL-focused one. However, I also think there's an important piece missing from this guide, and that's importing collision and priority. If you have more png files in the same folder as the art you're importing that has the same name as the art but with "_pri", "_col1", and "_col2" (or just "_col" if you're using Sonic 1's chunk system), then those art files will be used to map the priority and collision onto the art you're importing, which can save you a ton of time you would've spent doing it manually. How priority generally works is that if an 8x8 tile is white, it's high priority, and if it's black, it's low priority. For collision, if a 16x16 block is pink, it's no collision, if it's black it's all solid, if it's white it's top solid, and if it's yellow, it's left/right/bottom solid. Plus, each 16x16 block can be shaped using pink pixels and that shape will be adjusted to the closest available solid shape in your hack's table of solids. The easiest way to create a collision map is just to take your art file, recolor the background pink and all the art black, then you're free to do stuff like turn parts that shouldn't be solid pink and change the collision types 16x16 blocks of stuff. I'm probably very poorly explaining this and might've messed someone up because i don't know all the specifics, but also I don't feel like turning this into a well thought out guide like Trees', so uh yeah idk bye retro see you in another 6 months when I make my next post
     
    Last edited: Nov 2, 2021
  2. DeltaWooloo

    DeltaWooloo *waving hello and goodbye* Member

    Joined:
    Aug 7, 2019
    Messages:
    337
    I'll cross-post my response I said in Retro:

    My only gripe is there should be a bit more than adding art and collision. To make the level more lively, people need to set up deformation for scrolling background and a palette cycle. We don't see many hackers explain it either, so it would be cool if more than what this offers. But I'll say this guide can bring newbies on the roll into adding art, so kudos to you for making this happen.

    The issue I see is what ProjectFM has said above, with it mainly being a SonLVL-Esque guide which he's right. People can learn to make their level outstanding if they know how to work with deformation and palette cycle. However, if you want to get a bit of context as to how to work with it, MarkeyJester has written a lovely guide giving a detailed explanation of how you can set it up. Check it out here.