? SmileBASIC 4 Discussion「プチコン4」 (Page 14) ● 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
  • #261 ✎ 191 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
    What happened to maps in SB4?
    All that's gone is that there isn't a built-in map editor for SB4 (at least not yet, who knows if one'll be added). Map files themselves aren't anything special, they're just integer arrays saved to DAT files using SAVEV "DAT:NAME",ARRAY. The main thing is just loading the data and getting it into a format that TLOAD can use, because this has changed since BGLOAD in SB3. TLOAD expects an integer array that looks like this:
    1. The array is three-dimensional, with the size [height, width, 2]. (2D or 1D arrays are fine too, as long as the data's in the right order.)
    2. Each tile is represented with a pair of values, so for the tile at coordinates (x, y), ARRAY[y, x, 0] gets the first value, and ARRAY[y, x, 1] gets the second value.
    3. The first value holds the display attributes in the upper 16 bits, and the character code in the lower 16 bits.
    4. The second value holds the color of the tile, which is the color you set with COLOR, TCOLOR, etc. Usually, this is white.
    Now, keep in mind that this is just the format that TLOAD expects. If you make a map editor, there's probably more information you'd store in that file, like what the width and height actually are, or maybe storing multiple BG layers into a single file. It really doesn't matter what format you use, as long as you're able to load it one way or another.
    Posted
  • #262 ✎ 191 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 Also, while messing around with that, found an undocumented attribute for tiles: Bit 7 (i.e. 128) is reverse video. It forces the tile color to black (respecting alpha), and uses the color set for that tile as the background color. ATTR won't allow you to set it (it gives an Out of range error), but you can set it with TLOAD, TARRAY, and probably other commands. EDIT: "Forces to black" isn't quite right. It only looks like that in front of a black background. Basically, wherever the font is opaque, it makes the tile transparent there, and vice versa. See below for screenshots that make it much clearer what's going on. Posted Edited by niconii
  • #263 ✎ 1038 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
    Also, while messing around with that, found an undocumented attribute for tiles: Bit 7 (i.e. 128) is reverse video. It forces the tile color to black (respecting alpha), and uses the color set for that tile as the background color. ATTR won't allow you to set it (it gives an Out of range error), but you can set it with TLOAD, TARRAY, and probably other commands.
    Could you send some example images? This seems really interesting.
    Posted
  • #264 ✎ 191 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
    Also, while messing around with that, found an undocumented attribute for tiles: Bit 7 (i.e. 128) is reverse video. It forces the tile color to black (respecting alpha), and uses the color set for that tile as the background color. ATTR won't allow you to set it (it gives an Out of range error), but you can set it with TLOAD, TARRAY, and probably other commands.
    Could you send some example images? This seems really interesting.
    I don't have images on hand, but basically just imagine you could set the background color of text, but the foreground color had to be #C_CLEAR. That's pretty much all it is. EDIT: Okay, here they are. While taking these, I found something even more bizarre about this feature: It only works on text screen 4. Considering it's not documented, stuff like ATTR forbids using it, and it's specific to text screen 4, this really feels like some left-over feature they didn't think to remove.
    Posted Edited by niconii
  • #265 ✎ 1038 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 Hmm, so it's like the trick in SB3 where you set the text foreground to transparent and the text background to black. The text screen is basically stenciled by the text characters. IIRC this was faster to make custom text coloring than GPUTCHR was. Posted
  • #266 ✎ 1038 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 The inverse bit seems to be illegal for sprite attributes (Out of range.) If there is one for sprites I can't find it. It is illegal to use the text inverse bit on ATTR TPUT TFILL so the only legitimate way to use it is with TLOAD or a TARRAY/TUPDATE. This seems like a useful feature even if it is weird and smileboom should try to make it more accessible. Posted
  • #267 ✎ 1801 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself So does it invert all the channels? or something more complex? Posted
  • #268 ✎ 191 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
    So does it invert all the channels? or something more complex?
    (with colors normalized from 0.0 to 1.0) (font ARGB = actual pixel colors in GRP) (tile ARGB = color set with COLOR, etc.) (ARGB = color displayed on screen) Normal: A = font A * tile A R = font R * tile R G = font G * tile G B = font B * tile B Reverse: A = (1.0 - font A) * tile A R = tile R G = tile G B = tile B
    Posted
  • #269 ✎ 1801 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Are you sure it's not R = (1-font R) * Tile R etc.? Posted
  • #270 ✎ 191 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
    Are you sure it's not R = (1-font R) * Tile R etc.?
    Yes, I'm sure. The color of the font is completely ignored other than alpha. (I've done more tests than the screenshots I showed earlier.) The equation might be a little more complicated than just A = (1.0 - font A) * tile A, though. I am sure that the font's RGB channels are ignored, however.
    Posted Edited by niconii
  • #271 ✎ 341 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 do all of the function keys do? Posted
  • #272 ✎ 191 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
    What do all of the function keys do?
    There's a list of the default keyboard bindings in the reference.
    Posted
  • #273 ✎ 322 Minxrod Third Year My account is over 3 years old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Video Games I like to play video games! Hobbies
    What do all of the function keys do?
    There's a list of the default keyboard bindings in the reference.
    Some useful ones to know: F1 is help F5 is run F12 is TOP MENU F9-F11 are the smile tools F7 opens the code editor to Slot 0 and F8 is DIRECT MODE
    Posted
  • #274 ✎ 1038 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
    What do all of the function keys do?
    There's a list of the default keyboard bindings in the reference.
    Some useful ones to know: F1 is help F5 is run F12 is TOP MENU F9-F11 are the smile tools F7 opens the code editor to Slot 0 and F8 is DIRECT MODE
    Ctrl+0 is direct and Ctrl+1-4 is edit slots 0-3. IIRC X on the controller switches between edit and direct.
    Posted
  • #275 ✎ 193 Nathaniel OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! OSP Contest 2 Contest Participant I participated in the second SmileBASIC Source OSP Contest! OSP Contest 3 Contest Participant I participated in the third SmileBASIC Source OSP Contest! Is there an easy way to load GRP's from SB3 to SB4? I transferred the file over but I can't just use GLOAD. Posted
  • #276 ✎ 191 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 LOADG "DAT:SB3GRP",0 SAVEG "GRP:SB4GRP",0 Keep in mind this is LOADG/SAVEG, not GLOAD/GSAVE. Posted Edited by niconii
  • #277 ✎ 1038 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 Does anyone have a USB mouse that actually works with SB4? Can you read the wheel and tell me what the output looks like? Posted
  • #278 ✎ 193 Nathaniel OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! OSP Contest 2 Contest Participant I participated in the second SmileBASIC Source OSP Contest! OSP Contest 3 Contest Participant I participated in the third SmileBASIC Source OSP Contest! Mine outputted a number that increased and decreased as I scrolled the mouse wheel up and down. It only seemed to output multiples of 120. Posted
  • #279 ✎ 205 CyberYoshi64 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Damn, too bad I'll never get a Switch until Nintendo eventually discontinues it or so... Posted
  • #280 ✎ 44 PetitProfessor Has anyone messed around with the IRsensor shooting mode? I’m trying to set something up like the Wii controller where a sprite moves across the screen depending on where you’re pointing a controller. Should I be looking more into the gyroscope or do you think the IRsensor is the right way to pull it off? Posted
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16