khaledosman / terasoft-12

Automatically exported from code.google.com/p/terasoft-12
0 stars 0 forks source link

0.15 "As a user I should see an avatar, which changes its color when the user moves towards the kinect device and changes to another color when the user moves back" #237

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The user should see an avatar which represents his distance from the kinect 
device...

Original issue reported on code.google.com by khaled.osmaan on 12 May 2012 at 8:50

GoogleCodeExporter commented 9 years ago

Original comment by khaled.osmaan on 12 May 2012 at 9:29

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r799.

Made a basic implementation for my class as a wpf application, added needed 
references, imports and stuff needed

Original comment by khaled.osmaan on 12 May 2012 at 9:44

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r838.

deleted my class since it was a wpf application and it had to be an xna class.

Original comment by khaled.osmaan on 14 May 2012 at 11:28

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r860.

Made a screen that shows both the Color Stream, Depth Stream and changes its 
pixel colors according to user's depth/distance from the kinect.... needs 
testing

Original comment by khaled.osmaan on 14 May 2012 at 5:48

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r926.

showing Color stream and updating it was laggy and had low fps so I decided to 
stick to what the story says, implemented the screen and its supposed to work 
as expected by the help of the newly implemented methods, UpdateUser, 
UpdateAvatar, GenerateDepth and ChangeTextureColor

Original comment by khaled.osmaan on 15 May 2012 at 3:55

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r927.

added documentation to my methods.

Original comment by khaled.osmaan on 15 May 2012 at 4:13

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r928.

removed unused imports and renamed class name to UserAvatarScreen instead of 
UserStream 

Original comment by khaled.osmaan on 15 May 2012 at 4:34

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r930.

updated class to handle multiple users, create an avatar for each and track his 
depth

Original comment by khaled.osmaan on 15 May 2012 at 5:08

GoogleCodeExporter commented 9 years ago

Original comment by khaled.osmaan on 15 May 2012 at 5:20

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r931.

updated method ChangeTextureColor to take string instead of color in its 
parameter so that I can actually change the RGB values of each pixel according 
to this value and not let the whole texture look like a colored square

Original comment by khaled.osmaan on 15 May 2012 at 5:38

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r932.

commited solution after adding a texture

Original comment by khaled.osmaan on 15 May 2012 at 5:42

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r948.

created int[] depth to store depth of each user and used it instead of 
calculating user's skeleton position each time

Original comment by khaled.osmaan on 16 May 2012 at 3:26

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r967.

Internet connection failed during last commit, recommiting

Original comment by khaled.osmaan on 16 May 2012 at 8:16

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1154.

changed some stuff in the implementation design

Original comment by khaled.osmaan on 19 May 2012 at 6:22

GoogleCodeExporter commented 9 years ago

Original comment by khaled.osmaan on 19 May 2012 at 7:41

GoogleCodeExporter commented 9 years ago

Original comment by khaled.osmaan on 20 May 2012 at 3:54

GoogleCodeExporter commented 9 years ago
when user gets out of range the avatar turns white and doesn't change color 
again to track another user if he gets back in

Original comment by khaled.osmaan on 21 May 2012 at 11:18

GoogleCodeExporter commented 9 years ago
My code should be moved in the common class GameScreen such that each screen 
shows the avatar and tracks its depth and changes the avatar color..

Original comment by khaled.osmaan on 21 May 2012 at 11:22

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1291.

Changed drawing the texture color pixel by pixel to drawing a texture2D for 
each color such that it only colors transparent part of the avatar and it looks 
way better... changed some class design issues and tested it, updated the class 
such that it works perfectly fine with 1 or two users, tracks and colors each 
of them separately\

Original comment by khaled.osmaan on 21 May 2012 at 7:54

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1293.

commited solution to add my textures

Original comment by khaled.osmaan on 21 May 2012 at 7:59

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1314.

Made UserAvatarScreen an object not a screen so that I can draw it in all the 
other screens calling its methods

Original comment by khaled.osmaan on 22 May 2012 at 11:28

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1315.

Integrated my avatar screen such that its drawn in all screens by calling the 
base methods of class GameScreen

Original comment by khaled.osmaan on 22 May 2012 at 11:29

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1316.

commited my avatar textures for some reason they weren't on the repository

Original comment by khaled.osmaan on 22 May 2012 at 1:05

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1317.

added a try and catch statement in class GameScreen to show why this exception 
could happen and how to solve it to other developers since its a common class 
which all screens use... super class methods have to be called in their own 
class to load the avatar

Original comment by khaled.osmaan on 22 May 2012 at 1:12

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1326.

removed MKinect from constructor and let the kinect be initialized to the 
kinect field in class User 
Update issue 36 
added screenName to class InstructionsScreen3

Original comment by khaled.osmaan on 22 May 2012 at 7:08

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1327.

uncommented thrown exception if other screens doesn't call super class methods

Original comment by khaled.osmaan on 22 May 2012 at 7:29

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1328.

added bool isTwoPlayer to draw and track two avatars instead of one if needed 
for experiment 1 or any other screen

Original comment by khaled.osmaan on 22 May 2012 at 7:46

GoogleCodeExporter commented 9 years ago

Original comment by khaled.osmaan on 22 May 2012 at 9:55

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1349.

added a bool flag showAvatar that if set to false the avatar that tracks depth 
and changes color won't be drawn/updated

Original comment by khaled.osmaan on 22 May 2012 at 10:25

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1352.

