Jump to content
IGNORED

7800 Basic "Split Logic"?


Recommended Posts

The Maximizing Sprites section of the 7800 wiki says this :

Maximizing 7800 Sprites - 8BitDev.org - Atari 7800 Development Wiki

 

Split Logic

The simplest thing a 7800 developer can do to improve performance in their game is to split out the game logic from the display logic. Enemy AI, player controls, display position calculations and everything else aside from adding bytes to the DLLs should be happening during the visible screen, where the most free time is available. When your program is done all of the game logic, it should just be ready to write out that DLL data as fast as possible once the visible screen is over.

Ensure you do this by splitting your main loop into 2 sections, the first labeled as ";GAME LOGIC" and the other as ";DISPLAY LOGIC". If anything in the DISPLAY LOGIC section can be precalculated in the GAME LOGIC section, even if takes more time, do so.

 

 

How can this be achieved in 7800 Basic?  
It is as simple as leaving all "plot" statements until last possible moment??

Sorry if this has been discussed before.  

 

 

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

1 hour ago, fultonbot said:

It is as simple as leaving all "plot" statements until last possible moment??

Yes, that's all it means, I believe. As soon as you plot your first sprite, it skips past the visible screen to the more limited off-screen part of the frame. Putting this off until other processing is complete can net you a lot more available cycles. 

  • Like 2
Link to comment
Share on other sites

47 minutes ago, Karl G said:

Yes, that's all it means, I believe. As soon as you plot your first sprite, it skips past the visible screen to the more limited off-screen part of the frame. Putting this off until other processing is complete can net you a lot more available cycles. 

I was plotting my moving starfield background before anything else.  I moved it and I do see a bit of performance gain.

  • Like 2
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...