Jump to content
IGNORED

Proof of Concept: Virtual Sprites Handled as Arrays


Gemintronic

Recommended Posts

I've been struggling with size issues of my main game engines.  Al_Nafurs sprite sharing technique helps. but.. I wondered if more could be done. Here is a proof of concept that controls all 5 virtual sprites using the same code.  The virtual player details are handled as arrays.  This makes enemy/actor AI much smaller/manageable.

 

This is just a proof of concept.  So, not a full tutorial or example.  Nevertheless, there's comments in the code.  Just ask about anything :)

.

.also, NO attempt has been made to mitigate virtual sprite priority flicker   basically, when sprites go above or below other virtual sprite boundaries there's a chance they'll all flicker.  This is different from the flicker you get from two virtual sprites being less than a few pixels vertically from eachother.

 

movevirt001.basmovevirt001.bin

movevirt001.thumb.png.3c55cb9232c5de5d06ad54d3921f21bc.png

  • Like 7
Link to comment
Share on other sites

I fully realize that I'm not the target audience for your post but I ws curious if you could explain the benefit of your code for a nonprogrammer in general terms.   I assume you're using the multisprite bB kernel (or is it DPC?).  Is the main benefit of using the array saving on ROM space and/or RAM?

Link to comment
Share on other sites

3 hours ago, LatchKeyKid said:

I fully realize that I'm not the target audience for your post but I ws curious if you could explain the benefit of your code for a nonprogrammer in general terms.   I assume you're using the multisprite bB kernel (or is it DPC?).  Is the main benefit of using the array saving on ROM space and/or RAM?

 

I'm probably going to repeat myself in some areas so forgive me.

 

bB has very specific ways to handle specific resources.  player1pointerlo, player4height and so on.  For me I end up with sections of code that feel like they are copies of other code just with the sprite object changed.

 

By accessing sprite object attributes as an array we can make for next loops to control ALL virtual sprites with the same code block.  This proof of concept uses the multi sprite kernel.

  • Like 2
Link to comment
Share on other sites

It's an interesting program. Above what I can do for now. I noticed the "debug cycles" I was looking at RT's page as I never saw that used in Bb code until now. I might start to use that to try and catch my cycles when they go over. Another question is off topic. I noticed some ASM in our code. Where could I learn the basics as I typically cut and paste sample codes I find until I get them to work. Trying to get the Genesis Controller to work on 2600+. Works in Stella pretty well, but doesn't behave the same on the 2600+. I'm thinking ASM  would probably help and with some other stuff I'm tinkering with. 

  • Like 1
Link to comment
Share on other sites

1 hour ago, Lewis2907 said:

It's an interesting program. Above what I can do for now. I noticed the "debug cycles" I was looking at RT's page as I never saw that used in Bb code until now. I might start to use that to try and catch my cycles when they go over. Another question is off topic. I noticed some ASM in our code. Where could I learn the basics as I typically cut and paste sample codes I find until I get them to work. Trying to get the Genesis Controller to work on 2600+. Works in Stella pretty well, but doesn't behave the same on the 2600+. I'm thinking ASM  would probably help and with some other stuff I'm tinkering with. 

 

I was able to understand enough of the Collect ASM tutorial to make a bB version of the game.  So, maybe that's a good starting point coming from a bB background:

 

https://forums.atariage.com/blogs/entry/13884-collect-tutorial-index/

 

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