Jump to content
IGNORED

Inventory management techniques


oceanix42

Recommended Posts

5 hours ago, LatchKeyKid said:

Thanks.  Not the OP but I was wondering about the possibility of that when looking at minikernels.

There are probably other ways but I just know using the score. Even using the hex digits for more and other score kernels like the 2, 4, or double stacked so there are plenty of options. 

  • Like 2
Link to comment
Share on other sites

6 hours ago, KevKelley said:

There are probably other ways but I just know using the score. Even using the hex digits for more and other score kernels like the 2, 4, or double stacked so there are plenty of options. 

When I first looked at it, I was just thinking of using each digit of the six digit score as a specific item with the sprite graphic changing from blank to the shape of the item when you acquire it.  At first I was thinking of changing the color but wasn't sure you can do that for each digit.  I'm not sure as a n00b what you mean by the other choices though.  This is the minikernel I was thinking about using.

 

https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#pfscorebars

 

The numbers would be the items, the full bar would be health and the dots would be a limited use item.  Or at least that's my pipe dream!  :)

Link to comment
Share on other sites

4 minutes ago, oceanix42 said:

Are there no bB routines that people have written that have a flushed-out inventory management solution? Very surprising if so.

To me, it's not very surprising.  What homebrew games have you seen with an inventory system?  And which of those games were written in bB?

Link to comment
Share on other sites

42 minutes ago, oceanix42 said:

Hmm...proving very challenging. Are there no bB routines that people have written that have a flushed-out inventory management solution? Very surprising if so. Well, I guess I need to be the one that offers that, LOL beware fellow devs...

The heyday of Atari predates the typical need for such systems as the games were simpler during that time.  I'm not sure I can recall a game style that uses even a rudimentary one other than action rpgs on the 2600.  I suspect the severe hardware limitations naturally exclude their use.  Regardless, I'd be interested in seeing what you can come up with and welcome a new mini-kernel for that specific use!

Edited by LatchKeyKid
Link to comment
Share on other sites

  • 1 month later...

What kernel are you using? If Dpc+ you could draw the items from the bottom few playfield block rows, use a code to turn the pfblocks on or off, and use variables as counters. (Maybe 1 single pfblock = 10 bullets/one full magazine and you don't need to display each bullet, etc.. or if an item is being degraded/damaged you could turn off the top row of blocks on the item (flashing full image with missing row image for clarity)

 

This might actually use less code and free up kernels for score stuff, though not as elegant. if you're not using Dpc+ you'll have chunky pf blocks and will either need to edit the score (display 6 items at a time, with 10 unique item types editing 0-9) use a score kernel, or flicker sprites. 

 

One option is to hold down the fire button which pauses the gameplay and brings up a separate menu screen. This way you'll have more sprite graphics to work with if you don't need to choose items in real time. 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

40 minutes ago, freshbrood said:

use a code to turn the pfblocks on or off

I thought with DPC+ one of the drawbacks are things like pfpixel does not work. Not sure about playfield variables. In the past I would just do things like redraw the top of the screen (either playfield or background colors or playfield colors) to save from redrawing the entire screen and wasting space. 

  • Like 1
Link to comment
Share on other sites

4 hours ago, KevKelley said:

I thought with DPC+ one of the drawbacks are things like pfpixel does not work. Not sure about playfield variables. In the past I would just do things like redraw the top of the screen (either playfield or background colors or playfield colors) to save from redrawing the entire screen and wasting space. 

pfpixel should work with the DPC+ kernel, but it does not work with the Multisprite kernel. The playfield variables are not available to manipulate, though.

  • Like 2
Link to comment
Share on other sites

4 hours ago, Karl G said:

pfpixel should work with the DPC+ kernel, but it does not work with the Multisprite kernel. The playfield variables are not available to manipulate, though.

Ahhh. I read that and couldn’t remember. I had never really done it but I play around with all the different kernels that I probably mixed them up. 

Link to comment
Share on other sites

I hate to post here but no one's responded to the new topic I created, re: in bbasic is it possible to change the default viewscreen position? Instead of x0, y0 starting at the upper left most pixel, maybe have that viewable pixel be x50, y50? This sure would save a lot of headache on sprite wrap around when it gets to the left or top borders..Or conversely is there any code snippets that make wrap around smooth in bbasic? 

 

I have a topic started if anyone would care to respond. Thanks. 

 

Link to comment
Share on other sites

Couldn’t one make a macro for that if they really wanted to and call it whenever you need it?

 

So if you wanted to make reading coordinates easier you can enter in the x and y however you want, then call the macro to convert the x and y to how they are in the kernel?

Link to comment
Share on other sites

On 10/31/2023 at 8:34 AM, KevKelley said:

Couldn’t one make a macro for that if they really wanted to and call it whenever you need it?

 

So if you wanted to make reading coordinates easier you can enter in the x and y however you want, then call the macro to convert the x and y to how they are in the kernel?

Hi Kev, not sure if this is in response to my question about viewable starting area.. but I have no idea how to make a macro or kernels, and my concern isn't about making coordinates easier to read but finding an elegant and low memory way to fix screen wraparound.

Edited by freshbrood
Link to comment
Share on other sites

18 hours ago, freshbrood said:

my concern isn't about making coordinates easier to read but finding an elegant and low memory way to fix screen wraparound.

Oh. 
 

I know I usually just make a little bit of code for the boundaries but if I have a game with wrap around I just put in that if the x< something like 5, depending on the movement, I then make x=something like 145 or whatever looks smoothest. 
 

I had tried more complicated things like changing the sprite but in the end just two lines of code usually work for me. Not sure exactly how you want to wrap. I was confused by your earlier post and thought it was about coordinate conversions or inverting positions. 

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