Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Sprite Offsets/Resizing

A Question for Sonic 3 A.I.R

No ads for members. Membership is 100% free. Sign up!
So I was wondering how can I resize a sprite box or like change the offsets in the .JSON files because IDK what which offset is which sprite. Any help?

Answers

Sign up to access this!
  • NotBootstrap avatar
    NotBootstrap Joined 2mo ago
    Offline
    443 points Ranked 46672nd
    access_time 13d edit 12d
    If you have a spritesheet, which is pretty much the same we all use, as well as the json file (it's pretty much open source), you can locate the line codes like so:

    "character_example_0x01": { "File": "filename.bmp", "Rect": "x,y,m,n", "Center": "a,b" },

    the first part "character_example_0x01" will take the first sprite in the spritesheet. One quick way to locate a sprite line in the json file is: Count the sprites from left to right and from up to down, when you have that sprite number, add one and that is the line number in the JSON file (I highly recommend you use Notepad++ to edit).

    For example the dying sprite is the 168th one, so I add one and the line for that sprite is the line 169. (Notepad++ will have the line number in the left side) 

    Now, ""File": "filename.bmp"... will open the spritesheet file you want, pretty simple.

    ..."Rect": "x,y,m,n",... 

    x will define where it will start cropping and it will be "x" pixels in the x axis, from left to right.
    y will define where it will start cropping and it will be "y" pixels in the y axis, from up to down.

    m will define until where it will finish cropping, if you write "m" the cropping will be "m" pixels wide in the x axis.
    n will define until where it will finish cropping, if you write "n" the cropping will be "n" pixels tall in the y axis.

    ..."Center": "a,b""

    a will define where the center will be from the start of the crop in the x axis, from left to right.
    b will define where the center will be from the start of the crop in the y axis, from up to down.

    For a fast testing I recommend you save our bmp file directly in the mod file in the %Appdata%/Roaming/Sonic3AIR file.

    If you have any specific questions contact me @LocalAutism on twitter or leave a comment

    the sega saturn was a good con
    URL to post:

Embed

menu
Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Asker

Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • favorite 0
  • remove_red_eye 308
  • mode_comment 1
  • access_time 15d

More from Submitter

menu

WiPs by Submitter

menu

More Other/Misc Questions