Your thread title doesn't match the question you're asking below it. One is
Did cavalry in China use spears instead of swords?
and the other is, basically,
Why did Chinese generals use polearms when the samurai used swords?
First, China didn't even have cavalry until very late. No archaeological findings have supported the Chinese tradition that the minister Xi Zhong invented chariots for the Xia around the 21st century BC. They seem to have arrived in the 12th century BC during the late Shang, probably from nearby Indo-Europeans like the Tocharians. The Zhou used them to overthrow the Shang and overrun northern China, but the nobles who rode in them wore their full robes and shot arrows. A separate driver would move them into range and out of danger; when trouble was unavoidable, a third guy would ride along with a ge. This was a long pole with a dagger-shaped head, the idea being to reach over the chariot and use the force of a wide swing to puncture anyone who got too close to the chariot.
Chinese cavalry was only fitfully and badly used from the 5th century BC. It wasn't until 307 BC that Zhao Yong, posthumously known as the Wuling King of Zhao, got tired of losing to Qin, overruled his tradition-bound advisors, and forced his soldiers to wear pants and shoot from atop their horses in the style of the steppe barbarians on his northern border.
2nd, early Chinese cavalry were mounted archers, but their development coincided with the invention of crossbows. Chu began using units of crossbowmen in the Warring States Period; a Master Qin even invented a gravity-fed repeating crossbow for them, although it was too weak to kill without poison. Once the crossbow improved and spread, mounted archers (who couldn't possibly reload the devices) became less useful by comparison and were only used for hit-and-run tactics or for swift assaults against soft targets like supply lines.
3rd, the use of Chinese cavalry as shock troops ran into the development of massed pikemen. Cavalry could still be used for charging and slashing opposing light infantry and crossbowmen. (The idea of using continuous rotating fire to pin down cavalry isn't attested before the Song dynasty.) By Zhao Yong's time, though, the use of massed infantry had prompted some ancient Milo Minderbender to put a second point sticking out of the top of the ge's shaft, creating the ji (Chinese halberd), which allowed infantry units to stay closer together and stab their opponents instead of needing to fight loosely or expose their lower body to swing their weapons. Other units just carried plain spears without the ge dagger for the same purpose. (Spears were obviously known to the Chinese from the earliest times, but had previously just been used for hunting.) Ji and spears were both used like Swiss pikes in formations to keep cavalry at bay; the Chinese also started using wooden caltrops to take out the horse's feet.
Fourth, the early cavalry had no stirrups and lousy saddles. Hard blows were hard to do and the recoil from one could easily unhorse a rider. Instead of being able to do a cavalry charge with ji or spear used as lances, they mostly needed to ride up to (or charge into) the enemy line and then start swinging, with the horse more or less stopped in place or used separately to trample infantrymen. The obvious response eventually led to improved barding, especially protecting the horse's exposed neck. There are records of cavalry charges before the appearance of stirrups. They mostly involved the Chinese like Ma Chao or Gongsun Zan hiring steppe nomads who had been on horseback their entire lives. In the 3rd century BC, Chinese horsemen were supposed to be elites: highly trained, very tall, very strong. They fought in five-man units and had a 'general' over as little as 200 men. They were mostly used for recon, shoring up flanks, harrying an enemy's retreat, or cutting supply lines. When they were used as shock troops, they were aiming to scare the peasants into breaking formation. From horseback, they could use ji for reach but they assumed the horse would eventually be taken out. Once dismounted, outside a unit, it was easier for a gang of enemy soldiers to grab the pole's shaft. Dismounted, the cavalrymen used swords and shields from the 2nd century BC onward, as well as spears.
Fifth, China's horses sucked so badly that the Han Empire launched wars to get better mounts and close their cavalry gap with the steppe nomads. By the 4th century, with stirrups, saddles, and better horses, the Jin and subsequent dynasties had well-armored cataphracts and basically treated them like European knights.
In answer to your second question, 1st, China's Three Kingdoms (whose generals you're thinking about) and Japan's Three Kingdoms (whose samurai you're thinking about) were 1000+ years apart. Metallurgy and tactics changed.
2nd, polearms are better than swords most of the time and samurai used their yari as their primary weapon most of the time, once they stopped being used as mounted archers. They used swords when they lost their mounts or spears and needed something for close combat. Japan's lousy iron quality even meant their swords often broke on the armor of the Mongols who made it through the kamakazi typhoons.
3rd, the idea that the katana was the soul of the samurai developed first from how much work went into folding the steel to deal with the lousy quality of the metal but more because it could be worn daily as a mark of status, all the more important when the wars left plenty of samurai as broke ronin, homeless and horseless. Their katanas (and the training required by masters to close the distance with spearwielders) were romanticized by the Japanese and then got fetishized by Westerners who dug the Spartan appeal of bushido.
tl;dr: Your game isn't realistic. Everyone used spears/bows as primary weapons, and swords as close-in backups. The Chinese have just been more honest and mindful of it.