Challenge Overview
Challenge Overview
In this challenge, we will add online collaborative feature(similar as http://mural.ly) in Unity3D
Challenge Task
Server(NodeJS)
to update existing nodejs app
1.refactor the server to make it room based(to broadcast in a room, instead of globally), the client will use the test room id 1
a room(we only need a room id here) could have several boards(we only need a board id here), each board contains several notes
basic attribute of a Note:
text: content of the note
x: pos.x on the board
y: pos.y on the board
width: width of the note
height: height of the node
font: the font
fontSize: the font size
fontHeight: if positive, it is a 3D font with height
color: font color
bgcolor: background color
textAlign: left/center/right
verticalAlign: vertical align of text, top/middle/bottom
user: the user that created the note, an email address
2.data synchronization:
1) when a player enter the room, send all the boards and notes
(the client know where the board if given the board id)
2) broadcast operation to all clients :
1> add a note on a board
2> delete a note on a board (check if the note exists)
3> update attribute (check if the note exists)
Client(Unity3D)
to update existing unity3d app
in the demo, we will have 1 room containing 2 boards (on different walls)
1. draw the boards and notes after entering room, prompt user for an email to identify themselves
2. note operations
1) add note
double click on the board, to add blank note(with default attributes set) at the spot
send "addNote(boardId, note)" request to the server, the server will assign a unique id for the note and broadcast to all the clients in the room
after receving the "onAddNote(boardId, note)" message, display the note in on the board
we need to track the author of notes and only themselves will be able to tweak/modify/delete the note
2) delete note
click on the note(highlight the border or use other effect to mark it as selected), drag it out the board(no interaction between the note rect and the board rect)
send "deleteNote(noteId)" request to the server, if the note exists, delete it, broadcast to all the other clients in the room
after receiving the "onDeleteNote(boardId, noteId)" message, remove the note from the board
3) there will be a toolbar in the top to edit the attributes(except x,y,width,height,text) of the current selected note
dynamical refresh the note on the board when attribte is changed
send "editNote(boarId, note)" request to the server, if the note exists, if will broadcast to all the other clients in the room
after receiving the "onEditNote(boardId, note)", refresh the note on the board
4) double click a note to edit the text of the note, send "editNote" request as 3), the updated attribute is "text"
5) move the note
click on the note, drag to move to some position and drop, send "editNote" request as 3), the updated attributes are "x" and "y"
6) resize the note
click on the note, there will be a resize mark in the right bottom corner, drag the mark to resize, afte release, send "editNote" request as 3), the updated attributes are "width" and "height"
Final Submission Guidelines
- The backend will need to be persistent - cloudant would be preferred
- The Unity3D source code that covers all the requirements.
- A complete and detailed deployment documented explaining how to deploy and verify the app including configuration information.
- No other 3rd party libs are needed in this challenge
- It should work under both Windows and Mac, and could run in unity web player too