Teenage driver Youcef Adjerid allowed two friends at a party to car surf on his bonnet, then slammed on the brakes so they fell off, a court heard.
A trial scheduled to run for four days at Swindon Crown Court hear that Adjerid, 18, of Harford Close, Chippenham, picked up the friends from a Christmas party in his Fiat Punto. He denies a charge of dangerous driving.
The jury heard he first allowed Sam Riley to clamber onto the front of the car before driving down the road.
But he then slammed his foot on the brakes and laughed as Sam was thrown off the bonnet onto the floor, the court heard.
Former Sheldon School pupil Adjerid then repeated the prank with Toby Hearne, 17, who was dressed as a Christmas present, but managed to remain on his feet, it was said.
The stunt happened as Adjerid drove home from the party at Stanton St Quintin, near Chippenham, with his friends just after midnight on December 22, 2011.
Stewart Patterson, prosecuting, said: "As they were driving along they passed a group of four young men who were there walking along the road.
"There was a certain amount of ribbing and merriment but all in good nature.
"Sam Riley jumped on the bonnet of the car. The driver at that point should have stopped. He did not do that. He drove along for some distance before stopping.
"I'm not suggesting he drove fast but he drove along the road. He braked sharply in order to throw the person off the bonnet which the prosecution say is dangerous.
"Nobody was hurt by this driving but the prosecution say it was nevertheless dangerous.
"The law states that dangerous driving occurs if the way he drives falls far below what would be expected of a competent and careful driver and it would be obvious to a competent driver that driving in that way would be dangerous."
The court heard how Adjerid arrived late at the Christmas-themed fancy dress house party with friend Lewis Bennett in Stanton St Quintin.
He picked up friend Scott Lang and drove off as the party was ending, but came across four friends making their way home.
Two of the teeagers, Joe Bodman and Toby Hearne, were dressed as Christmas presents and walking with Hal Bailey and Sam Riley.
Passenger Lewis Berret told the jury how Sam climbed on to the bonnet of the car before Adjerid drove a few car lengths with him on top.
He said: "Youcef put the brake on and Sam fell off the bonnet. It was fairly sharply, I suppose.
"Sam fell off the front of the bonnet, but he picked himself up. He was fine, we were all just laughing."
Mr Patterson told the jury how the stunt was repeated with Toby, who managed not to fall off the car when Adjerid slammed on the brakes.
Adjerid is alleged to have driven at walking pace for around five metres each time.
Scott Lang, another passenger in the car, told the court: "They were only on the bonnet for a couple of seconds and then fell off and had a laugh.
"We had all had a couple of drinks. I did not think anything of it. We were all in high spirits, but not throwing up or anything stupid.''
He added that Adjerid had not accelerated when the friends were on his bonnet.
Alex Daymond, defending, told the court: "It was all a bit of a joke.
"No one was concerned about the safety of Sam and indeed Toby when he did it too. It was all a big joke."
The trial continues.