changed avatar positions and removed an old documentation of a deleted method

Original comment by khaled.osmaan on 22 May 2012 at 10:43

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1353.

integrated my work with Experiment3 by making it calling super class methods by 
adding base.load and base.draw

Original comment by khaled.osmaan on 22 May 2012 at 10:44

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1354.

added a boolean flag isTwoPlayers to draw 2 avatar's instead of 1 if set to true

Original comment by khaled.osmaan on 22 May 2012 at 10:47

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1383.

status inProgress
Renamed class to UserAvatar, removed drawing "You're standing at" + player's 
depth and "no player detected" messages, the 2 avatar's screen was a little bit 
laggy when tracking one player only before the second get in range at the 
beginning, I fixed it and increased performance, reordered methods, changed 
positions of player1 and player2, player1 to top right player2 top left..

Original comment by khaled.osmaan on 23 May 2012 at 10:01

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1385.

commited solution file after renaming class from UserAvatarScreen to UserAvatar

Original comment by khaled.osmaan on 23 May 2012 at 10:05

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1386.

deleted class UserAvatarScreen from Screens folder since it was renamed to 
UserAvatar

Original comment by khaled.osmaan on 23 May 2012 at 10:07

GoogleCodeExporter commented 9 years ago
Tested it with 1 player, two players both modes and worked perfectly fine... it 
lagged a little bit when only 1 user was detected in a 2 players screen until 
the second user arrives whether the second user stays or leaves again... I 
fixed it above and it works perfectly fine, i'm awesome :P

Original comment by khaled.osmaan on 23 May 2012 at 10:09

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1389.

Moved class UserAvatar to Common folder and to Mechanect.Common namespace since 
its not a screen anymore

Original comment by khaled.osmaan on 23 May 2012 at 10:16

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1391.

Commiting solution file

Original comment by khaled.osmaan on 23 May 2012 at 10:17

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1392.

deleting class UserAvatar from Screens folder

Original comment by khaled.osmaan on 23 May 2012 at 10:19

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1416.

edited documentation and added a region for my old methods that was used in the 
previous class design that I don't use any more since I didn't want to delete 
them.

Original comment by khaled.osmaan on 23 May 2012 at 12:10

GoogleCodeExporter commented 9 years ago
Class UserAvatar

"LoadContent will be called only once before drawing and its the place to load 
all of your content."
it's not its.

"Takes player index in the array and updates his distance from the kinect 
device, and adds a message to be printed if not detected or too far away."
"player index in the array and updates his" Who is he? Do you mean "the 
player's index"? Also "to be printed if not detected or too far away." lacks a 
subject.

"The user's index in users array."
"the users array"?

Some methods lack documentation (constructors and Initialize() for example) and 
please leave a space between the /// and the tag or text after it. You did not 
leave this space in most author tags.

Original comment by ams.sa...@gmail.com on 23 May 2012 at 12:31

GoogleCodeExporter commented 9 years ago
showAvatar shouldn't be initialized in the fields area, should be intialized by 
the GameScreen. It should be set in the initialize method.

Don't throw an unhandled exception.

userAvatar should be private, use property if you need to access it somewhere 
else

decale variables inside user avatar as private

move user avatar to the UI library

don't take UI parameters in the constructor (like spriteBatch)

don't write what's in the 1st constructor again in the 2nd.. look at this 
example
class foo {     
public foo(){}
public foo(string s ) { }
public foo (string s1, string s2) : this(s1) {....}
} 

for (int i = 0; i < avatar.Length; i++)
            {
                avatar[i] = content.Load<Texture2D>(@"Textures/avatar-dead");
            }
don't load the same content more than once.(ex. texture = content.Load(bla); 
then let all your avatars reference this texture)

use parantheses around arithmatic operations

Load all the textures that will be needed inside LoadContent. There are some

Original comment by q3a...@gmail.com on 23 May 2012 at 1:13

GoogleCodeExporter commented 9 years ago
remove unused usings

Original comment by q3a...@gmail.com on 23 May 2012 at 1:14

GoogleCodeExporter commented 9 years ago
forgot to change status to in-Progress... lol.....

Original comment by khaled.osmaan on 23 May 2012 at 1:16

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1447.

Moved the avatar a little to the right

Original comment by khaled.osmaan on 23 May 2012 at 3:02

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1470.

fixed implementation design and documentation as requested by reviewers

Original comment by khaled.osmaan on 23 May 2012 at 4:55

GoogleCodeExporter commented 9 years ago
The exception will be thrown either way because others don't call the super 
class methods, I've thrown this exception with the shown message to let them 
know what the problem is and how to fix it, I'll remove it when they fix their 
stuff
I can't remove the UI components from the constructor cause since then I'll 
have to take them from the screenManager class and my class won't be abstract 
or usable in library as it should be anymore, will currently move my class to 
library

Original comment by khaled.osmaan on 23 May 2012 at 4:58

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1497.

uncommented line spriteBatch.DrawString(font, command[i],new Vector2(100, 420 + 
100 * i), Color.OrangeRed); to print notification message if user gets in range 
then gets out again

Original comment by khaled.osmaan on 23 May 2012 at 7:05

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1528.

commented the line that draws the notification since the user should understand 
the color code instead

Original comment by khaled.osmaan on 23 May 2012 at 9:07

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1609.

Integrated my work with exp1 by letting them call super class methods and set 
flag isTwoPlayers = true;

Original comment by khaled.osmaan on 24 May 2012 at 7:17