Timeline for How to handle a different kinds of weapon in a single component and system in entity system?
Current License: CC BY-SA 3.0
18 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 31, 2016 at 17:08 | answer | added | Exilyth | timeline score: 1 | |
| Aug 15, 2016 at 9:41 | vote | accept | ronscript | ||
| Aug 15, 2016 at 9:39 | history | edited | ronscript | CC BY-SA 3.0 | added 212 characters in body |
| Aug 15, 2016 at 9:26 | history | edited | ronscript | CC BY-SA 3.0 | added 89 characters in body |
| Aug 15, 2016 at 9:19 | history | edited | ronscript | CC BY-SA 3.0 | added 293 characters in body |
| Aug 15, 2016 at 9:05 | comment | added | Ryan white | @ronscript You would set up methods for each weapon, but have the weapon name set in that method, and use that method to call the "weaponTemplate" method. Then each method for the weapon would contain animations and sounds etc. - Thats how i would do it | |
| Aug 15, 2016 at 9:03 | comment | added | ronscript | @Ryanwhite I havent tried adding more components of the same type, but I think its possible | |
| Aug 15, 2016 at 9:02 | comment | added | ronscript | @Ryanwhite also I need to handle all of that different kinds of motion in a single WeaponSystem, I don't know where to start or I just overthink? | |
| Aug 15, 2016 at 9:02 | answer | added | Ryan white | timeline score: 2 | |
| Aug 15, 2016 at 9:01 | comment | added | Philipp | I am not familiar with the Ashley ECS framework. Does it allow more than one component of the same type on an entity? | |
| Aug 15, 2016 at 9:00 | history | edited | ronscript | CC BY-SA 3.0 | edited title |
| Aug 15, 2016 at 8:59 | comment | added | Ryan white | ill write it up as an answer, and yeah i don't think it is recommended. | |
| Aug 15, 2016 at 8:58 | comment | added | ronscript | @Ryanwhite I've also updated the title of this question to "How to handle a different kinds of weapon in a single component and system in entity system?" | |
| Aug 15, 2016 at 8:57 | history | edited | ronscript | CC BY-SA 3.0 | edited title |
| Aug 15, 2016 at 8:55 | comment | added | ronscript | @Ryanwhite Thank you for your answer, you should also put that as answer. Actually your on the right path you answered 2/3 of it, the last part is how do I create an abstract of weapon class so I could override each weapon usage, but I think abstraction is not recommended in ECS | |
| Aug 15, 2016 at 8:18 | comment | added | Ryan white | 2/2 and slash just use different animations, and if the player uses that melee type, i.e right clicks a knife to stab, the damage would be different but the animation longer. | |
| Aug 15, 2016 at 8:18 | comment | added | Ryan white | Although i do not understand your question very well, i will try to help. You can use a RayCast for weapons, this allows all weapons to use one set of attributes, so range etc. Now you would have a melee weapon use the range, but set it to set 0.5. This would give the melee weapon a low range, making it seem like its melee (This would be played with allot btw) then from this your weapons all use the same attributes. It saves on creating methods for different types of weapons. Most games use a system like this, as it is really easy to create new weapons on the fly. As for stab and slash 1/2 | |
| Aug 15, 2016 at 8:02 | history | asked | ronscript | CC BY-SA 3.0 |