Language…
15 users online: anonimzwx, Darolac, DasFueller, Dennsen86, Doopu, Gamet2004, Green, LightAligns, Mike777, MorrieTheMagpie, RicardoDeMelo, romw314, sinseiga, Sokobansolver, twicepipes - Guests: 272 - Bots: 240
Users: 64,795 (2,375 active)
Latest user: mathew

🐇 DSS NOW AVAILABLE (sort of) - lx5's attempt to cover his laziness of building spritesets and other stuff 🐇

ToolPatchSpriteSuper Mario WorldResource Release

  • Pages:
  • 1
  • 2
Hi there traveller! I'm coming this C3 to show stuff I've done.



Dynamic Spriteset System
GitHub repo
DETAILS HERE

As the title I want to evade the thought behind building spritesets for levels in SMW, that's why I've created a system that completely builds them during mid level, that's right, once the sprite is loaded into memory it's graphics will be uploaded to VRAM in small chunks.

This will be uploaded to GitHub in the future alongside with some documentation about how to convert sprites (spoiler: requires asm knowledge!) and some "limitations" this has.

I'd explain in detail the inner workings, but i'm kinda burned atm, I'll cover that in a future post :P

BUT I prepared a small video showcasing this system and you can watch it right here:



small edit: Also I'm aware Yoshifanatic, anonimzwx and katrina have made very similar things to this, so I'm not the first one on doing this :)



Modernized Romi's VWF Cutscene tool
GitHub repo

I decided to fix this tool some months ago, I also made a post about it before but I want to include it here regardless of that :P

You can read a detailed readme, changes, etc. in this other thread







Asar Syntax Highlighter for Visual Studio Code
GitHub repo

I finally made the switch to another text processor that wasn't the old and reliable Windows Notepad, but I also wanted to take advantage of VSCode's syntax highlighter so everything isn't painted blue. I decided to build a syntax highlighter and this was the result (you can open the image in another tab for the actual size):




That's all I can show for now. See ya later!



Man this looks so good, having a dynamic graphic system in place to allow use of any vanilla sprite (assuming you can) is amazing. Even if this system doesn't extend to custom sprites if you can say use 2 of the 4 files for the dynamic system and 2 for non-dynamic stuff that opens so many possibilities for sprite combos.
Wow this is very impressive #wario{O_O}
All of these are very neat, but that dynamic spriteset in particular is wild! #smrpg{gasp} I'd be really cool to see it used in something like BLDC.
Really glad to see the Romi's VWF Cutscene tool being modernized. It's a great tool to use for storytelling. I look forward to using it for my hack.

Wow the dynamic spriteset thing looks crazy useful. Very interested to see the full details on that.
The dynamic sprites are out of this damned world. Extremely impressive work on that front! It's not every day that we take one more step in making Mario World look like someone cobbled together a bunch of sprites in MS paint, lmao

The work towards the VWF cutscene tool is also holy work. Bless you for making these possible!


Other Submissions of mine!
The dynamic spriteset is certainly my favourite here. I'm really curious to know more about how it works and how easy/hard it is to convert sprites. Certainly seems worth it though!

The VWF cutscene tool looks great too. I can see a lot of awesome stuff being done with that.
What can the Dynamic Spriteset System do? Am I understanding it correctly that it can change the SP1-4 dynamically?
Hello world!
wow, insanely awesome!
good job nejo <3
C3 winner, right here..!
Wow!!!
This is absolutely stunning!

I did not quite understand the dynamic sprite things but it seems to enhance the sprite sheets in a level and allow the use of more than SP1, SP2, SP3 and SP4 am I right? That was impressive seeing so many different enemies in the same level.

My favourite piece surely is the Cutscene Tool and the fact it use python. I expect the syntax of the message writing to be easier, but I'll find out in the github repo :D

