PARIS — In Fiscal Kombat, an online video game introduced this month by the presidential campaign of Jean-Luc Mélenchon, France’s far-left candidate, players shake down men in suits to put money into the public coffers, Robin Hood-style. It’s one way Mr. Mélenchon, 65, has been winning over young voters.

His campaign has been gaining steam not only because of his energized rallies — he sometimes beams in by hologram to address multiple cities at once — and his platform. He has also been far more web savvy than his rivals, running what may be France’s first viral campaign.

It’s a wild-card factor all the more potent and vital since neither he nor the centrist candidate Emmanuel Macron, the front-runner by a narrow margin, represents a traditional political party or has its infrastructure.

When French voters go to the polls on Sunday for the first round of elections, they will do so after a campaign that has moved beyond rallies and other traditional events and migrated online for the first time. With some polls showing as many as 30 percent of the voters still undecided, every vote will count — and so will every “like.”