Jump to content
IGNORED

bB 'carry object' example?


prOk

Recommended Posts

I’ve always done it by doing things like checking the collision of two objects and if a button is pressed. If it is pressed then the coordinates of the grabbed item would change to be tied to the player. I do this in my game Crossdock with the pallet jack. 
 

you also mention multiple screens. You could also set a bit that when something is grabbed it flips that hit and stays on. I do this in my game Crossdock when you pick up a box. While I don’t have multiple screens, this effect can be seen if you have a box and go to the bonus screen. Since I don’t reset the bit when you go back to main screen the box will reappear in your hands. 
 

I don’t have my computer available at the moment (everything is buried under our hurricane prep stuff) but I thought I have the .bas file in these forums if you look up “Crossdock.”

  • Like 1
Link to comment
Share on other sites

1 hour ago, KevKelley said:

I’ve always done it by doing things like checking the collision of two objects and if a button is pressed. If it is pressed then the coordinates of the grabbed item would change to be tied to the player. I do this in my game Crossdock with the pallet jack. 
 

you also mention multiple screens. You could also set a bit that when something is grabbed it flips that hit and stays on. I do this in my game Crossdock when you pick up a box. While I don’t have multiple screens, this effect can be seen if you have a box and go to the bonus screen. Since I don’t reset the bit when you go back to main screen the box will reappear in your hands. 
 

I don’t have my computer available at the moment (everything is buried under our hurricane prep stuff) but I thought I have the .bas file in these forums if you look up “Crossdock.”

Your grocery cart in "Bag Boy" would be another example...

  • Like 1
Link to comment
Share on other sites

In my game Knabber Rob I change the player sprite to one with the item as part of the sprite (on top of his head).  This uses more ROM but saves the second sprite for enemies and items still on the ground.

 

I used a variable I named "p0type" to indicate which what the player was carrying.  Say, 1 for yellow key, 2 for sword, etc..

Link to comment
Share on other sites

On 9/30/2022 at 9:10 AM, Gemintronic said:

In my game Knabber Rob I change the player sprite to one with the item as part of the sprite (on top of his head).  This uses more ROM but saves the second sprite for enemies and items still on the ground.

 

I used a variable I named "p0type" to indicate which what the player was carrying.  Say, 1 for yellow key, 2 for sword, etc..

I really like this idea. I can imagine doing things like just having a taller sprite and just changing the sprite height too depending on if it has something “grabbed”

  • Like 1
Link to comment
Share on other sites

6 hours ago, KevKelley said:

I really like this idea. I can imagine doing things like just having a taller sprite and just changing the sprite height too depending on if it has something “grabbed”

 

I play with the player0pointerlo, player0pointerhi values to shorten sprites and/or hide parts of a sprite.  But, I haven't mastered it by any means.  Using them is so obscure even R.T.s amazing batari BASIC Command Reference has almost zero entries.

Link to comment
Share on other sites

3 hours ago, Gemintronic said:

 

I play with the player0pointerlo, player0pointerhi values to shorten sprites and/or hide parts of a sprite.  But, I haven't mastered it by any means.  Using them is so obscure even R.T.s amazing batari BASIC Command Reference has almost zero entries.

Yeah; they aren't in the manual since they aren't really part of bB per se - they are variables used "under the hood". I'm curious how you use these pointer variables for the effects that you mentioned. For shortening sprites I would think it would be easier to decrease the playerXheight variable.

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