Wednesday, 25 May 2011

Long time no write

Yeah, well progress is happening, slowly; exercise seems to have gotten in the way as well as other diversions.
Well yes, I was working on inventory management getting items to be picked up and slotted in the first available space was rather simple, picking up an item was quite simple, swapping the picked up item and the item beneath it was a little trickier but eventually was solved.
Looking at my code I can't help but feel there is a little bit of redundancy in there somewhere, it's being implemented as a bag has an inventory grid and a list of items, each inventory grid has a number which correlates to the position of the item in the corresponding list. Each item then has a position within that bag and an x and y size, equating to the same information as the inventory grid, the item also knows which bag it is in or if it is on the map (i think that information is redundant, it wasn't when I was implementing the inventory in a slightly different way) but any that's enough rambling.



I promised myself I'd look at targeting next, I'm feeling like there should be some stepping out checking squares in a 45 degree arc (dependent on the direction selected) to see if there is anything there, items or monsters that the player can see or has seen. What is under the cursor should be relayed to the player. There should also be an option for looking at every single tile or just the important things, monsters/interactable features (items, doors, stairs), although given it is a graphical roguelike maybe the visual feedback will be enough for non-interactable objects that can easily be recongised (doors, stairs and the like).