? How do Graphic, Map, and Fade layers stack? (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password
💀

How do Graphic, Map, and Fade layers stack?

  • #1 ✎ 199 ProKuku Avatar Taboo I didn't change my avatar for 180 days Website First Year My account is over 1 year old Website Pokemon Is Awesome! I love Pokemon! Express Yourself So I’m trying to make GCIRCLEs on the screen, and there’s a map and a FADE layer. I know that the FADE layer is always on top, and I cleared the FADE before the Graphics commands, but the Map seems to block out any Graphics commands also, such as a GBOX not appearing on screen. I’m also in XSCREEN 4, so that may affect what’s going on. I then found out, by moving the map to the left, that the map wasn’t blocking the Graphics commands, they simply weren’t appearing at all. I used FADE and BACKCOLOR and they worked perfectly fine, but GCIRCLE and GBOX and etc. do nothing. Basically, I’m trying to figure out how to display those GBOX/CIRCLEs. Are maps always closer than graphics in layers? Does XSCREEN 4 mess up how graphics are produced? Posted Edited by ProKuku
  • #2 ✎ 171 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies Did you try messing around with GPRIO? Posted
  • #3 ✎ 33 Plancake Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies Reading I like to read books! Hobbies If you change the Z axis of the graphics screen to make it above the BG layer (GPRIO -256), it should show up. Posted
  • #4 ✎ 69 seggiepants I will reiterate what the others said and say that GPRIO is what you want to look into. Here is a small demo to demonstrate its use. VAR SCREEN_W = 320, SCREEN_H = 480 VAR BG_W = SCREEN_W / 16 VAR BG_H = SCREEN_H / 16 VAR I, J, B ACLS XSCREEN 4, 256, 2 BGSCREEN 0, BG_W, BG_H FOR J = 0 TO BG_H - 1 FOR I = 0 TO BG_W - 1 BGPUT 0, I, J, (I + J) MOD 2 NEXT I NEXT J GPRIO -255 REPEAT B = BUTTON() GCIRCLE RND(SCREEN_W), RND(SCREEN_H), RND(60) + 10, RGB(RND(256), RND(256), RND(256)) VSYNC UNTIL (B AND #B) != 0 If you run the program, you should see circles drawn over the background tiles. If you comment out the GPRIO line you should see the circles drawn behind the background tiles. -256 puts the drawing commands in front of everything, and 256 puts them behind everything. Posted Edited by seggiepants
  • #5 ✎ 199 ProKuku Avatar Taboo I didn't change my avatar for 180 days Website First Year My account is over 1 year old Website Pokemon Is Awesome! I love Pokemon! Express Yourself The annoying thing is that I didn’t even need to use GPRIO at all, the error was in the color code I used for the Graphics commands :/ Thanks for the responses though! Posted