Jump to content
  • Advertisement
Kevin M

C++ C++ : 1st Person Melee Combat in

This topic is 465 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This game's 1st person mechanics really caught my eye.  

" rel="external">Mordhau Would anyone know the beginnings of the programming required for combo moves from the player?  I understand this is a general question and has a broad answer, but any advice from someone who has programmed something similar on the PC is appreciated. 

Note: I intend to start with the Unreal engine.  I am very early in C++ (I worked as a concept artist previously so all my game's UI/World mechanics have filled notebooks upon notebooks without programming to realize them).

This is my first post on this forum, please excuse me and notify me if I am posting in the incorrect area.  

Thank you

Share this post


Link to post
Share on other sites
Advertisement

To program combo moves, you'll probably need to start with a queue data structure: i.e. as the player presses buttons, you'll want to enqueue those key/button presses, along with a timestamps of when the key/button was pressed. That will allow you to evaluate whether or not the player entered a "do something cool" key combo, and if so, you can then kick off some action, such as the "animate the character doing something cool" animation.

Bear in mind, I've never used unreal engine, so I don't know the particulars of what do with it. But generally speaking, combo moves call for a queue.

Share this post


Link to post
Share on other sites

That article is a part of the solution. The article is about sending data around between systems.  Usually in games there is an event system that any code can listen to which says what has happened.  That's the system described.

Your combo system can be listening to the events described in that article.  When the combo system notices specific event patterns it is looking for, such as multiple hits in a row without a miss or a block or an enemy hit, then it can react as a combo.

Share this post


Link to post
Share on other sites

Thankyou all for your replies.  I'll go hit the books and hopefully after a while i'll have something for critique.

Share this post


Link to post
Share on other sites

  • 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!