Skip to content

xli149/HCI-Final-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

HCI-Final-Project

My game is running on unity 2019.1.0f2. To be able to recreate the game, you have to dowload the affectiva SDK from Affective.com and also if the lobby or the fruit object are miss, you have to download "Network lobby" and "Fruits 3d package" from Asset store. After that you have to tag the fruits with happy, sad, angry,etc and add network identity. After that you have to drag them into the "Emoji Fruit" script whichi si in fruitpop prefeb under the "SampleScence" and drag them into "lobby manager" and insert them into "spawn info" part. And my game supports single player and multiplayer. After import the package of my game, check the build setting to see if there are two sences(Lobby and Samplescene) in the top block, and check if the lobby is on the top of the samplescene, and if any of them is missing, you can find them under "Asset" folder in the "Scene" folder and drag them in, and make sure the Lobby is on the top of the Samplescene. Also if the Lobby is missing in the hirechay, drag it into it and if the Samplescene is also in the hierachy, delete it, so in the hierachy, only the lobby is there. To play my game by single player mode, you can simply just click "play button", and then you will be able to click the button in the Game pane (if you did not see the lobby scene shows up, check if you are currently in scene pane, and if you are, then switch it to Game pane). Then simply click the pink button on the right of the first blank, above which showing "Match Maker" and "Create game" to get into the match maker room (actually, the two button below can also be clicked to create a connection between server to a local player, but since we are using the netwrok to support. the game on two different device, the first button is good enough to fullfil our requirements of playing my game). After clicking you will see a connecting sign, and after few seconds (depending your network situation), you will get in a room, then you can click the '+' buttion to add another player just to full the position so you can start the game. And after the game will begin, and you probably will see a sign pops up ask for camera permission, simply just click "yes", Then you will you will see "ready", "go" text fading out, and after that, you can start to play the game by facial expression mimicking and play the game by yourself. During the game, you sometimes you find the game stops and the fruits seem floating in the air, that is because I add a extral functionality on my game that if the camera cannot find the face, the game will pause and wait for the player to come back, adjust you position and face directly to the camera, the game shall start again. And also, at the beginning of the game, if the fruit did not get popped, it may because either the camera have not be fully setting up, or the value of your facial expression haven't reach the threshold yet. Simply just wait for a few seconds and try again or try to do the facial expression more exaggerate, the game will works fine

However, if you want to play the game by using multiplayer mode on different laptop, the procedure will be a little bit different. First, you have to stop running the unity if you are currently testing the single player mode. The click on the "File" button on Unity front bar and select "build and setting". After that an interface will pop up, the you have to check the Operatin System on the other laptop, and select the corresponding on the that interface. I have only tested my game on MacOS and Windows, it works fine so far on those two Operating System, so do not try to create the app of an android or ios version, or you may encounter with some unexpected errors. After that click the build button to build the a app of my game will can be used on window machine or Mac machine, and then if you like, you can also create another app that can be used on your current laptop, but if you do feel liking doing that, it is totally okay, you can just use the unity editor instead. Then use usb driver or send an email(which need compress first) to transfer the app to another laptop. And if you did it correct and successfully, you will be able to open that app on another machine. Then you have to pick a device as the server by clicking the create button just like playing the single player mode. After that, on the client side, click the "list server" button of color bule, and if the network connection works properly on both of your laptop, you should be able to see the server host on the client screen, and in this case, simply click join button to join the room, and at that time, on the server side, you will see another player shows up in that room, and after that, click the "join" button on each side of the two devices, if the network is working properly, the game shall begin. Then the camera may ask you for camera permission again, click "yes" and you will be able to play the game on both devices interactively. The only problem of the game is that due the fact that Unet which control the network connection is deprecated right now because they are working on a new version of networking, and the current network connection is only partially working that the server can talk to client but client cannot talk to server, so that you can see on the server side only the left side has fruits pop up, but on the client side both sides have fruits pop up and you will be able to also see what is happening on the server side. After that, enjoy the game and have fun!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors