Jump to content
IGNORED

Room initialization pattern in multi-rooms game


Vincehood

Recommended Posts

Hi,

what is the recommendation for multiple-rooms game when drawing new rooms?

Should all the following commands be used in each room: CLS, MODE, DEFINE & SCREEN?

I am wondering since I got various results. 

Do you need to reload the cards for each room with a DEFINE even if the rooms can be drawn based on a common set of cards?

Thanks!

/V

Link to comment
Share on other sites

CLS and SCREEN should be enough if you're using the same cards for each different screen. You only need DEFINE if you're changing the graphic symbols, and only MODE if you're switching between CS and FGBG mode. Actually you might not even need CLS depending on if your screen fills the entire 20x12 or not.

Edited by carlsson
  • Like 1
Link to comment
Share on other sites

I identified the cause of the issue (graphics not displayed). I have a procedure per room & I was defining the screen card data elements in each procedure like shown further down.

I believe this an anti-pattern resulting in non sequential interpretation. I have now moved the DATA elements outside the PROCEDURE at the end of the program and it's working fine!

 

room3: PROCEDURE
 room = 3
 CLS
 WAIT
 SCREEN screen3_cards
 WAIT

 REM 20x12 cards
 screen3_cards:
 DATA $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
 DATA $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
 DATA $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
 DATA $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
 DATA $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
 DATA $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
 DATA $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
 DATA $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
 DATA $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
 DATA $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
 DATA $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
 DATA $0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0200
END

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...