Jump to content
Sign in to follow this  
kevin6569

'FRAME' use in Intybasic

Recommended Posts

I am slowly working through Oscar's book and cannot wrap my head around FRAME command. He uses it in the game 'Monkey Ball' to chech which MOB to display when the controller is pressed. 

Thanks 

Kevin 

Share this post


Link to post
Share on other sites

FRAME is an internal counter that automatically counts up to 65535 frames, i.e. number of times you have reached vertical refresh. What is done in Monkey Moon is using that counter to determine which MOB to display: FRAME/4 to get a change of MOB every fourth frame, and then AND 3 to get a number 0-3 that says which MOB to change into. By relying on the FRAME counter you can get relatively smooth movement without having to run your own delay counters.

 

By the way, you're posting in a subforum once used for the IntyBASIC contest from 2018. Possibly you want to post your topics one level higher, directly in the Intellivision Programming subforum.

  • Like 1

Share this post


Link to post
Share on other sites

Thank you for the clarifications - I will direct my future questions (I'm sure I'll have more) one level up. Thank you for the quick response! 

  • Like 1

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...