tuatara21 Posted August 1, 2017 Share Posted August 1, 2017 After an extended vacation from coding, I have decided to continue work on Mermaid. I'm encountering the following issue after compiling the code with IntyBasic 1.2.8 (I think I was using 0.9 or 1.0.3 when I was compiling prior versions - not 100% certain since my laptop expired in the interim). The game executes properly, however the castle map is displaying the incorrect tiles (see "mermaid_incorrect_tiles.jpg" attached) I have included a partial sample of the code that generates the map along with the "grom_debug" code that I used to generate the test image. When the code was working properly, I was using the picture tiles with the bars and triangles to depict the rooms that you have visited within the castle. The attached screenshot confirms that the same code is executing properly with the binary that I compiled shortly after the contest ended (again, under the assumption that I was using IntyBasic 1.0.3 or similar code level in early 2016). display_castle_map: Procedure MODE SCREEN_CS,1,2,7,6 wait cls for a = 0 to 7 resetsprite(a) next spritex(2)=40+(mermaid_castleLocationX* spritey(2)=8+mermaid_castleLocationY*8 castle_map_loop: 'render the map 'first tile to be drawn at position 25, set ps to one tile before 'adding the value of A to set the appropriate tile 'and adding 10 to ps every time we have drawn ten tiles on the screen ps = 24 for a = 1 to 100 IF A = 11 or A = 21 or A = 31 or A = 41 or A = 51 or A = 61 or A = 71 or A = 81 or A = 91 THEN ps = ps + 10 IF trace=0 THEN ON castleLayout(A) GOSUB ,,,,,,,,,,,,,,,,map_nsew,map_ns,map_ew,map_ne,map_nw,map_se,map_sw,map_n,map_s,map_e,map_w,map_nse,map_nsw,map_new,map_sew ELSE 'debug purposes draw GROM tiles 0-16, 17-32, etc. GOSUB drawgrom 'while debugging, show entire castle layout ''IF castleLayout(A) > 15 THEN B = castleLayout(A) - 15 ELSE B = castleLayout(A) 'ON castleLayout(A) GOSUB ,map_nsew,map_ns,map_ew,map_ne,map_nw,map_se,map_sw,map_n,map_s,map_e,map_w,map_nse,map_nsw,map_new,map_sew ''ON b GOSUB ,map_nsew,map_ns,map_ew,map_ne,map_nw,map_se,map_sw,map_n,map_s,map_e,map_w,map_nse,map_nsw,map_new,map_sew 'PRINT AT (PS+A), A*8 END IF next wait Spriteframe=Spriteframe+1:If SpriteFrame>3 then SpriteFrame=0 'check for key press on either controller 'return to game scene based on user input 'if waitkeypress > 20 then IF cont.key = 8 THEN waitkeypress = 0 : GOTO returnToGame IF waitkeypress > 20 then Rem check both controllers for a button or disc right/left to exit map screen if Cont.right or Cont.left then gosub checkforNOKeys: waitkeypress = 0 : GOTO returnToGame END IF 'add code to display mermaid sprites in her current room location using default 8x8 size if mermaidFacing=0 then Sprite 0,spritex(2)+VISIBLE,spritey(2), SPR32+ (8*spriteframe) +#SpriteC(0) else Sprite 0,Spritex(2)+VISIBLE,Spritey(2)+FLIPX, SPR32+ (8*spriteframe) +#SpriteC(0) if mermaidFacing=0 then Sprite 1,spritex(2)+VISIBLE,spritey(2), SPR36+ (8*spriteframe) +#SpriteC(1) else Sprite 1,Spritex(2)+VISIBLE,Spritey(2)+FLIPX, SPR36+ (8*spriteframe) +#SpriteC(1) waitkeypress = waitkeypress + 1 GOTO castle_map_loop ***** drawgrom:Procedure ps = 1 for a = 0 to 212 PRINT AT (PS+A), A*8 next End map_nsew:Procedure IF trace=0 THEN PRINT AT (PS+A), 95*8 ELSE PRINT AT (PS+A), 17*8 End map_ns:Procedure IF trace=0 THEN PRINT AT (PS+A), 210*8 ELSE PRINT AT (PS+A), 18*8 End Quote Link to comment Share on other sites More sharing options...
mmarrero Posted August 2, 2017 Share Posted August 2, 2017 Your code is a bit un-compilable, but I ran a test of DrawGrom. SCREEN_FB (which won't show any GROM lowercase and graphics) is needed to replicate your 1st screenshot, so, the problem is that the current mode is not SCREEN_CS. IntyBasic manual list a change for v1.2.6, "Internal: the mode_select variable now preserves in bit 0 the actual mode", so maybe old versions of IntyBasic forgets/resets Mode? Quote Link to comment Share on other sites More sharing options...
tuatara21 Posted August 2, 2017 Author Share Posted August 2, 2017 (edited) I sent you a PM. Just to clarify, I did set the mode to SCREEN_CS at the top of the "display_castle_map" procedure. I'm trying to reproduce the GROM with lowercase and graphics in the "drawgrom" procedure. Sincerely, Derek Edited August 2, 2017 by tuatara21 Quote Link to comment Share on other sites More sharing options...
Kiwi Posted August 2, 2017 Share Posted August 2, 2017 I tried the SCREEN_COLOR_STACK and SCREEN_CS magic words and it didn't work. I recommend replacing the magic_words with the number 0 to set the mode to color stack mode. Mode 1 would be the BG/FG mode. Probably a bug. MODE 0,1,2,7,6 This will set it to color stack mode. Quote Link to comment Share on other sites More sharing options...
carlsson Posted August 2, 2017 Share Posted August 2, 2017 Perhaps you're using an old version of constants.bas, but then shouldn't the compiler warn if you're using undefined constants? Quote Link to comment Share on other sites More sharing options...
tuatara21 Posted August 2, 2017 Author Share Posted August 2, 2017 @Kiwi - I tried MODE 0,1,2,7,6 - same results. @Carlsson - no warnings when I compile. The "constants.bas" file indicates latest revision of 1.22F with a file creation date of 1/23/2016. Quote Link to comment Share on other sites More sharing options...
Gernot Posted March 17, 2018 Share Posted March 17, 2018 hi tuatara, i like mermaid much, i like the idea behind, it's a great adventure game, or could be. in my humble opinion the castle maze is too large with 10 x 10 rooms, one can easy lose fun and attention for the game in the search for the queen. else that thing is great. maybe if there would be a sort of hinting along the way in the castle where you have to swim to, not to obvious of course, but something which gives you an idea. perhaps if the sea creatures would get harder (bigger) as closer you get to the target. once i played i found the queen quite early, but the next time i simply gave up, it took to long without to have any idea where to look for. ok that's random, but exactly this makes it so hard and unpredictable. and you must agree hundret rooms are damned many, once it's probably next door, another time in "room #99". except, ok maybe i've overssen something, i didn't played it to often, but well my second serious but non succeeding try kept me from playing it again. i know you created a box art yourself, nonetheless an IntyBASIC themed boxart from "gernötli" (if you would hand me your avatar i could poster that as well on the box) to make it complete an icon to start it from and one for the instructions Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.