Brookke / SEPR-Assessment2

1 stars 6 forks source link

Item/Clue assets #95

Closed Brookke closed 7 years ago

Brookke commented 7 years ago

For the clues, some clues are more specific like big foot print vs small foot print, because of this should I have a abstractClue then each clue based of of that?

Brookke commented 7 years ago

Or should all clues have a true or false property, e.g. This is a big foot print (true) This is a small foot print (false), I found a Dark hair (true) I found a blond hair (false)

jasonmash commented 7 years ago

Probably not, adding an AbstractClue class is adding complexity that would be good to avoid.

Why couldn't you initialise two completely separate clues for big footprint and little footprint?

Brookke commented 7 years ago

That could be done, how do we link that to the killer and other NPC's?

jasonmash commented 7 years ago

You'd link one or the other to an NPC in this instance. That doesn't seem that elegant though.

What properties will a Clue have? And will a NPC have a Clue, or will they have an attribute that a clue points to?

Brookke commented 7 years ago

So the initial idea was that you would construct the clues from whoever the killer was (via their attributes)

Brookke commented 7 years ago

another idea was that we would give every NPC a list of clues, (the same clue could be given to many NPC's) I think this idea might be best in this case

Brookke commented 7 years ago

Not sure how that would work with things like having a pen and paper to give to a person to write with

jasonmash commented 7 years ago

Yeah, I think your second idea is better. How and where would you initialize clues and assign them to NPCs in that case?

Let's ignore the pen and paper for now, I think it's an exception and probably doesn't fit the standard model for a clue.

Brookke commented 7 years ago

@jasonmash in the gameMain, where the NPC's are currently being initialised ( could eventually be moved into its own class)

jasonmash commented 7 years ago

Okay, but how would you go about it? E.g. would you have a list of clue variables in GameMain? then add a bunch of those variables to each of the NPC variables?

Brookke commented 7 years ago

Just realised that this will cause issues with the dialogue, as if we give them a list of clues we will go to a NPC and check if they have the clue we have in their list of clues, but then how does that work with dialogue which is clue specific and stored in a JSON file?

jasonmash commented 7 years ago

Could Clues have a list of applicable NPCs?

Brookke commented 7 years ago

Hmmm actually,

e.g. (this relates to #89 )


{
   "BigShoe": "Sorry My feet are a little smaller than that",
   "SmallShoe": "That does look similar to my foot size",
   "Glasses": "I do wear glasses yes",
   "Lipstick": "Haha no I don't wear lipstick" 
}
jasonmash commented 7 years ago

Yeah I like the sound of that. Extending your JSON a bit more, we could have something like this:

{
   "BigShoe": {
       "Nice": {
               "Yes": "Yeah, they're about that size, thanks for asking!",
               "No": "Sorry My feet are a little smaller than that",
       },
       "Neutral": {...}
       "Harsh": {...}
   },
   "SmallShoe":  ...
}
jasonmash commented 7 years ago

Going with this approach, what are the properties of the Clue class?

Brookke commented 7 years ago

With that we don't need the no response, the NPC's will always have either big or small shoes, so when we return the dialogue we only need to return a specific one to that item for example Colin has small Feet his JSON looks like this

{
   "BigShoe": "Sorry My feet are a little smaller than that",
   "SmallShoe": "That does look similar to my foot size",
   "Glasses": "I do wear glasses yes",
   "Lipstick": "Haha no I don't wear lipstick" 
}

so if shown a photo of big feet he will return Sorry My feet are a little smaller than that

jasonmash commented 7 years ago

Ohhh, I get what you're saying now! That JSON is for a specific NPC, rather than for everyone.

It would probably make sense to load NPC data from a JSON file if we're doing it this way - so how could we differentiate between a clue an NPC has, and one it doesn't assuming it has dialogue for all of them?

Brookke commented 7 years ago

the NPC could have a property of personality they best respond to (Neutral, harsh or Nice)

e.g. colin has personality Nice Json file like this

{
   "BigShoe": "Sorry My feet are a little smaller than that",
   "SmallShoe": "That does look similar to my foot size",
   "Glasses": "I do wear glasses yes",
   "Lipstick": "Haha no I don't wear lipstick" 
   "noneResponses": [
        "Sorry I am a little busy for questions right now",
        "And why do you think I would help you",
        "I am not telling you"
    ]
}

Player asks question about big feet nicely colin returns "Sorry My feet are a little smaller than that"

Player asks question about big feet neutrally colin returns one of the none responses e.g. "I am not telling you"

Player asks question about big feet harshly colin returns "And why do you think I would help you"

jasonmash commented 7 years ago

Okay that makes sense. What's the process for getting dialogue when the Player asks about a clue the NPC has? So the answer is Yes, rather than no like in your cases. Surely the nice, neutral and harsh responses come into play then?

Brookke commented 7 years ago

so e.g. 2

Player asks question about small feet nicely colin returns "That does look similar to my foot size"

Player asks question about small feet neutrally colin returns one of the none responses e.g. "I am not telling you"

Player asks question about small feet harshly colin returns "And why do you think I would help you"

jasonmash commented 7 years ago

Yeah, so the JSON defines the character's response, I understand now. Okay, another question, how does the code know which clues relate to which characters?

Brookke commented 7 years ago

so each NPC will have a list of clues relating to them, this means that when the game selects a killer all we have to do is take that list and distribute it out to the rooms, plus any non clues (clues that don't do anything or provide any clear hints yet, this makes it so that we have ten clues and some of them e.g. pen and paper could be used in the future)

beno11224 commented 7 years ago

personally since all this JSON is hand-crafted, I assumed we wouldnt need BOTH big and small feet for each character - the characters feet size dont change throughout the game and its not in our brief that they should change inbetween games. We just have the nice neutral and harsh responses for each question, but they will only ever answer yes or no, not either one if that makes sense?

beno11224 commented 7 years ago

(also sorry would have commented on here earlier but didnt see it)

Brookke commented 7 years ago

@beno11224 so we need a response for if we ask them about big feet (even if the NPC doesn't have big feet) so in this case it would be "Sorry My feet are a little smaller than that"

jasonmash commented 7 years ago

I wonder if we should define NPCs in JSON like so, rather than in code. That way we get the applicable clues and responses contained in one file, should be easier to maintain then fiddling with both code and JSON.

{
  "name":"Colin",
  "clues": ["BigFeet", "Glasses"],
  "personality":"Nice",
  "responses": {
    "BigShoe": "Sorry My feet are a little smaller than that",
    "SmallShoe": "That does look similar to my foot size",
    "Glasses": "I do wear glasses yes",
    "Lipstick": "Haha no I don't wear lipstick" 
    "noneResponses": [
        "Sorry I am a little busy for questions right now",
        "And why do you think I would help you",
        "I am not telling you"
    ]
  }
}
jasonmash commented 7 years ago

@beno11224 What are you asking? I'm struggling to understand your question

Brookke commented 7 years ago

@jasonmash that is great, only thing is how do we add the clues as they will be java objects

ps I updated you comment and added a personality

jasonmash commented 7 years ago

Hmm, good question. My thought process so far is when parsing the NPC JSON files, we'll want to:

Does that sound alright?

beno11224 commented 7 years ago

I like what Jason was saying about all of the NPCs in JSON files. and i was trying to say, for example: Colin will only ever have big feet, not small feet, so we dont need to worry about giving him an answer for small feet

Brookke commented 7 years ago

@beno11224 we would unfortunately as if the player shows the NPC a small foot print, we need a response, I think the current proposal is this

{
  "name":"Colin",
  "clues": ["BigFeet", "Glasses"],
  "personality":"Nice",
  "responses": {
    "BigShoe": "Sorry My feet are a little smaller than that",
    "SmallShoe": "That does look similar to my foot size",
    "Glasses": "I do wear glasses yes",
    "Lipstick": "Haha no I don't wear lipstick" 
    "noneResponses": [
        "Sorry I am a little busy for questions right now",
        "And why do you think I would help you",
        "I am not telling you"
    ]
  }
}
beno11224 commented 7 years ago

ok, shoe size is a bad example - i feel like it might be easier to code if we engineer that differently, otherwise i cant make it generic. but for like lipstick, its either wears it or doesnt wear it, we only need one (i now assume you were also thingking that though?) could we change shoes to shoes with heel or something?

Brookke commented 7 years ago

does making it generic have any advantage?

Brookke commented 7 years ago

currently we are treating big shoes and small shoes as two separate clues

beno11224 commented 7 years ago

making it generic makes it soooooo much easier to code, if i do it per question it will make the code over 10X bigger... if i do it with the other specific clues so u can see what i mean then add in shoes later? will do some of this tomorrow morning but im out tomorrow afternoon/evening

Brookke commented 7 years ago

it doesn't though, for example a easy way to do it would be

function query(clue) This simply gets the name of the clue, looks it up in the JSON then returns the associated response

e.g. with the JSON

{
  "name":"Colin",
  "clues": ["BigFeet", "Glasses"],
  "personality":"Nice",
  "responses": {
    "BigShoe": "Sorry My feet are a little smaller than that",
    "SmallShoe": "That does look similar to my foot size",
    "Glasses": "I do wear glasses yes",
    "Lipstick": "Haha no I don't wear lipstick" 
    "noneResponses": [
        "Sorry I am a little busy for questions right now",
        "And why do you think I would help you",
        "I am not telling you"
    ]
  }
}

query(glasses)

"I do wear glasses yes"

beno11224 commented 7 years ago

hm guess so... also did anyone reply to the question about do we have a sort of inventory thing yet? if not can we decide names and what it will return so i can put it into the code?

Brookke commented 7 years ago

@beno11224 I would assume the inventory would just be a collection of clues? @joeShuff ? current thinking is that when you want to ask a question you call question(clue) then that goes clue.getName() and looks the name up in the JSON to find the correct response for that NPC dependant on how the question has been asked (nice harsh etc)

beno11224 commented 7 years ago

ok, well ill do this tomorrow then :)

joeShuff commented 7 years ago

This seems to have spiralled to solving the dialog side of clues. The clues is what I was planning on working on after we've merged my current branch. But just the stuff with placing them in the rooms and interacting with them. I'll have a proper read through all of this at another time but it's looking good. Getting abit excessive in some places, remember we have about a month... Maybe less.

Brookke commented 7 years ago

Yeah it has, I will work on the clue class a little then and structure it so that it'll work with dialogue if you want, and you can sort out placing them in rooms