TheCoderPal / terasoft-summer-reunited

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

K9. As a user, I should see pause screen if i am out of the range of kinect. #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The system should detect if the player is not detected by the kinect device by 
tracking the player's skeleton through the kinect sensor.

Original issue reported on code.google.com by khaled.osmaan on 25 Jul 2012 at 8:28

GoogleCodeExporter commented 9 years ago

Original comment by khaled.osmaan on 25 Jul 2012 at 8:50

GoogleCodeExporter commented 9 years ago

Original comment by khaled.osmaan on 2 Aug 2012 at 8:49

GoogleCodeExporter commented 9 years ago
this issue was updated by r41.
http://code.google.com/p/terasoft-summer-reunited/source/detail?r=41

Original comment by khaled.osmaan on 2 Aug 2012 at 8:51

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

Added class UserAvatar edited it to use the new Kinect class, removed unused 
methods, fixed some errors, the class determines the avatar which represents 
the distance between the user and the device which will help in showing the 
pause screen according to the avatar color code

Original comment by khaled.osmaan on 3 Aug 2012 at 10:13

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

Added the avatar textures

Original comment by khaled.osmaan on 3 Aug 2012 at 10:14

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

commented two lines which caused errors, waiting for tamer to make the variable 
skeletons public

Original comment by khaled.osmaan on 3 Aug 2012 at 10:19

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

uncommented kinect lines and integrated the avatar with class GameScreen

Original comment by khaled.osmaan on 3 Aug 2012 at 5:33

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

added field Avatar, to check if the user is detected or not, and accordingly 
pause the screen

Original comment by khaled.osmaan on 4 Aug 2012 at 12:05

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

Made field AllAvatars aswell to compare current avatar with the green avatar

Original comment by khaled.osmaan on 4 Aug 2012 at 12:12

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

Added the pausing part according to condition whether the user is detected or 
not to freeze the screen, show the pause screen and exit the pause screen, 
unfreeze the play screen if the user is back in range... 

Original comment by khaled.osmaan on 4 Aug 2012 at 12:13

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

Added class PauseScreen as a basic implementation of an empty screen with 
screenmanager attributes and calling super class methods, only fonts, textures 
or whatever left,as I still didn't decide what it would look like

Original comment by khaled.osmaan on 4 Aug 2012 at 12:22

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

commented calling the useravatar till its integrated with tamer's kinect class

Original comment by khaled.osmaan on 4 Aug 2012 at 9:09

GoogleCodeExporter commented 9 years ago
this issue was updated by r125
http://code.google.com/p/terasoft-summer-reunited/source/detail?r=125

Original comment by khaled.osmaan on 6 Aug 2012 at 9:16

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

Fixed the user avatar to work with tamer's new updates in class Kinect

Original comment by khaled.osmaan on 6 Aug 2012 at 11:54

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

Fixed freezing and unfreezing the screen back if user is not detected, working 
perfect now

Original comment by khaled.osmaan on 7 Aug 2012 at 12:59

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

Implemented the screen design

Original comment by khaled.osmaan on 7 Aug 2012 at 1:39

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

Added the pop up screen box texture

Original comment by khaled.osmaan on 7 Aug 2012 at 1:40

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

Updating content solution file

Original comment by khaled.osmaan on 7 Aug 2012 at 1:40

GoogleCodeExporter commented 9 years ago
Khaled,Can you please extract the part of showing that box with some text 
written in it in separate  class ? I want it generic to be used as part of 
library ,i need it to take vector2 position for position it will appear 
in,getters and setters for text inside it and getters and setters for colors 
used.Thanks

Original comment by hollaxy...@gmail.com on 14 Aug 2012 at 10:50

GoogleCodeExporter commented 9 years ago
Also because i will use it in gym screens

Original comment by hollaxy...@gmail.com on 14 Aug 2012 at 10:50

GoogleCodeExporter commented 9 years ago

Original comment by hollaxy...@gmail.com on 14 Aug 2012 at 11:53

GoogleCodeExporter commented 9 years ago
its in class pausescreen in its draw method, I can't make it generic because 
these calculations are made in the draw etod according to the text size, so in 
your case the text size will change according to the conversation and thus the 
message box size aswell, check them they're a few lines you can just copy them 
no need to make an abstract class

Original comment by khaled.osmaan on 15 Aug 2012 at 6:28

GoogleCodeExporter commented 9 years ago
PauseScreen:

1)you should have access modifier for instance variables 
2)PlayScreen.screenPaused == true ,remove true 

3)Constants in draw method should be removed and to be accessed from constants 

4)remove  public override void Remove() 
        { 
            base.Remove(); 
        } 
no need for it,not used 

5)How do you compare texture with texture in update method,this is very 
expensive operation. 

User avatar : 

1) Actually you have private Texture2D[] avatar;  
because you want private set and public get,you did :
  public Texture2D[] Avatar 
        { 
            get { return avatar; } 
        } 
However if you need so,write it in this way 
public Texture2D[] Avatar {get; private set;} and delete all above

2)LOL,Why you make an array and you need space for 1 item only ???          
           this.depth = new int[1]; 
            this.command = new String[1]; 
            avatar = new Texture2D[1]; 
            avatarPosition = new Vector2[1]; 

3) lol,avatar.length is 1 ,so why making loop ?? 
for (int i = 0; i < avatar.Length; i++) 
{ 
avatar[i] = allAvatars[0]; 
command[i] = ""; 
            } 
4)Update user takes as parameter int ID ,and here  

we are 1 user so why takes id ? 

5)Why having command line that will not show on  screen ? : 
command[ID] = "Player " + (ID + 1) + " : No  

player detected"; ,this should be removed 

6)First of all,GenerateDepth : have value 100  

what is that value stand for ? 

7)Actually if you need to check for null skeleton  

 then check by if condition not try and catch  

because exceptions make the program slower 

8)Actually you do not need to check for null in  

generate because you already checked it in update  

method if skeleton = null then you call update user which calls generateDepth

Original comment by hollaxy...@gmail.com on 15 Aug 2012 at 2:28

GoogleCodeExporter commented 9 years ago
Actually what you say is wrong,i said we will use it in another things,we will 
not duplicate codes.This is wrong,lol can not you make text as property with 
setter ?Please make it generic to be used by anyone want it.

Can not you see that i implemented bar and score generic ? and actually they 
will be going to be used once.However because they are vital things in every 
game i made it generic and therefore your code must be also generic.

Original comment by hollaxy...@gmail.com on 15 Aug 2012 at 8:43

GoogleCodeExporter commented 9 years ago
5) Not really because I already initialized them once and forall in the load 
content method so I'm basically just comparing two objects / public variables

userAvatar it was the old implementation I did for mechanect I used all these 
arrays because it was supposed to be able to detect 2 players too, but since we 
dont need that stuff I removed it and made it work temporarily and forgot to 
clean the code, its fixed

Original comment by khaled.osmaan on 17 Aug 2012 at 9:57