As for the syntax highlighter in VS Code I am sure it will assist a lot of ASMers here, so it is wonderful. I wanted to go and make my own Notepad++ syntax highlighter for addmusick/mml but Notepad++ is limited when it comes to such markup languages as mml. If it isn't too hard I may try to do one for VSCode maybe? I'm completely unfamiliar with the task though.

Thanks you for those huge contributions!
I really like the Modernized Romi's VWF Cutscene tool. Can you load custom sprites in it instead of just vanilla sprites?

Also how do you trigger these cut scenes. Is it after you beat a particular level?

This is an excellent way to tell an actual story and such. It would be great if there was a way to make sprites and such act out stuff like in FF3 or Chrono Trigger.

Can you talk to an NPC in a level and also trigger this dialogue?
Heh, I might try out the modernized VWF cutscene tool right now if I could start making a ROM hack!

lx5, you're a REAL winner now.
The Hacking of PuyoPuyo. Come join the fun, friends. 『いけいけ団長、頑張れ頑張れ団長!』
Help us raise funds for the Armed Forces of Ukraine. #ДопомагаємоРазом / #HelpTogether
“Even if you personally are so dissatisfied with life that you want the world to end, surely the cruel reality is that it will continue on, unchanging. All the better for someone perfectly content, like me.”
Aya Shameimaru, Touhou Suzunaan ~ Forbidden Scrollery
The dynamic sprite system is amazing but everyone already said it, so I'm gonna repeat myself, as for the VWF tool, I can't say I'm surprised because I helped you revamp it quite a bit, sooooo I'm gonna comment on the last thing, the syntax highlighter is amazing, I've been using it since you made it and honestly it improved my asm experience by a lot, it's so nice being able to distinguish things by color and not have to look at a wall of black and white text.
Here's to more projects!
I know I asked before, but have you tested the spriteset system both with and without SA-1? Is there an option for the latter, at least, to have the graphics uncompressed to save processing time?

Also, is there a version of the syntax highlighter that works with Notepad++ as well?

----------------

I'm working on a hack! Check it out here. Progress: 64/95 levels.
Pretty great seeing another syntax highlighter for Asar. Admittedly, some things are highlighted in a way that seems a bit weird to me, but I'm guessing it was probably easier to do that way, and in any case, having different highlighting options is always good.

Originally posted by imamelia
Also, is there a version of the syntax highlighter that works with Notepad++ as well?


