It’s a course project at Carnegie Mellon University done by a group of 5 people. 1 sound designer, 2 artists, 2 programmers. We used Unity Engine and Photon. This project was done within 3 weeks.
Transrunner is a 2 player cooperative game to get all the stars on the map while we also keep a record of the clear time for each team and rank them on a scoreboard. Players would be able to play as a character that can transform into different animals. Each animal is unique. Humans can interact with several specific triggers. Horses run the fastest and could also step on the buttons. Birds can fly through the map and dolphins could swim into the water while all other animals could not.
As a gameplay programmer, I wrote the basic game flow logic and also used what Photon provided to do the synchronization between each client within one team. I also implemented all the animation and loaded all sounds for this game.
Challenge: Internet latency is my biggest challenge. Sometimes it will cause my game logic to break, and most of the time problems occur when two players trying to interact with the same object.
Solution: One specific problem is when two players trying to get the same star. Originally, my implementation was that when one player collides with the star, the star number for the whole team would do a plus 1, and the star for both the clients would be destroyed. However, this did not work well since because of the internet latency, the star on the other client’s map does not get destroyed fast enough. Thus the other player gets the same star and also performs a plus 1 action. This causes the two players to get two points but in reality, they are trying to get the same star. To solve this singleton problem. I wrote a shared file that each client would have to go to get the data with a bit of delay performed by me which is different for each client. And I put all the stars information in that file. So when one player hits a star, it will go to the same shared file to perform the logic, and if at the same time, the other client tries to do the same thing, they will see the same and updated file instead of performing the logic locally. Implemented this way, the problem is solved and no such problem appeared during the future tests and festival.