Register - Login
Views: 99407733
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
04-24-22 08:31:43 PM
Jul - General Game/ROM Hacking - SMW ASM question regarding custom sprite creation New poll - New thread - New reply
Next newer thread | Next older thread
Schwa
Member
Level: 24


Posts: 10/101
EXP: 73493
For next: 4632

Since: 12-17-07

From: Tacoma + Redmond = The Moment

Since last post: 9.3 years
Last activity: 9.3 years

Posted on 01-04-08 01:16:29 PM Link | Quote

I'd be asking this at SMW Central but they deleted that site, and they won't let me make a new account at the new site (no Register button), so I'm asking here.

I need to learn how to change how many tiles a custom sprite consists of. It's extremely important that I learn how to resize sprites, but after half an hour of studying different custom sprite ASM codes and trying to find a pattern, I still have no idea how this is done. Furthermore there was NOTHING on Google about resizing sprites. Will someone please teach me how to do this? You'll get a spot in the credits at the very least.

I hope for a fast response. My hack is nearly halted until I figure this out.

Thanks for your patience. --Schwa

____________________
(Layout made by Peardian, graphics from Sonic Team. Worship them.)
Sukasa

Level: 123


Posts: 208/4326
EXP: 20919384
For next: 311882

Since: 07-07-07


Since last post: 1.1 years
Last activity: 1.0 years

Posted on 01-04-08 05:07:28 PM Link | Quote
Profile | Send PM
Real Life Comics
p2pnet.net
My Site
You mean resizing a la Bowser?

Unfortunately, that's impossible. Bowser is actually a layer 1 object, running in SNES Mode7. The only way you'll be able to 'resize' anything in a normal level short of using the SuperFX is to use multiple copies of the sprite in the GFX file You could sorta 'resize' it if you coded it so tiles expanded out from the smaller sprite into the larger one, but it would be a rather complex setup I'd imagine.

____________________
Rena
I had one (1) message in Discord deleted and proceeded to make a huge, huge mess about how it was a violation of free speech and how moderators are supposed to be spam janitors and nobody should have the right to tell me not to talk about school shootings
Level: 135


Posts: 2044/5390
EXP: 29052822
For next: 282183

Since: 07-22-07

Pronouns: he/him/whatever
From: RSP Segment 6

Since last post: 333 days
Last activity: 333 days

Posted on 01-04-08 05:38:58 PM Link | Quote
Jul - Post #2044 - 01-04-08 12:38:58pm
Yeah, SNES has no hardware sprite scaling. You can only use prescaled graphics (which will eat up memory) or software scaling (which will be slow as shit without an expansion chip to do it).

Or, you might be able to use the same method as Bowser, if you don't need anything else on the screen.

____________________
Schwa
Member
Level: 24


Posts: 11/101
EXP: 73493
For next: 4632

Since: 12-17-07

From: Tacoma + Redmond = The Moment

Since last post: 9.3 years
Last activity: 9.3 years

Posted on 01-04-08 08:36:37 PM Link | Quote

You know, I really love it how you people jump to conclusions so damn quickly.

No, no, NO, I want NOTHING to do with Bowser, dammit. What I'm trying to do is make a Cobrat custom sprite, since Cobrat was one of my favorite enemies from the Mario series. I thought I could make the Cobrat based off a Snifit, but the Snifit takes up one 16x16 tile and I want it to take up two (meaning 16x32). I just have no idea what code to change/add to make him take up two tiles.

It would also be good if I made him open his mouth before firing, but I think I might be able to figure that out by studying how Birdo was done... that is, after I made him taller like I'm trying to do.

Now that we're clear on what's trying to be accomplished, NOW can anyone help me?

____________________
(Layout made by Peardian, graphics from Sonic Team. Worship them.)
Sukasa

Level: 123


Posts: 209/4326
EXP: 20919384
For next: 311882

Since: 07-07-07


Since last post: 1.1 years
Last activity: 1.0 years

