SmileBASIC 4 Discussion「プチコン4」
Root / General / [.]
Is there a way to set the text background color (for each character)?Nope.
My second question is about GPAGE. It appears that it is gone, is that right?The graphics screen is just a sprite now, sprite 4095 or #GSPRITE. So, you just have to change which GRP that sprite is using with SPPAGE.
'SB3 GPAGE a,b 'SB4 SPPAGE #GSPRITE,a GTARGET b
Yeah, all sprite functions work. It really is just a regular sprite now. There are only two things special about #GSPRITE: 1. How it gets initialized when you run ACLS or XSCREEN:
'SCRWxSCRH is the size of the screen SPSET #GSPRITE,0,0,SCRW,SCRH SPPAGE #GSPRITE,0 SPLAYER #GSPRITE,0 SPOFS #GSPRITE,0,0,40952. SPCLR without any arguments clears sprites 0-4094. You can still do SPCLR #GSPRITE, though. Aside from these two things, it's a completely normal sprite, and you can use it as one if you want. As for why they did this, it's because sprites could already do everything the graphics screen could in SB3, with one exception: being able to pick a GRP for each individual sprite. Now that we can do that in SB4, there's no reason to keep the graphics screen around, since it'd just be a worse sprite. There were similar reasons to merge BGs and the text screen, since the text screen was basically just a worse BG. In that case, though, we did lose background colors, but I think it's a decent trade, since it's not tough to simulate. In general, I think these changes have made the language a lot cleaner conceptually when it comes to graphics. At the same time, it may be harder to understand.
I used 3rd text layer as background color. (CLS will not clear BG layer #3. use CLS 3 to clear background color layer)
TSCREEN 8,8 'default console is #4 and front of 0-3 text layers. TSCREEN 3,8,8 'BG layer #3. used as background color of font 'layer 3 COLOR 3,#C_RED LOCATE 3,5,5 TPRINT 3,CHR$(&HE297)*3 'filled square 'console layer COLOR #C_WHITE LOCATE 5,5 PRINT "Red"
Hi, I tried out SPPAGE and GTARGET, and it works as desired. Not sure if I got any increase in frame rate or not, but I am glad for the help. It should be faster even if I hadn't noticed it in my Pythagoras Tree implementation. I am quite sad about losing the text background color. I was thinking of maybe having an extra text screen underneath with colored solid block characters, but that is a bit clunky. I do tend to like to make the Turbo Vision-esque user interfaces in text. In fact my first game for Smile Basic, "Bug Squish", had one on the top screen. I was actually stock-piling Fractals and was going to make something like the text GUIs below for the main menu in main.prg (I ported over my code for the Barnsley Fern last night). Here are some examples of Turbo Vision or text GUIs from back in the day. Things like that will be more ackward now. Probably simpler to draw it out as graphics at this point. Maybe I need to work on that button library again.
Here's the changes to DEFGRP: One of the face sprites was moved over a bit. Alpha was fixed for these sprites. Some tiles were added, and the tiles for these plants were moved over a bit. Aside from that, there were a ton of bugfixes in 4.0.2. You can see the list here: https://sup4.smilebasic.com/doku.php?id=debug
How do I make a file copier that copies all the files from the # projects?42K3E2KAE Download this one I just made and see how it works. It copies the files from all three system projects into the current working one, so you probably want to make a new folder. Any .PNG type GRP can't be copied because a bug prevents me from checking its dimensions; you'll have to copy them manually from the filemenu.
Thanks so much! I already made my own, but I forgot to update my post I know, I’m dumb How come you needed to check the dimensions? I just did LOADG "INSERT FILE WITH PATH HERE",0, then I did SAVEG "INSERT FILE WITHOUT PATH HERE",0. It copied every file without problems.How do I make a file copier that copies all the files from the # projects?42K3E2KAE Download this one I just made and see how it works. It copies the files from all three system projects into the current working one, so you probably want to make a new folder. Any .PNG type GRP can't be copied because a bug prevents me from checking its dimensions; you'll have to copy them manually from the filemenu.