Creating joystick for my computer

Hey, I have an arduino board Mega2560 and I also have a joystick module that connects to the arduino.
Easily enough, I was able to send the position of the stick to the computer through serial communication.
But I want to make something a bit different, I want to make my computer recognize the arduino port as a game controller and to send the information of the joystick's position to the game controller on the computer.

Does anybody know if such a thing is possible and if so, how to make this project?
Thanks from advance.

You can not do this simply with a Mega. You need a Leonardo, or a Micro to talk directly with the USB.

If your Mega uses the ATmega16U2 USB to TTL serial chip, it is possible to do but it's an advanced project:

It's definitely preferable to use a board with native USB such as the ones Grumpy_Mike recommended.