Need help with gravity simulation in 2D game engine

I’m writing a 2D game engine using C++ and SDL2 and started implementing a rigidbody component similar to that of unity to my gameobjects. I have a method in the rigidbody class called AddForce which takes a 2D vector force as a parameter and calculates the velocity vector using F = M*A, I use this function to move the character left and right using the keyboard arrows. Now my question is, how do I manage the gravity with this and how do I calculate the resultant force of the gravity and the force applied when pressing either keyboard arrows. Here is the rigidbody class.

#ifndef RIGIDBODY_H #define RIGIDBODY_H  //Game engine libraries #include "gameEngine/Game.h" #include "gameEngine/GameObject.h" #include "gameEngine/Component.h" #include "gameEngine/components/Transform.h"  //GlM library #include "glm/glm.hpp"  class RigidBody : public Component { private:     Transform* m_transfrom; private:     float m_mass;     float m_acceleration;     glm::vec2 m_forceApplied;     glm::vec2 m_velocity; private:     float m_deltaTime;  public:     RigidBody(float mass)     {         m_name = "RigidBody";         m_mass = mass;         m_acceleration = 0;         m_forceApplied = glm::vec2(0,0);         m_velocity = glm::vec2(0,0);      } public:      void AddForce(glm::vec2 force, float deltaTime)      {            float forceMagnitude;         m_deltaTime = deltaTime;         m_forceApplied = force;          forceMagnitude = glm::length(force);         m_acceleration = forceMagnitude / m_mass;       }      private:      glm::vec2 CalculateVelocity()      {          float velocityMagnitude;          static glm::vec2 newVelocity = glm::vec2(0,0);           velocityMagnitude = m_acceleration * m_deltaTime;           if(m_forceApplied.x != 0 || m_forceApplied.y != 0)              newVelocity = glm::normalize(m_forceApplied);          else            newVelocity = glm::vec2(0,0);           newVelocity = newVelocity * velocityMagnitude;           return newVelocity;       }   public:     void Initialize() override     {         m_transfrom = m_owner->GetComponent<Transform>("Transform");     }     void Update(Game instance, float deltaTime) override     {         m_velocity += CalculateVelocity();         m_transfrom->position.x += m_velocity.x * deltaTime;         m_transfrom->position.y += m_velocity.y * deltaTime;     }     void Render() override     {      }  };   #endif 

Engine and Networking question for a arpg/hack and slash game [closed]

I would like to develop an ARPG / Hack and Slash multiplayer game in the future. It’s supposed to be an isometric game. There should be several divisions so that players always encounter other players of the same level.

For example:

Division 5: Level 1-20

Division 4: 21-40

You should either come to a map through a server browser or, if none is selected via the browser, come across one randomly. Each map is the same size and looks only slightly different. At the edges of the map, the player should have the option of being ported to another map (to the edge of the map) through a hatch. The edge of the map is a safety zone.

My question would be: Which engine should I use? Unity, Unreal …

And what would be the best solution for networking? Dedicated server? ….

(The player should not be able to host their own server or create a lobby)

Unreal Engine 4 Animation Tutorials

I am trying to find a really good animation tutorial for Unreal Engine 4 that covers how to do things like have the character react to where objects are and what is happening like when falling, picking items up, uneven ground, and other more complicated aspects to animations in games. I mostly make shooters and have I think a good grasp of animation blueprints. I’ve looked all over for tutorials on YouTube and Udemy but all of them simply cover blend spaces, anim offsets, and the event graph and animation blueprint. I have all of this down and have created a fully fledged blueprint that works for a third person shooter, it looks decent but looks really basic and not dynamic. Here’s an example of what I want to learn to do: Example. It looks dynamic with things like the body bending as he runs, grabbing ledges, vaulting, and ragdoll physics when he fell into a truck. It all looks fluid and not like a bunch of free looping animations from the marketplace which is what my game looks like. The feel of a game I’m going for is something like Squad incase that helps with any answers but I mostly just want to learn more about animation in UE4 so if you could recommend a tutorial to help with this that would be awesome, thanks!

How one would go about making their own YouTube video recommendation engine? [closed]

I’m looking into the possibility of creating a website that would serve as an alternative to YouTube’s video recommendations, attempting to recreate the old experience of getting lost in YouTube before the algorithm drastically changed and became what it is today.

What are the hurdles that one has to go through when building such a project? How would one pull the necessary information to use? What is the common approach when building recommendation engines? Is it even allowed by Google?

Self-research was already done, yet no sufficient answers were found.

How to change Alt+Drag and Shift+Drag shortcut in Unreal Engine?

As a 3DS Max user, the ALT/SHIFT commands are reversed in Unreal, and for the life of me, I cannot easily switch between these differences. I always try to copy an asset by Shift+Click+Dragging it, and end up panning with it instead. The alt key is supposed to deselect, and instead it duplicates in Unreal.

I’ve looked everywhere in the General – Keyboard Shortcut settings and don’t see those keybinds.

Discover People by Phone Number – Should You Use a Reverse Phone Trace, Search Engine

The short answer is that converse telephone follow administrations or opposite mobile phone queries are the most effective of the three hunt techniques. At the point when you have to find somebody with their telephone number, the primary response is to go to the web crawlers and interpersonal interaction locales and either run name follow or number follow. Mobile Database Yet, in the event that you don’t have the foggiest idea, this is just about the most wasteful way to deal with attempt and discover individuals by telephone number. Most likely, the web indexes will run an extensive rundown of results, however the better piece of the rundown is excess with disconnected data you needn’t bother with. You will likewise need to know the name, epithet or number to follow the individual, As we as a whole know, not every person utilize their genuine names on these locales which actually makes scanning for the genuine character troublesome.

Utilizing open telephone indexes could likewise present challenges for your undertakings to discover individuals by telephone number. You have to initially characterize the sort of telephone numbers you are following. On the off chance that you are searching for proprietor data ashore lines, you will show signs of improvement results with the free open telephone catalogs as land lines are open space and thus naturally turns out to be free open data. Be that as it may, should you be looking for versatile number subtleties, you won’t get any outcome from open telephone indexes. This is basically because of the way that these are not arranged as free open data. To follow hand telephone numbers, you will require the opposite mobile phone queries.

So since you know the motivation behind why you have not been fruitful you would at long last understand that the best strategy is to utilize the converse telephone follow. The administration basically permits you to enter a number into the inquiry box and the framework will run a match with its database to create a full report for you on the hand telephone proprietor subtleties. Any legitimate assistance ought to have the option to give the necessary data in practically no time and not need to make you hang tight 24 hours for it. There is a little expense when you join the enrollment which actually costs not exactly a decent feast.