Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physics-based combat system (resurrect old system?) [$100] #2072

Closed
15 tasks
Cervator opened this issue Dec 18, 2015 · 6 comments
Closed
15 tasks

Physics-based combat system (resurrect old system?) [$100] #2072

Cervator opened this issue Dec 18, 2015 · 6 comments
Assignees
Labels
Category: Doc Requests, Issues and Changes targeting javadoc and module documentation Category: Gameplay Content Requests, Issues and Changes targeting gameplay mechanics and content Multiplayer Affects aspects not visible in Singleplayer mode only Topic: Architecture Requests, Issues and Changes related to software architecture, programming patterns, etc.

Comments

@Cervator
Copy link
Member

Cervator commented Dec 18, 2015

We had a near-complete combat system done by @aherber back in the legacy days based on a physics model. While we can currently simulate combat by just triggering damage events while two entities are near each other that's pretty boring.

The legacy system had a bow that would shoot different types of arrows including one affected by gravity, one that would bounce off surfaces, etc. It also had a sword for simple melee combat if you were faced with a target you could hit. The next step was enabling positional damage, opening the door to headshots, limb-specific damage, equipment mattering a whole lot more, and whole related systems like armor and health that could be more than just a global pool of points.

Whether we can resurrect the old system or not we need fancier combat!

Somewhat like the Behavior Tree overhaul (#2070) I'm expecting a basic scope here to claim the bounty with lots of bonus potential running into GSOC scale land.

Basic implementation

  • Either resurrect the old branch or use it for inspiration to develop a new physics-based combat system. Or surprise us with something clever that gets to the same level of gameplay (more than just mashing buttons in melee hoping you're hitting something). Not expecting where a target is hit to matter here.
  • Make a basic projectile weapon that could satisfy Implement a crossbow or similar ranged item #2570 - could be a stepping stone, may not need full physics (more like a tweaked railgun)
  • Probably will need to touch on pathfinding or BTs to actually have creatures engage in combat. There are alternative options for AI though
  • Implement an aggressive (test) mob that'll use the system with some level of competency (if a player or other suitable target is in range point at it and start shooting it with arrows or what not)
  • Allow the player to use the new system as well and aim attacks sensibly. Ideally show a few different projectile types like the old system
  • Verify that it all works in multiplayer without atrocious latency :-)
  • Add/review javadoc for all involved classes
  • Add tutorial about how to work/extend the system and any involved items, again ideally in the style of https://github.com/Terasology/TutorialWorldGeneration/
  • Make a showcase video

Advanced implementation

This is far more open-ended and leads into creating/updating related systems

This issue obsoletes #590 - figured I'd create a new one to get it fully up to speed.

@Cervator Cervator added Category: Doc Requests, Issues and Changes targeting javadoc and module documentation Topic: Architecture Requests, Issues and Changes related to software architecture, programming patterns, etc. Category: Gameplay Content Requests, Issues and Changes targeting gameplay mechanics and content GSOC Multiplayer Affects aspects not visible in Singleplayer mode only labels Dec 18, 2015
@Cervator Cervator changed the title Physics-based combat system (resurrect old system?) Physics-based combat system (resurrect old system?) [$100] Dec 18, 2015
@0shine0
Copy link
Contributor

0shine0 commented Mar 22, 2017

Pinging @Cervator to discuss its potential in Gsoc and also about its implementation.

I am thinking about using the useful parts from the old branch to facilitate a new combat system. Should I make the system in a new module or make it in core module?

@portokaliu
Copy link
Contributor

Scavenging bits of the old system was always an idea, since the functionality seemed to be there. The only issue was that it used a really old version of the game and rooted itself in some core/engine classes, when it would most likely need to be a module.

@0shine0
Copy link
Contributor

0shine0 commented Mar 22, 2017

@portokaliu I am also thinking about introducing a density property for non-solid materials like water. To affect speed and motion of a projectile in water as compared to when in air.
Is it feasible performance wise?

@portokaliu
Copy link
Contributor

@0shine0 This was one of the ideas for the movement refactoring, but that only referred to the player. Suffice to say, I'm not against that concept

@0shine0
Copy link
Contributor

0shine0 commented Mar 22, 2017

@portokaliu alright, gonna try that with combat system.

@Cervator Cervator added this to the Alpha 8 milestone Sep 2, 2017
@Cervator
Copy link
Member Author

Cervator commented Sep 2, 2017

Closing this as completed as part of GSOC 2017, woo! New module https://github.com/Terasology/CombatSystem is the primary home for the new system, and has some sibling modules :-)

Thanks @0shine0 and mentors @portokaliu @niksoc @xrtariq2594 !

As usual there are plenty of additional areas that could still be worked on, maybe especially positional combat / damage, but that is for another day :-)

For a summary of work done see https://gist.github.com/0shine0/aba355bbc437b57b3c5d8aaeaa2a0296

Also, somebody should claim the bounty on top :D

@Cervator Cervator closed this as completed Sep 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Doc Requests, Issues and Changes targeting javadoc and module documentation Category: Gameplay Content Requests, Issues and Changes targeting gameplay mechanics and content Multiplayer Affects aspects not visible in Singleplayer mode only Topic: Architecture Requests, Issues and Changes related to software architecture, programming patterns, etc.
Projects
None yet
Development

No branches or pull requests

3 participants