This site requires JavaScript, please enable it in your browser!
Greenfoot back
Ryanmoss139
Ryanmoss139 wrote ...

2017/1/15

2 Player Scoreboard

Ryanmoss139 Ryanmoss139

2017/1/15

#
Hi, I have been searching high and low for how to create a 2 player scoreboard. Basically, what I am looking to do is create a scoreboard which displays the score of Player 1 and another to display Player 2's score. However, even when following the tutorial in Joy of Code I find myself running into errors. The game itself is very similar to pong. However, rather than the plain white paddles, I have an animated baby. I also have the ball. I know how to get the ball to register +1 to each score when the ball hits either side, but I cant seem to discover a way to have these scores displayed separately. I would be thankful if someone could please help me!
Super_Hippo Super_Hippo

2017/1/15

#
If you can show one score, you could see the way how it is done. (For example how the score was transferred to the Scoreboard class and how it was displayed.) Then you can try to do the same for the second score and maybe add it next to the other score. For further assist, you might show how you tried it.
danpost danpost

2017/1/15

#
Maybe my Value Display Tutorial might help.
Ryanmoss139 Ryanmoss139

2017/1/15

#
I will check out the tutorial and have a go at writing the code for one. I have now deleted the code that i wrote but if I run into further troubles I will let you guys know. I am writing the code now so I may return for help in an hour or so if you guys are around then. Thanks for the help!
You need to login to post a reply.