Jump to content
  • Advertisement
Kevin M

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!