Jump to content
IGNORED

bB feature request.


Recommended Posts

Hey all,

 

I've been busy lately... Been toying with Bb some recently. Lots of changes.

 

A quick answer to 2600land's movement question prompted me to post this now before it slips again.

 

It would be really handy to be able to push one var onto the stack, then pull it again. Of course this can be done with a temp, but I think less overall code would be used with a push [var], pull [var] instruction set. It's also very intuitive.

 

a = x + 30

 

[some logic]

 

push a

 

a = a / 2

 

player1xpos = a + 30 : player0xpos = a + 60

 

pull a

 

[more logic]

 

Assume the stack is one level deep. (Which is all that is needed) Whatever is in the stack would be put into whatever var is named.

 

push a

 

a = a + 20

 

pull t : pull v

 

Is this a savings over the usual temp approach? I kind of like it because it's more assembly like, IMHO. (Which is what bB is supposed to be about right?)

 

I don't expect a response to this anytime soon. Just wanted to post it here for Batari when he once again sees fit to hack on bB. Maybe it's crap, maybe it's a good idea, but it's not forgotten this time!

Link to comment
https://forums.atariage.com/topic/94282-bb-feature-request/
Share on other sites

It would be really handy to be able to push one var onto the stack, then pull it again. Of course this can be done with a temp, but I think less overall code would be used with a push [var], pull [var] instruction set. It's also very intuitive.

 

a = x + 30

 

[some logic]

 

push a

 

a = a / 2

 

player1xpos = a + 30 : player0xpos = a + 60

 

pull a

 

[more logic]

bB supports complex equations now so the temp var approach isn't strictly necessary. For example, you could just do this:

 

player1xpos = a/2+30

 

That's not to say a stack wouldn't be useful for something. It would be very easy to implement, so it's probably worth adding if someone will find it useful.

Link to comment
https://forums.atariage.com/topic/94282-bb-feature-request/#findComment-1144858
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...