Re: Sector 53 [RPG/Ship Shooter]
Posted: Sat Jan 19, 2013 1:19 am
Ok well I finally have most of the kinks worked out. This demo will show the inventory system so far.
So now I have the item on the right with the amount you currently have. Above that is the current shield (to test changes). When you hover your mouse over the item it will give you a description. When you drag the mouse and let go but are not on a valid spot then the item will snap back to where you grabbed it. If the item changes positions and you move it again but not to a valid spot then it will snap back to its new position. If you place the item on the white squire then you will give the bonus to shield. If you take it back off and put it back into the inventory then it will take the bonus away. Whew that was alot.
So next on the list of things to do is somehow make a detection to see if an item is currently taking up the white square. If it is then I have two choices. I can "A" make the items swap or I can "B" make a currently taken position an invalid spot to place the item. I am not sure which one I should choose. I think this next bit might take me awhile to figure out. And as always once I do then I will need to clean up the code.
If you see something wrong with my code please let me know. This is mostly for concept and not part of the actual game. Once I get it working then I will hook it into the game using the games data instead of some random numbers. Thanks again and I hope you like.
**EDIT** I know I have spelling errors. I just noticed in my post and in the code. Sigh...
Also here are the old battle engines https://www.dropbox.com/sh/xccv6e0kbpzo84s/SvRnh0bK7w I am working on the newest one and. There are two versions. One is simple and works and the other is buggy as hell. The newest version of the game will always be in the original post (first message).
So now I have the item on the right with the amount you currently have. Above that is the current shield (to test changes). When you hover your mouse over the item it will give you a description. When you drag the mouse and let go but are not on a valid spot then the item will snap back to where you grabbed it. If the item changes positions and you move it again but not to a valid spot then it will snap back to its new position. If you place the item on the white squire then you will give the bonus to shield. If you take it back off and put it back into the inventory then it will take the bonus away. Whew that was alot.
So next on the list of things to do is somehow make a detection to see if an item is currently taking up the white square. If it is then I have two choices. I can "A" make the items swap or I can "B" make a currently taken position an invalid spot to place the item. I am not sure which one I should choose. I think this next bit might take me awhile to figure out. And as always once I do then I will need to clean up the code.
If you see something wrong with my code please let me know. This is mostly for concept and not part of the actual game. Once I get it working then I will hook it into the game using the games data instead of some random numbers. Thanks again and I hope you like.
**EDIT** I know I have spelling errors. I just noticed in my post and in the code. Sigh...
Also here are the old battle engines https://www.dropbox.com/sh/xccv6e0kbpzo84s/SvRnh0bK7w I am working on the newest one and. There are two versions. One is simple and works and the other is buggy as hell. The newest version of the game will always be in the original post (first message).