? SmileBASIC 4 Discussion「プチコン4」 (Page 12) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

SmileBASIC 4 Discussion「プチコン4」

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
  • #221 ✎ 1847 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Text background color doesn't exist anymore. The best solution is probably to put a sprite behind the text and scale it up so each pixel takes up 1 character cell, and draw on that. Posted Edited by 12Me21
  • #222 ✎ 214 niconii Video Games I like to play video games! Hobbies Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Drawing I like to draw! Hobbies
    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
    Posted
  • #223 ✎ 1244 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Forum Leader Hidden Achievements
    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
    Cool
    Posted
  • #224 ✎ 456 HTV04 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Avatar Taboo I didn't change my avatar for 180 days Website Second Year My account is over 2 years old Website What are the advantages of having the graphics screen now be a sprite? Posted
  • #225 ✎ 56 kantackistan
    What are the advantages of having the graphics screen now be a sprite?
    Among other things, Sprite functions. Correct me if I'm wrong, but I suspect it'd work with SPANIM and SPCOLOR now.
    Posted
  • #226 ✎ 214 niconii Video Games I like to play video games! Hobbies Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Drawing I like to draw! Hobbies 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,4095 2. 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. Posted Edited by niconii
  • #227 ✎ 35 ChangeV Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Staff Pick "Your program is one of our favorites!" - Staff Achievements 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" Posted
  • #228 ✎ 189 seggiepants 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. Posted
  • #229 ✎ 1847 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Just make a function to fill background colors automatically. Posted
  • #230 ✎ 1244 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Forum Leader Hidden Achievements If I had a Switch, I wouldn't really care about losing text backgrounds tbh. That is because I rarely use them lol. Posted Edited by rando
  • #231 ✎ 35 ChangeV Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Staff Pick "Your program is one of our favorites!" - Staff Achievements SmileBASIC4 is updated to 4.0.2 and DEFGRP is updated too. Posted
  • #232 ✎ 456 HTV04 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Avatar Taboo I didn't change my avatar for 180 days Website Second Year My account is over 2 years old Website
    SmileBASIC4 is updated to 4.0.2 and DEFGRP is updated too.
    What’s different about it? Did anything else change in this update?
    Posted Edited by HTV04
  • #233 ✎ 1064 snail_ QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements Some tiles were missing. Posted
  • #234 ✎ 214 niconii Video Games I like to play video games! Hobbies Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Drawing I like to draw! Hobbies 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 Posted Edited by niconii
  • #235 ✎ 456 HTV04 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Avatar Taboo I didn't change my avatar for 180 days Website Second Year My account is over 2 years old Website How do I make a file copier that copies all the files from the # projects? Posted
  • #236 ✎ 1064 snail_ QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements
    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.
    Posted
  • #237 ✎ 762 ralsei Forum Leader Hidden Achievements Second Year My account is over 2 years old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Finally bought SB4. Posted
  • #238 ✎ 456 HTV04 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Avatar Taboo I didn't change my avatar for 180 days Website Second Year My account is over 2 years old Website
    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.
    Posted Edited by HTV04
  • #239 ✎ 1847 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself That won't work if the file isn't the default size though Posted
  • #240 ✎ 456 HTV04 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Avatar Taboo I didn't change my avatar for 180 days Website Second Year My account is over 2 years old Website
    That won't work if the file isn't the default size though
    It worked for me. It seemed to save everything. Maybe I’m wrong and some of the parts from the PNG files got cut off?
    Posted Edited by HTV04
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23