Jump to content

tuatara21

Members
  • Posts

    26
  • Joined

  • Last visited

Posts posted by tuatara21

  1. @nanochess and @intvnut -

     

    Thanks, the code listed above appears to work - 1 & 9 to pause and 1 & 9 to resume the game. I need to test further but so far, so good :)

     

    I appreciate the excellent and prompt support as always, along with the explanation and commented code.

     

    Sincerely,

    Derek

    • Like 2
  2. @intvnut - thank you for the clarification, especially the follow-up post. So far I've been unable to find any tutorials or other sample code which includes any "debounce" code (at least, it's not commented as such).

     

    If there is an optimal way to handle this in IntyBasic, I'd appreciate if someone could share the solution. I must not be the only one struggling with this :?

  3. The code provided resolved most of my issues. I'm still experiencing an activation of the function mapped to CONT.B0 when I press 1 & 9 simultaneously.

     

    I confirmed that pressing 1 or 9 separately does not cause this function to activate.

     

    Thanks again for the prompt response! I appreciate the detailed explanations as I attempt to pick up where I left off with IntyBasic after a 15-month absence.

     

    Sincerely,
    Derek

  4. @Intvnut - Thank you for clarifying, I knew there was some "magic" behind the way the controller keys were decoded but I was having trouble finding the specific details. Appreciate the detailed response :thumbsup:

     

     

    I implemented your suggestion and it "sort of" worked... the game pauses as long as the 1 and 9 keys are held down.

     

    However it still activated the code for the top button and the game resumes as soon as I release the key(s).

     

     

    I could just utilize a single key for the pause functionality, but hoped to use the 1 & 9 keys to be consistent with other Intellivision games.

  5. I'm trying to implement a simple pause/resume feature using the standard keypad combo (1 and 9). Also tried with 3 and 7.

     

    Either attempt instead results in a button press. If I modify the first line of code to IF cont.key = 4 THEN

     

    it works as expected. I assume this is one of those key combination results in other button / disc pressed scenarios?

     

    Please advise as I'm under the impression that a workaround exists.

    'check for pause key combination
    IF cont.key = 1 and cont.key = 9 THEN 
    
    junk = 0
    pause_loop:
    if junk = 0 THEN PRINT AT 84 COLOR ((RAND AND 5)+2)+BG_BLUE,"PAUSE"
    'increment timer to change color of pause text
    junk = junk + 1
    'if any key, button or disc is pressed, resume game
    Wait
    if cont.button or cont.left or cont.right or cont.up or cont.down then gosub checkforNOKeys: PRINT AT 84 COLOR FG_BLUE+BG_BLUE," ": Gosub WaitaBit: goto resume_game
    if junk = 25 THEN junk = 0
    GOTO pause_loop
    resume_game:
    END IF

    checkforNOKeys: Procedure Rem wait for controller release clearloop: clearkey=cont1 wait if clearkey then goto clearloop wait end WaitaBit:Procedure For a=0 to 10 Wait Next a End

     

     

    • Like 1
  6. 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
    
      
    

     

    post-34062-0-62233800-1501612524.png

    post-34062-0-71949700-1501613000.png

    post-34062-0-23217400-1501613665.png

  7. I have been using the following statement to print certain background objects on the screen in my game for the IntyBasic contest.

     

    in this example, I am placing a "wall" image to cover an entryway in the castle:
    PRINT AT 9, $1860
    PRINT AT 10, $1860
    However I am getting an error in jzintv when I attempt to execute the ROM now.
    Starting jzIntv...
    HALT! PC=7004 Instr = 78 MS = 62
    If I comment out a handful of the PRINT AT statements, the ROM executes properly.
    ROM is currently hovering between 17-18k so I wasn't sure if I was up against the limit (without bankswitching).
    I have used the above PRINT AT statements elsewhere in the program and they execute as expected. The image ($1860) output is correct when I reference it in the screen [label] statement.
    Please advise, perhaps there is an alternate method to perform this task.
  8. I am working on a late entry, inspired by my daughter's request to create a video game for her.

     

    The working title is "Mermaid". The objective is to collect treasure and locate the queen's crown along with the key to the underwater castle while avoiding various sea creatures including the shark, octopus, squid and a variety of fish.

     

    The mermaid can protect herself with a "mermaid bubble" (force field) and also has a "speed boost" option to briefly increase her swimming speed.

     

    Once you collect the key and the crown, locate and enter the castle. You need to deliver the crown to the queen before time expires.

     

    Here are several screenshots.

     

     

    post-34062-0-53632600-1451268888_thumb.png

    post-34062-0-46219500-1451268892_thumb.png

    post-34062-0-12754600-1451268895_thumb.png

    • Like 12
  9. Tuatara Software, LLC is proud to present a demo version of our first game - Quetzalcoatlus ™ !!

     

    Quetzalcoatlus™ is a one-player game that is compatible with the classic Commodore 64 system. The demo version will run on any Commodore 64 emulator. The final product will be available for purchase via software download (for emulator use), or on a 5 1/4" floppy diskette, for use with the original Commodore 64 computer system. We may produce a limited number of copies that will include the box, manual, and diskette.

     

    Object of the game: You are the Quetzalcoatlus, a pterosaur with the largest wingspan of all-time! Avoid dinosaurs and marine reptiles while attempting to dive into the ocean to catch and eat your prey!

     

    Download the Quetzalcoatlus™ demo here: Quetzalcoatlus Demo 1.61

  10. I'm using 1.0 so perhaps that is the issue. I found a link for 1.1 beta... is 1.01 still available? If so, please provide a link, and I try that. On..Goto works fine with 1.0, and I can transfer control to that label with the On..Goto without any issues. Appreciate the quick response!

×
×
  • Create New...