Posted on 01-04-08 08:41:06 PM Link | Quote
Profile | Send PM
Real Life Comics
p2pnet.net
My Site
Sorry Schwa, but I misunderstood it and thought you meant changing sprite's size in-game.

Basically, you need to find the draw routine in the sprite, and there should be an area where it writes to $0300,Y or so. That's the code that draws a sprite tile, You'll want to adjust that to draw two tiles a frame instead of one, and remember to add (or subtract) 16 pixels from the second tile. You'll also wan tto change the sprite's clipping value so that it collides with mario properly, for a cobrat, you'll probably be fine copying the clipping value of a koopa (using Mario world reconfigurator or tweaker).

It's somewhat me complex than that, but if you want ot talk to me in PMs or on IRC, I'd be happy to help.

____________________
Schwa
Member
Level: 24


Posts: 12/101
EXP: 73493
For next: 4632

Since: 12-17-07

From: Tacoma + Redmond = The Moment

Since last post: 9.3 years
Last activity: 9.3 years

Posted on 01-05-08 01:03:01 AM Link | Quote

Hmm... Okay, that helps a little. But I still need to know how the draw routine and this $0300,Y works if I'm going to be successful. No need to use PMs, that's what I made this thread for (maybe this will help other people once I figure this out).

Also, I found a convenient tutorial on this stuff by mikeyk, but I don't understand it very well. It would help if it told me exactly what to do to add tiles to a sprite, and I also think the example they gave is different than the way mikeyk himself codes his own sprites...

I wonder if he'll respond if I email him? He's like a celebrity, and I didn't get one from Glyph Phoenix...

____________________
(Layout made by Peardian, graphics from Sonic Team. Worship them.)
Sukasa

Level: 123


Posts: 210/4326
EXP: 20919384
For next: 311882

Since: 07-07-07


Since last post: 1.1 years
Last activity: 1.0 years

Posted on 01-05-08 04:06:11 AM Link | Quote
Profile | Send PM
Real Life Comics
p2pnet.net
My Site
He might. Ah well, I"ve worked with sprite graphics.

Basically, $0300,Y is an array of sprite tiles, formatted to 4 bytes per tile. One byte is the actual tile number, lower 8 bits. Two bytes are the sprite X/Y in-level, and the fourth byte contains the sprite page bit (2 pages of sprite tiles), and all the bits for PPU (X/Y flip, Palette, draw order). I can't remember the specific order though. That's basically $0300,Y in a nutshell. The draw routine in a sprite simply adds tiles to this array based on any number of sprite-specific rules. Unfortunately, because of how the sprites are so different, these can vary between even similar sprites.

____________________
Schwa
Member
Level: 24


Posts: 14/101
EXP: 73493
For next: 4632

Since: 12-17-07

From: Tacoma + Redmond = The Moment

Since last post: 9.3 years
Last activity: 9.3 years

Posted on 01-05-08 06:45:48 AM (last edited by Schwa at 01-05-08 09:49 AM) Link | Quote

Right, I got that part, from mikeyk's tutorial that came with SpriteTool (I read it again and it made sense this time).

To make the Cobrat, I know what I need to do, but I don't know how to do it.

1) Take the Snifit and make him 16x32 instead of 16x16. This will require writing an extra 16x16 tile, which is where I'm stuck (the example in the tutorial is nothing like the one for Snifit).
1b) Set the animation frames for each tile on the Tilemap. This I can do.
2) Set a third animation for Cobrat opening his mouth to fire. I think I can get him to do this by copying something from Birdo's ASM code, but it won't be easy (I can already see all kinds of glitches with this).
3) Make Cobrat not pause before firing. I MIGHT know how to get this to work, but it might mess up the opening mouth animation.
4) Make the bullet shoot from the upper Cobrat tile instead of the lower one. Easy; I know what to change for this.
5) Change Cobrat's speed and bullet speed. Again, I know this one.

Probably some other steps I missed too.