Yes, it should even be included with the Asar download hosted here on SMWC (unless whoever submitted the last update forgot to include it in the ZIP, but I wouldn't know why since we use a script to create that).
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Thanks everyone for the nice reception!

Long post incoming!!



Dynamic Spriteset System details

The Dynamic Spriteset System (DSS) is a compilation of several ASM hacks and edits to existing sprites to allow dynamically filling the VRAM at SP3/SP4 regions via requests of sprites loaded in memory. This means that any non visible sprite on the screen will not have their graphics on SP3/SP4 and you won't have to waste time messing with disassemblies, hex edits or small patches to manage your spriteset for each level you want to make.

The system is separated in three different and smaller systems: the request/queue GFX routine, the VRAM queue system, the new sprite detector and the garbage collector. This system relies on ExGFX files which are inserted via Lunar Magic.

Request/Queue GFX routine
This routine has two primary functions which depends on wheter the sprite has been its needed graphics on VRAM and accesible at the current frame (more on this later).

The first function is the one that puts the necessary tiles which are not present nor accessible in a queue to upload them to VRAM at the start of the next frame/NMI interrupt. This function also covers other aspects of the whole system:
  • Decompress ExGFX file (which can be up to 3KiB)
  • Mark tiles in SP3/SP4 as used so any other sprite which requests their graphics to be uploaded to VRAM don't overwrite these used slots
  • Save the tiles used to two buffers: a temporal one which will be overwritten the next time the routine is called and a persistent one that holds the same data as the temporal one as long the sprite remains in memory/in screen and can be requested at any time. The persistent buffer is actually a big buffer that holds the information for up to 32 different ExGFX's tile number data, basically an array of arrays.

The second function is far less complex but still very important, it requests the tile data from the persistent buffer which is copied into the temporal buffer for easy access in the sprite code. The routine won't provide any data if the tiles haven't been uploaded to VRAM.

There are moments in the video where you can see a lot of duplicated graphics which ends up looking really bad. This was due to them being marked as "not accessible" or "unused" since no sprite or any other code tried to use these graphics in the previous frames, thus making necessary to put the tiles into the VRAM queue again.
The graphics will be marked as "unused" once a certain amount of frames have passed since the last time their tile data was requested. The default duration is 16 frames, I'm still experimenting with this so it may change later (presumably to a little higher value).

VRAM queue system
A queue system to upload graphics to VRAM was pretty much needed to upload the needed graphics in small chunks every frame to avoid any kind of flickering/overflow.

I designed the system to be a ring/circular buffer with 64 possible entries while each entry holds 4 bytes worth of data. The data stored is a VRAM destination (2 bytes) and the RAM buffer location (2 bytes, bank byte hardcoded to $41). It being a ring buffer helps to avoid making complex calculations when it comes to update the index used in the routine.

Every frame it will try to upload a fixed amount of 16x16 tiles (7 at this moment) in the quickest way I could come up with. I haven't measured the routine in regards of its cycle usage yet, so the amount of tiles uploaded each frame may be reduced depending on how demanding this is.

The system may be used to upload different things to other VRAM regions, but I haven't done anything with that :P

New sprite detector
Kinda misleading title, but it isn't a new version of some sprite detector, it detects sprites which where spawned in the current frame.
It sounds like a kinda unnecessary thing, but it was needed to avoid an extra frame of delay for sprie graphics to appear in some cases where sprites were spawned in the same frame and their slot wasn't executed, thus not putting their graphics into the VRAM queue (if needed). It also helps to upload graphics for extended and cluster sprites. And finally, it helps to avoid hijacking every single spawn routine in the whole game.

This routine it's just a bunch of loops and it's quite slow... but if it helps me to not hijack a lot of places (more than I actually have lol), then it's a good trade.

Garbage collector
The garbage collector is the routine in charge of marking tiles as unused every frame. It doesn't do much, but it's still quite important part of the whole system.

It was already explained, but again with a little extra details: to get sprite graphics to be marked as unused, the ExGFX file should not be called for a fixed amount of frames. Once a sprite GFX is marked as unused, everything about them will be marked as unused, this includes their data in the persistent buffer, making the tiles in VRAM not accesible, even if they're present.

You can simply avoid getting graphics marked as unused if you request their data from the persistent buffer using the included routine (or just reset their timer), this isn't limited to sprites, you can also do this via UberASM or custom blocks!

Random bits
  • I decided to use Lunar Magic's ExGFX system since it was quite manageable to decompress graphics via SA-1
  • It took me about a third of a year to design the whole thing, I have a hard time coming up with ideas
  • I did make something similar and showcased it some time ago, the main diference is that the spriteset was built at level load and NOT during actual gameplay, which didn't allow for a varied cast of enemies in a level
  • The current system doesn't play very well with reskins of sprites, I haven't come up with a good method to allow them
  • Adding more ExGFX files is actually quite tedious, as you have to edit at least 2 different files: you need make a define which points to the ExGFX and you have to edit a table with the amount of 16x16 tiles your ExGFX has.
  • It will require a fair amount of ASM knowledge to get this to work with custom resources. The system is fairly simple to use, but you have to know which parts of the GFX routine you have to edit and I'm sure I can't assist everyone to examine every single one of their sprites.
  • Every single original sprite will be modified to use this system, it's a long and tedious work, but it will be worth.
  • I will try including .ssc, .s16, .mwt files to fix the look of sprites and have them show fine in Lunar Magic regardless of the loaded graphics in the level.



Originally posted by Ninja Boy
Even if this system doesn't extend to custom sprites if you can say use 2 of the 4 files for the dynamic system and 2 for non-dynamic stuff that opens so many possibilities for sprite combos.

This is quite possible! You can limit how many sprite tiles will be used for the dynamic spriteset system via uberasm, as there is a RAM address that controls exactly that. It will be removing the posibility to use sprites from the bottom of SP4 to the top of SP3. This is particularly useful for dynamic sprites made for DSX.

Originally posted by TheLegendaryOrb
What can the Dynamic Spriteset System do? Am I understanding it correctly that it can change the SP1-4 dynamically?

Just SP3 and SP4; SP1 and SP2 will remain the same, SP2 will now have a lot of blank areas due to every enemy from there is now part of the dynamic spriteset system.

Originally posted by qantuum
I expect the syntax of the message writing to be easier, but I'll find out in the github repo :D

It's pretty much the same as the original version, it just doesn't require ActivePerl :P
The main feature of my update is that it now includes a ton of new commands to play with.

Originally posted by Final Theory
I really like the Modernized Romi's VWF Cutscene tool. Can you load custom sprites in it instead of just vanilla sprites?

The VWF cutscene system (both old and modern) allow for any sprite graphic in SP1, SP2, SP3 and SP4 to be displayed in screen at any position. You can load any ExGFX in these slots via Lunar Magic and you can use them just fine! In fact, that's how SMWCP1 did their fancy cutscenes

Originally posted by Final Theory
Also how do you trigger these cut scenes. Is it after you beat a particular level?

You place vwf.json and vwf_data.json (this name may vary) in the level and a cutscene will play.

Originally posted by Final Theory
This is an excellent way to tell an actual story and such. It would be great if there was a way to make sprites and such act out stuff like in FF3 or Chrono Trigger.

It may be possible, but it will certainly require ASM knowledge! (You can hijack your own ASM into the cutscenes).

Originally posted by Final Theory
Can you talk to an NPC in a level and also trigger this dialogue?

If you teleport to another level, yes.

Originally posted by imamelia
I know I asked before, but have you tested the spriteset system both with and without SA-1? Is there an option for the latter, at least, to have the graphics uncompressed to save processing time??

I really don't have plans to make a non SA-1 version as I want to stick with the ExGFX approach I have. However, as I've mentioned in discord, this function it's pretty much isolated and you can modify it to use pointers to ROM instead of ExGFX files; the easiest way would copying the GFX data to a RAM buffer so you don't have to modify the inner workings of the VRAM queue system, very similar to how DSX works.
That said, the code already includes the necessary stuff to make a non SA-1 version, I'm way too used to append |!dp and |!addr to anything I program.

Originally posted by Atari2.0
as for the VWF tool, I can't say I'm surprised because I helped you revamp it quite a bit, sooooo I'm gonna comment on the last thing, the syntax highlighter is amazing, I've been using it since you made it and honestly it improved my asm experience by a lot, it's so nice being able to distinguish things by color and not have to look at a wall of black and white text.
Here's to more projects!

You were VERY helpful in the VWF tool modernizations! I'm glad you wanted to revamp the code without me asking lmao.
I'm super glad people have found my highlighter useful! It was a good excuse to learn regex haha.

Originally posted by RPG Hacker
Pretty great seeing another syntax highlighter for Asar. Admittedly, some things are highlighted in a way that seems a bit weird to me, but I'm guessing it was probably easier to do that way, and in any case, having different highlighting options is always good.

I have weird color preferences haha. Everything is super customizable though. Almost every part has its own scope which can be colored or stylized in a different way.
There was an exising highlighter in the Extensions Marketplace, but it was quite bad and didn't support asar's functions which annoyed me a bit. Basically:

are you actually doing this as a thing you're releasing that people can use? that's amazing and i love it, lots of respect for that

i'm 50/50 on whether this will be a big level-up for the community or no one will use it, hopefully the former lol

allow shy guy emojis in post footers you cowards!
  • Pages:
  • 1
  • 2

ToolPatchSpriteSuper Mario WorldResource Release