From what I understand, sprites and bg tiles are now all just sprites. All background functions are now handled by screen functions (prefixed with the letter “T” I.e “TOFS” instead of “BGOFS”) although I’m not entirely sure how these functions work at the moment. Also, I haven’t found any complete map editor and there does not seem to be a built in one, so there is no easy way to make maps right now.
[SB4] Howwwwwwwwwwww do I make a background
Root / Programming Questions / [.]
trickyCreated:
... so there is no easy way to make maps right now.I haven't played around with many of the text functions yet, but I think the assumption was that because BG tiles are now text, you can basically use the text editor to create maps. If you need to grab a character, you can do CLIPBOARD CHR$(Character code) That was what I gleaned when overviewing the new layout, and I could be wrong.
Ah, interesting. I’ll have to look into that when I can.... so there is no easy way to make maps right now.I haven't played around with many of the text functions yet, but I think the assumption was that because BG tiles are now text, you can basically use the text editor to create maps. If you need to grab a character, you can do CLIPBOARD CHR$(Character code) That was what I gleaned when overviewing the new layout, and I could be wrong.
From what I understand, sprites and bg tiles are now all just sprites.Nah, BG tiles aren't sprites, they're text. The change from SB3 to SB4 was like this:
- SB3 sprites + SB3 graphics screen = SB4 sprites (sprite 4095/#GSPRITE is now the "graphics screen")
- SB3 backgrounds + SB3 text console = SB4 text screens (text screen 4/#TCONSOLE is now the "console")
This is good to know. I just recently got SB4 and I’ll be sure to use this knowledge in my own programs. Thanks!From what I understand, sprites and bg tiles are now all just sprites.Nah, BG tiles aren't sprites, they're text. The change from SB3 to SB4 was like this:
- SB3 sprites + SB3 graphics screen = SB4 sprites (sprite 4095/#GSPRITE is now the "graphics screen")
- SB3 backgrounds + SB3 text console = SB4 text screens (text screen 4/#TCONSOLE is now the "console")
I love how they merged text into BG, because pretty much every BG function has a T duplicate. Literally everything I had to do to make BGs work in SB4 from an SB3 program was just converting things like BGSCREEN and BGOFS to TSCREEN and TOFS. The hardest one to figure out was BGGET to CHKCHR because that doesn't start with a T lol
After that I just had to put my BG tiles onto the sprite sheet where the custom characters go, which was only hard because I was getting used to the new graphics editor. Now I have successfully made the BG screen appear, and it only took some time and a little bit of thinking. The rest of it was literally changing BG to T.
One slight problem does exist, though, because I use BGLOAD/TLOAD to load my BG. Rotating individual tiles doesn't really work with TLOAD, so at first I made a ton of duplicate tiles to rotate specific tiles. But I realized that I can make a custom TLOAD function that takes text data, which includes rotation data. Then I can use ATTR to rotate it, and all will be well (hopefully; I don't know how fast this will be, but so far I'm in love with the optimization SB4 has.) Heck, I might even make a BG library if I feel like I need to.
In other words, they did a great job merging BG with text, even if they forgot rotation (maybe they remembered and I just can't find it?) I am in love with SB4 already, even though I haven't started making any projects from scratch yet. I can't wait to see how that goes!
One slight problem does exist, though, because I use BGLOAD/TLOAD to load my BG. Rotating individual tiles doesn't really work with TLOADIt does.
Int type 2D array representing the contents of the target screen ・The array size is [ScreenHeight,ScreenWidthx2]. ・One character is represented by two elements. The first element contains the display attribute in the upper 16 bits, the character code in the lower 16 bits, and the display color in the second element.In other words, if you have a character like this, and you want to rotate it 90 degrees:
T[0,0]=&HE810 T[0,1]=#C_WHITEit instead needs to be like this:
T[0,0]=&HE810 OR #A_ROT90<<16 T[0,1]=#C_WHITE