Jump to content

  • Log In with Google      Sign In   
  • Create Account


Units with N equipable locations


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
11 replies to this topic

#1 00Kevin   Members   -  Reputation: 222

Like
0Likes
Like

Posted 05 February 2013 - 03:56 PM

I'm currently having a bit of trouble trying to conceptualize an appropriate user interface and class design for equipping items on units with N equip-able locations.    

 

My game is a bit unique in that it allows for units with more than two equip-able locations.   For example, a robot character race with 6 arms might want to equip a two handed weapon on arms 1 & 2,  a one handed weapon in arms 3, a shield in arm 4, and another two handed weapon in hands 5 & 6.

 

In addition, some weapons in my game can be used one or two handed (like a spear).

 

I think that with such a system I can't automatically equip and unequip weapons.  I think I'll have to ask the player which hand(s) he wants the item equipped on.   

 

Anyone else try something similar? Are there any games out there that have done this elegantly?


Edited by 00Kevin, 05 February 2013 - 03:57 PM.


Sponsor:

#2 slicer4ever   Crossbones+   -  Reputation: 3474

Like
0Likes
Like

Posted 05 February 2013 - 04:20 PM

what exactly is the problem?

 

an elegant solution for equipable user interface imo is one like diablo 2/3(not exclusive to them by any means, but it's the one that sticks out in my mind at the moment), where you just show the player, then overlay "slots" that the player can place appropiate equipment.  it's incredibly intuitive(weapons/shields obviously go in the hand, chest pieces obviously go on the chest, etc.) can't really beat that imo.


Edited by slicer4ever, 05 February 2013 - 04:21 PM.

Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

#3 00Kevin   Members   -  Reputation: 222

Like
0Likes
Like

Posted 05 February 2013 - 06:05 PM

A slot system like diablo does not work elegantly for units that can equip more than 2 weapons..   Diablo 2/3 does not allow you to equip more than two weapons. 

 

With only two weapon slots it's rather easy to code.   All you need do is equip the weapon in the slot requested by the player and move the weapon(s) held to inventory.  

 

In my system, I'm allowing for weapons that can be equiped one or two handed.  In addition, a character can have more than two arms.  

 

Lets say the unit has 6 weapon slots (six arms) and slots 1,3,4,5, and 6 are currently holding weapons.    When you pick up a two handed weapon what happens when you try to equip it in slot 2?     What if that weapon can be used one handed or two handed.     The problem with more than two weapon slots per Unit is that you can't really make any assumptions for the player.  At best you would have to pull up an option box when the item is equipped. 



#4 Paradigm Shifter   Crossbones+   -  Reputation: 5252

Like
0Likes
Like

Posted 05 February 2013 - 06:08 PM

The original X-COM (Ufo) had a drag and drop interface to equip items to hands, shoulders, leg pockets, etc. All you need to do is disallow equipping weapons in your off hand if you have a two handed weapon equipped in your other hand. Just bring up the option when you want to fire an equipped weapon.
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#5 00Kevin   Members   -  Reputation: 222

Like
0Likes
Like

Posted 05 February 2013 - 06:33 PM

The original X-COM (Ufo) had a drag and drop interface to equip items to hands, shoulders, leg pockets, etc. All you need to do is disallow equipping weapons in your off hand if you have a two handed weapon equipped in your other hand. Just bring up the option when you want to fire an equipped weapon.

 

Yes, that's easy.   But how do you manage that with 6 arms? 



#6 Paradigm Shifter   Crossbones+   -  Reputation: 5252

Like
0Likes
Like

Posted 05 February 2013 - 06:37 PM

Drag a weapon to as many arms as you have. When you hit the attack button bring up a menu with which one you want to attack with? XCOM was turn based though if your game isn't you probably need hotkeys to attack (1-6 for 6 arms presumably).
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#7 00Kevin   Members   -  Reputation: 222

Like
0Likes
Like

Posted 05 February 2013 - 06:51 PM

Drag a weapon to as many arms as you have. When you hit the attack button bring up a menu with which one you want to attack with? XCOM was turn based though if your game isn't you probably need hotkeys to attack (1-6 for 6 arms presumably).

 

 

Actually it is turn based, but I don't understand how that resolves my design problem.   Perhaps I've just done a poor job of describing my issue.

 

For single handed weapons it's easy you just do exactly as you say.

 

My design issue stems from the equipping of weapons that require two hands or both ( one or two handed ) on a unit with 3+ hands.     

 

Thanks for your help. 

 

 

.



#8 frob   Moderators   -  Reputation: 20189

Like
1Likes
Like

Posted 05 February 2013 - 07:07 PM

I also recommend a slot system.

 

The animators create a bone where the object is meant to slot in to.  

 

Something your tool chain allows you to map the joint into a slot type.

 

Something else in your tool chain allows you to mark various weapons and armor into those slots.

 

 

 

Example:

 

* Create your character model with 6 arms.

* Each arm has a bone at the end where a weapon can attach.

* In your tool, mark the bone with data something similar to this:

 { BoneNameFromModel, BoneIDFromCode, CanHold_SmallGun | CanHold_LargeGun | CanHold_Knife | CanHold_Spear ...}

 

* Create a small gun.

* In your asset creation tool, mark it with the flag SmallGun.

 

* Create your spear.

* In your asset creation tool, mark it with the flag Spear.

 

 

Now you have all the information you need about what can be held where.  Enumerate over the slots on the model, ensure that the CanHold flags match the weapon's flags, and equip it if allowed.  Done.


Check out my personal indie blog at bryanwagstaff.com.

#9 slicer4ever   Crossbones+   -  Reputation: 3474

Like
0Likes
Like

Posted 05 February 2013 - 07:13 PM

ok, so why don't you only allow a certain other hand to wield the two handed(or have the player select the second hand.)

 

for example(and hopefully the forum doesn't mess up my diagram):

 

   O

  / | \

  / | \

   /\

 

let's say i want to add a two handed weapon to his top left hand, now then, logically that two handed weapon could either be wielded by the top right hand, or even maybe the bottom left hand, but most likely not the bottom right.

 

so when you create the character, you create a map of what hand can be used with another hand to hold 2 handed weapons, basically you highlight the available selections(if their's more than one selection, otherwise simply auto-equip it if their's only one possible choice).

 

this can be broken down to include diffrent type's of weapons can have diffrent hand combinations.

 

for example:


Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

#10 L. Spiro   Crossbones+   -  Reputation: 13222

Like
0Likes
Like

Posted 05 February 2013 - 08:41 PM

My feeling is that this question is more about implementation than conceptualization, so I refer you back to frob’s 100% correct answer.

 

 

L. Spiro


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#11 00Kevin   Members   -  Reputation: 222

Like
0Likes
Like

Posted 05 February 2013 - 08:57 PM

@slicer

 

thanks for the great post.      I guess there really is no way around it.  The player will usually have to unequip slots before they can be used for two handed weapons.    

 

I could just allow the player to drop a two handed weapon on any slot and then highlight the free-able slots.    Once he picks one the weapon or shield in that slot moves to inventory.     If he cancels during the free up process the weapon goes back to inventory or simply remains on the cursor.   



#12 00Kevin   Members   -  Reputation: 222

Like
0Likes
Like

Posted 05 February 2013 - 09:16 PM

My feeling is that this question is more about implementation than conceptualization, so I refer you back to frob’s 100% correct answer.

 

 

L. Spiro

 

 

Yes, Frob's answer is good for modelling   

 

At the moment I'm working on the core classes like Unit, Item, Action, Inventory system, etc.

 

The object model of the mechanics are being tested outside of any graphics and are completely self contained.   My hope is that the game mechanics will work with any UI and graphic system.     At the moment the game is functioning inside a windows forms application.  There are no graphics or models at all. :)






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS