Jump to content
  • Advertisement
  • entries
    18
  • comments
    12
  • views
    17428

Items system not really finished :-(

Sign in to follow this  
mousetail

1007 views

Well, I have been working on the item system today, but its pretty complicated. The trick is that every item can only be at one position at once. A lot of the time, when I dropped items, I either removed them from my inventory, found something was wrong, and lost my reference to it, and so it disappeared in nowhere. I imagine someone reaching the end level, picking up the , drop it in a safe place, and fount it has vanished into the void because you mistyped. I worked on that, and the next time, I dropped a item, it did appear on the ground, but it stayed in my inventory also. When I dropped it again, it moved to the new place, since I assigned the position when dropping. When all that was fixed, I tried to implement stacking. So I gave objects a __eq__ method, checking that the name was equal. But this turned into a problem, since I was using index() to find what item to pick up, but since they where equal, it just picked up the first item instead of the one you where trying. I try again by checking position as well, and setting positions in the inventory to [0,0]. Now, a new problem arises: The dropped items just carry a copy of the players position list, so when the players position changes, the items position changes with it. Changed the position to a tuple. Now, everything seems to work, only, the widget seems to only change when I press a key instead of when I click on it. Turns out a key triggers the screen to update while a mouse doesn't. Fixed that. By now, its late in the afternoon and I didn't think I would be able to get a wielding system done in time.5.png(Killed by a lizard, right now lizard are basically equally strong as you)
Anyway, at like 6, I started on a wielding system. Found a ton of bugs in the drop system in the process (more duplicate items). The logic was basically the same for the rest. I decided to have one w which would wear/wield anything. For nethack style creative wielding, you would use capital W. As you can see in the screen shot (the first one) I have a sword equipped in my right hand and also in my left. You can also see what slots are free. My idea is that different monsters would have entirely different slots, to make sure giants don't wear gnome armor, like you can do in most other games. Swords don't actually affect combat yet, but who cares, they look cool.
I need a idea for a better way to handle longer and flatter monsters in my combat system. Right now combat works by stabbing from the front in random places, but for monsters that have more surface area on the top, it doesn't really work. Anybody have any ideas?
shortsword.png
Sign in to follow this  


2 Comments


Recommended Comments

Love it. I keep thinking about starting a rouge-like. Can't make suggestions on your last point as I don't quite understand what you mean by "stabbing at the front in random places". Are you looking to have larger monsters occupy more than one grid space?

Share this comment


Link to comment

Love it. I keep thinking about starting a rouge-like. Can't make suggestions on your last point as I don't quite understand what you mean by "stabbing at the front in random places". Are you looking to have larger monsters occupy more than one grid space?

 

Read my other post for details about my combat system. What I do is make a map of positions that are considered hits and ones that miss, chose a random point, and if it is in a square you hit that square, else you miss. How high you can hit is limited to how high your hand can reach, but for low and long monsters, the zones would more likely be measured from the top, but then even shorter monsters should have no problem hitting the tail, so I can't just map it like that. putting squares that intersect doesn't work either.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!