Chris Bosh and LeBron James of the Miami Heat laugh on the bench during a charity basketball game in Miami. (RHONA WISE/Reuters)

The Miami Heat’s Dwyane Wade, LeBron James and Chris Bosh took the court together for the first time since they lost in the NBA Finals in June, yet this wasn’t quite the return they had imagined. They weren’t even all on the same team.

About 36 hours before the expected cancelation of the first two weeks of the NBA regular season, 20 NBA players assembled for an extremely entertaining but thoroughly meaningless game calculated to cozy up to fans and demonstrate what they’ve said throughout the 31 / 2-month-old lockout: They just want to play.

“I think we’re all starved for basketball,” Bosh said. “I think everybody is.”

But was this NBA basketball? Team James took on Team Wade on a college court with 4,000 fans jammed into bleacher seating. An array of elegant moves to the basket were countered by a host of miserably misfired passes and shots.

Yet it turned into a thriller, sort of. With 2.0 seconds remaining, Carmelo Anthony launched a deep three to tie the score at 127, sending the game into overtime. Wade’s team, powered by 30 points from Anthony, 25 from Wade and 21 from Amare Stoudemire, eventually prevailed, 141-140, as James hit a three from midcourt at the buzzer.

Amare Stoudemire blocks a shot by the Miami Heat's LeBron James. (J Pat Carter/Associated Press)

Then he picked up a microphone and thanked those who showed up as the players huddled together at center court, posing for pictures.

“This was probably the most serious game of the whole summer,” said the Wizards’ John Wall, who scored 16 for Team Wade. “It wasn’t an all-star type of game, it was a real game. It was fun and excitement.”

With negotiations for a new collective bargaining agreement stalled and far more than the first two weeks of the season in jeopardy, players got a chance to burn off some of their nervous energy. And burn it they did. Wade looked positively furious near game’s end about a non-call from the referee, and when Anthony’s game-tying shot fell, players celebrated with something that looked like real joy.

But then the show folded up its tent and went home.

“As you can see, we want to be at work,” Anthony said. “You can see how competitive these guys are now. We’ll see what happens. Until [the lockout ends], we’ll keep putting these games on.”

Grinning, rowdy fans stood with their cellphones out, recording and roaring as the pre-game layup lines turned into impromptu dunking contests. They oohed and groaned at the ups and downs of the dressed-up playground basketball. James led all scorers with 34 points. Kevin Durant got 27.

The game featured glimpses of excellence, a few monstrous dunks (including a couple by Wall), behind-the-back wizardry, artistic alley-oops (James and Wade started and finished a few of those) and even some hard fouls. But mostly it felt like Mozart performing in some garage. The vibe was part all-star game (nine 2010 all-stars took part), part Harlem Globetrotters, part high school state championship.

Dwyane Wade slides past the Heat's Chris Bosh, left, to score during the second half. (J Pat Carter/Associated Press)

Owners and players met Tuesday in New York but abandoned talks after just four hours, with the sides far apart on the issues of splitting up revenue and reining in salaries with a hard cap. The players currently receive 57 percent of revenue counted as basketball related income. They told the owners Tuesday they would shrink that number to 53, but the owners want it no higher than 47. The owners also want a hard cap and the players do not.

“We can make sure we find a way to bring the game of basketball to our fans in some capacity,” Wade said. “I hope our fans understand there’s a business side of the game. It’s very unfortunate. We can’t control that. . . . We want to forget about where things is with the league [tonight].”

Players and owners are not only far apart on the issues, their public relations strategies since the lockout began June 30 have been diametrically opposed. While the league has demanded utter silence on the topic from its owners — Charlotte Bobcats owner Michael Jordan got fined $100,000 for commenting rather harmlessly on the lockout — players have executed a hands-on, nationwide marketing campaign.

The have gathered around the country for public pickup games like this one designed to warm up to the throngs they fear they will alienate beginning Monday. All the proceeds from this event went to a pair of charities.

The comedian Kevin Hart — who coached Wade’s team — strutted on the sideline with his hands on his hips, frowning, and chewing out his players. (As one player wandered down the bench, Hart shouted “Sit down and don’t give me no mouth about it! You won’t play!”) He and opposing coach Udonis Haslem clowned throughout, with Haslem at one point grabbing Hart and carrying him under this arm.

Before the game, James, Bosh and Wade met with reporters in front of a white board filled with math equations in a classroom set off one of the arena’s corridors.

“We just love the game of basketball,” James said. “We’ll play it any day, any time. That’s why we’re here tonight.