I'll give this another try... It always screws up when I copy-paste from Birdo's code, so this time I'm forced to do it manually.

Sorry I'm being so high-maintenance... I promise when I get this to work, I'm releasing it in the open for everyone to use.


Edit: I got it to work! I created the Cobrat! I am the MAN!

Here's the .ASM file. You may want to change the tilemaps. Sorry I haven't put any comment tags on it for easy reference... I was kinda in a hurry. (BTW, I didn't include the .CFG file either... Just copy a Snifit config file, set the palette to C, set the clippings to the same as Birdo, any other reasonable settings you want and you should be good.)

____________________
(Layout made by Peardian, graphics from Sonic Team. Worship them.)
Next newer thread | Next older thread
Jul - General Game/ROM Hacking - SMW ASM question regarding custom sprite creation New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

27 database queries, 5 query cache hits.
Query execution time:  0.088959 seconds
Script execution time:  0.023778 seconds
Total render time:  0.112737 seconds


TidyHTML vomit below
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 119 column 11 - Warning: <form> isn't allowed in <table> elements
line 118 column 10 - Info: <table> previously mentioned
line 120 column 11 - Warning: missing <tr>
line 120 column 119 - Warning: missing </font> before </td>
line 124 column 16 - Warning: plain text isn't allowed in <tr> elements
line 120 column 11 - Info: <tr> previously mentioned
line 125 column 68 - Warning: missing </nobr> before </td>
line 141 column 68 - Warning: missing </nobr> before <tr>
line 147 column 35 - Warning: missing <tr>
line 147 column 50 - Warning: missing </font> before </td>
line 148 column 37 - Warning: unescaped & or unknown entity "&id"
line 147 column 222 - Warning: missing </font> before </table>
line 149 column 35 - Warning: missing <tr>
line 149 column 50 - Warning: missing </font> before </td>
line 149 column 91 - Warning: missing </font> before </table>
line 156 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 158 column 9 - Warning: missing <tr>
line 176 column 13 - Warning: missing <tr>
line 177 column 99 - Warning: unescaped & or unknown entity "&postid"
line 179 column 73 - Warning: <style> isn't allowed in <td> elements
line 179 column 9 - Info: <td> previously mentioned
line 179 column 672 - Warning: missing </font> before </td>
line 186 column 1655 - Warning: missing </font> before </td>
line 189 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 191 column 9 - Warning: missing <tr>
line 209 column 13 - Warning: missing <tr>
line 210 column 99 - Warning: unescaped & or unknown entity "&postid"
line 212 column 73 - Warning: missing </div>
line 219 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 221 column 9 - Warning: missing <tr>
line 239 column 13 - Warning: missing <tr>
line 240 column 99 - Warning: unescaped & or unknown entity "&postid"
line 242 column 84 - Warning: <style> isn't allowed in <td> elements
line 242 column 9 - Info: <td> previously mentioned
line 244 column 2659 - Warning: unescaped & or unknown entity "&config"
line 244 column 2849 - Warning: unescaped & or unknown entity "&pr"
line 244 column 2854 - Warning: unescaped & or unknown entity "&lv"
line 244 column 2860 - Warning: unescaped & or unknown entity "&ep"
line 244 column 2868 - Warning: unescaped & or unknown entity "&ed"
line 244 column 2877 - Warning: unescaped & or unknown entity "&ll"
line 244 column 2886 - Warning: unescaped & or unknown entity "&ex"
line 244 column 2897 - Warning: unescaped & or unknown entity "&le"
line 244 column 2908 - Warning: unescaped & or unknown entity "&eg"
line 244 column 2915 - Warning: unescaped & or unknown entity "&et"
line 247 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 249 column 9 - Warning: missing <tr>
line 267 column 13 - Warning: missing <tr>
line 268 column 99 - Warning: unescaped & or unknown entity "&postid"
line 270 column 73 - Warning: <style> isn't allowed in <td> elements
line 270 column 9 - Info: <td> previously mentioned
line 270 column 672 - Warning: missing </font> before </td>
line 277 column 1697 - Warning: missing </font> before </td>
line 280 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 282 column 9 - Warning: missing <tr>
line 300 column 13 - Warning: missing <tr>
line 301 column 99 - Warning: unescaped & or unknown entity "&postid"
line 303 column 73 - Warning: missing </div>
line 312 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 314 column 9 - Warning: missing <tr>
line 332 column 13 - Warning: missing <tr>
line 333 column 99 - Warning: unescaped & or unknown entity "&postid"
line 335 column 73 - Warning: <style> isn't allowed in <td> elements
line 335 column 9 - Info: <td> previously mentioned
line 335 column 672 - Warning: missing </font> before </td>
line 340 column 1565 - Warning: missing </font> before </td>
line 343 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 345 column 9 - Warning: missing <tr>
line 363 column 13 - Warning: missing <tr>
line 364 column 99 - Warning: unescaped & or unknown entity "&postid"
line 366 column 73 - Warning: missing </div>
line 373 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 375 column 9 - Warning: missing <tr>
line 393 column 13 - Warning: missing <tr>
line 394 column 99 - Warning: unescaped & or unknown entity "&postid"
line 396 column 73 - Warning: <style> isn't allowed in <td> elements
line 396 column 9 - Info: <td> previously mentioned
line 396 column 672 - Warning: missing </font> before </td>
line 416 column 2732 - Warning: missing </font> before </td>
line 419 column 17 - Warning: missing <tr>
line 419 column 17 - Warning: discarding unexpected <table>
line 422 column 35 - Warning: missing <tr>
line 422 column 50 - Warning: missing </font> before </td>
line 422 column 91 - Warning: missing </font> before </table>
line 424 column 35 - Warning: missing <tr>
line 424 column 50 - Warning: missing </font> before </td>
line 425 column 37 - Warning: unescaped & or unknown entity "&id"
line 424 column 222 - Warning: missing </font> before </table>
line 426 column 17 - Warning: discarding unexpected </textarea>
line 426 column 28 - Warning: discarding unexpected </form>
line 426 column 35 - Warning: discarding unexpected </embed>
line 426 column 43 - Warning: discarding unexpected </noembed>
line 426 column 53 - Warning: discarding unexpected </noscript>
line 426 column 64 - Warning: discarding unexpected </noembed>
line 426 column 74 - Warning: discarding unexpected </embed>
line 426 column 82 - Warning: discarding unexpected </table>
line 426 column 90 - Warning: discarding unexpected </table>
line 428 column 9 - Warning: missing </font> before <table>
line 440 column 25 - Warning: discarding unexpected </font>
line 449 column 57 - Warning: discarding unexpected </font>
line 427 column 1 - Warning: missing </center>
line 120 column 63 - Warning: <img> lacks "alt" attribute
line 125 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 125 column 93 - Warning: <img> lacks "alt" attribute
line 141 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 141 column 98 - Warning: <img> lacks "alt" attribute
line 148 column 44 - Warning: <img> proprietary attribute value "absmiddle"
line 148 column 142 - Warning: <img> proprietary attribute value "absmiddle"
line 148 column 245 - Warning: <img> proprietary attribute value "absmiddle"
line 161 column 22 - Warning: <img> lacks "alt" attribute
line 161 column 63 - Warning: <img> lacks "alt" attribute
line 161 column 112 - Warning: <img> lacks "alt" attribute
line 161 column 162 - Warning: <img> lacks "alt" attribute
line 162 column 11 - Warning: <img> lacks "alt" attribute
line 172 column 15 - Warning: <img> lacks "alt" attribute
line 184 column 1378 - Warning: <img> proprietary attribute value "absmiddle"
line 184 column 1378 - Warning: <img> lacks "alt" attribute
line 193 column 11 - Warning: <img> lacks "alt" attribute
line 194 column 23 - Warning: <img> lacks "alt" attribute
line 194 column 64 - Warning: <img> lacks "alt" attribute
line 194 column 113 - Warning: <img> lacks "alt" attribute
line 194 column 163 - Warning: <img> lacks "alt" attribute
line 205 column 15 - Warning: <img> lacks "alt" attribute
line 212 column 369 - Warning: <tr> attribute "height" has invalid value "20px"
line 212 column 436 - Warning: <img> lacks "alt" attribute
line 212 column 641 - Warning: <tr> attribute "height" has invalid value "*"
line 216 column 1581 - Warning: <img> proprietary attribute value "absmiddle"
line 216 column 1581 - Warning: <img> lacks "alt" attribute
line 216 column 1890 - Warning: <img> lacks "alt" attribute
line 216 column 2001 - Warning: <img> lacks "alt" attribute
line 224 column 23 - Warning: <img> lacks "alt" attribute
line 224 column 64 - Warning: <img> lacks "alt" attribute
line 224 column 113 - Warning: <img> lacks "alt" attribute
line 224 column 163 - Warning: <img> lacks "alt" attribute
line 235 column 15 - Warning: <img> lacks "alt" attribute
line 244 column 2436 - Warning: <img> proprietary attribute value "absmiddle"
line 244 column 2436 - Warning: <img> lacks "alt" attribute
line 244 column 2670 - Warning: <img> lacks "alt" attribute
line 244 column 2792 - Warning: <img> lacks "alt" attribute
line 252 column 22 - Warning: <img> lacks "alt" attribute
line 252 column 63 - Warning: <img> lacks "alt" attribute
line 252 column 112 - Warning: <img> lacks "alt" attribute
line 252 column 162 - Warning: <img> lacks "alt" attribute
line 253 column 11 - Warning: <img> lacks "alt" attribute
line 263 column 15 - Warning: <img> lacks "alt" attribute
line 277 column 1465 - Warning: <img> proprietary attribute value "absmiddle"
line 277 column 1465 - Warning: <img> lacks "alt" attribute
line 284 column 11 - Warning: <img> lacks "alt" attribute
line 285 column 23 - Warning: <img> lacks "alt" attribute
line 285 column 64 - Warning: <img> lacks "alt" attribute
line 285 column 113 - Warning: <img> lacks "alt" attribute
line 285 column 163 - Warning: <img> lacks "alt" attribute
line 296 column 15 - Warning: <img> lacks "alt" attribute
line 303 column 369 - Warning: <tr> attribute "height" has invalid value "20px"
line 303 column 436 - Warning: <img> lacks "alt" attribute
line 303 column 641 - Warning: <tr> attribute "height" has invalid value "*"
line 309 column 2116 - Warning: <img> lacks "alt" attribute
line 309 column 2227 - Warning: <img> lacks "alt" attribute
line 317 column 22 - Warning: <img> lacks "alt" attribute
line 317 column 63 - Warning: <img> lacks "alt" attribute
line 317 column 112 - Warning: <img> lacks "alt" attribute
line 317 column 162 - Warning: <img> lacks "alt" attribute
line 318 column 11 - Warning: <img> lacks "alt" attribute
line 328 column 15 - Warning: <img> lacks "alt" attribute
line 338 column 1223 - Warning: <img> proprietary attribute value "absmiddle"
line 338 column 1223 - Warning: <img> lacks "alt" attribute
line 347 column 11 - Warning: <img> lacks "alt" attribute
line 348 column 23 - Warning: <img> lacks "alt" attribute
line 348 column 64 - Warning: <img> lacks "alt" attribute
line 348 column 113 - Warning: <img> lacks "alt" attribute
line 348 column 163 - Warning: <img> lacks "alt" attribute
line 359 column 15 - Warning: <img> lacks "alt" attribute
line 366 column 369 - Warning: <tr> attribute "height" has invalid value "20px"
line 366 column 436 - Warning: <img> lacks "alt" attribute
line 366 column 641 - Warning: <tr> attribute "height" has invalid value "*"
line 370 column 2051 - Warning: <img> lacks "alt" attribute
line 370 column 2162 - Warning: <img> lacks "alt" attribute
line 378 column 22 - Warning: <img> lacks "alt" attribute
line 378 column 63 - Warning: <img> lacks "alt" attribute
line 378 column 112 - Warning: <img> lacks "alt" attribute
line 378 column 162 - Warning: <img> lacks "alt" attribute
line 379 column 11 - Warning: <img> lacks "alt" attribute
line 389 column 15 - Warning: <img> lacks "alt" attribute
line 425 column 44 - Warning: <img> proprietary attribute value "absmiddle"
line 425 column 142 - Warning: <img> proprietary attribute value "absmiddle"
line 425 column 245 - Warning: <img> proprietary attribute value "absmiddle"
line 434 column 25 - Warning: <img> lacks "alt" attribute
line 439 column 267 - Warning: <img> lacks "alt" attribute
line 149 column 50 - Warning: trimming empty <font>
line 419 column 17 - Warning: trimming empty <tr>
line 422 column 50 - Warning: trimming empty <font>
line 125 column 68 - Warning: <nobr> is not approved by W3C
line 141 column 68 - Warning: <nobr> is not approved by W3C
line 177 column 27 - Warning: <nobr> is not approved by W3C
line 186 column 1523 - Warning: <td> proprietary attribute "background"
line 210 column 27 - Warning: <nobr> is not approved by W3C
line 212 column 224 - Warning: <table> proprietary attribute "height"
line 212 column 369 - Warning: <tr> proprietary attribute "height"
line 212 column 387 - Warning: <td> proprietary attribute "background"
line 212 column 641 - Warning: <tr> proprietary attribute "height"
line 216 column 1842 - Warning: <tr> proprietary attribute "height"
line 240 column 27 - Warning: <nobr> is not approved by W3C
line 268 column 27 - Warning: <nobr> is not approved by W3C
line 277 column 1565 - Warning: <td> proprietary attribute "background"
line 301 column 27 - Warning: <nobr> is not approved by W3C
line 303 column 224 - Warning: <table> proprietary attribute "height"
line 303 column 369 - Warning: <tr> proprietary attribute "height"
line 303 column 387 - Warning: <td> proprietary attribute "background"
line 303 column 641 - Warning: <tr> proprietary attribute "height"
line 309 column 2068 - Warning: <tr> proprietary attribute "height"
line 333 column 27 - Warning: <nobr> is not approved by W3C
line 340 column 1433 - Warning: <td> proprietary attribute "background"
line 364 column 27 - Warning: <nobr> is not approved by W3C
line 366 column 224 - Warning: <table> proprietary attribute "height"
line 366 column 369 - Warning: <tr> proprietary attribute "height"
line 366 column 387 - Warning: <td> proprietary attribute "background"
line 366 column 641 - Warning: <tr> proprietary attribute "height"
line 370 column 2003 - Warning: <tr> proprietary attribute "height"
line 394 column 27 - Warning: <nobr> is not approved by W3C
line 416 column 2600 - Warning: <td> proprietary attribute "background"
Info: Document content looks like HTML5
Info: No system identifier in emitted doctype
Tidy found 213 warnings and 0 errors!


The alt attribute should be used to give a short description
of an image; longer descriptions should be given with the
longdesc attribute which takes a URL linked to the description.
These measures are needed for people using non-graphical browsers.

For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
You are recommended to use CSS to specify the font and
properties such as its size and color. This will reduce
the size of HTML files and make them easier to maintain
compared with using <FONT> elements.

You are recommended to use CSS to control line wrapping.
Use "white-space: nowrap" to inhibit wrapping in place
of inserting <NOBR>...</NOBR> into the markup.

About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
Validate your HTML documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium

Do you speak a language other than English, or a different variant of
English? Consider helping us to localize HTML Tidy. For details please see
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md