Mittens 2017 is likely to be in Iceland in July. Check out the thread for details!

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.


Messages - Snarky

Pages: [1] 2 3 ... 244
1
Code: Adventure Game Studio
  1. #define TRIGGER_REGION 3 // whatever number that region has
  2.  
  3. function repeatedly_execute()
  4. {
  5.   if(Region.GetAtRoomXY(walkingCharacter.X, walkingCharacter.Y) == region[TRIGGER_REGION] && Game.DoOnceOnly("Reached point B"))
  6.   {
  7.     // do stuff
  8.   }
  9. }
  10.  

2
AGS Games in Production / Re: Moonchild
« on: Yesterday at 22:06 »
It's not that I don't like the visuals. They're fine for the most part. But there are some odd things about them that (along with the fact that you're not understanding what I'm talking about) makes me think you may have misunderstood a few things about graphics, rather than doing it for a good reason.

Simple version: You're making a high-resolution game (1280x720) using low-resolution graphics, or using some sort of filter or Photoshop process to give it a low-resolution "look". Instead, why not just make a low-resolution game? That way, your 2GB game would be more like 150 MB (assuming graphics are the bulk of the game size), among other benefits.

Your dissecting a screenshot which was scaled down from its original size just for posting, I think I scaled it down 75% with "preserve hard edges" setting so the text wouldn't blur.

This doesn't affect the point I'm making.

People can see what the game-in-progress looks like in the video, running in a window at it's native resolution of 1280x720 on my desktop.

Given that the video is only available in 720p and it's showing the game running in a window, you realize that it's still scaled down in the video, right? (Actually even smaller than in the images.)

3
You repeated it twice, but I still don't know exactly what you mean by "related to her family"; is it in any way different from "a relative"?

For the two others: no, but "husband's sibling" would be an example of a relationship where I think it's ambiguous whether it counts as a relative of hers.

4
Case #10
In the middle of the night, a mother sneaks into the bedroom where her son is sleeping and kills him.

(Explain the reasons and circumstances for what happened.)

Did she have money trouble and want to kill one of her parents to get the heritage but forgot that her son sometimes sleeps in grandma's/grandpa's bed?

(wrong)

Yes
Was her son a child? (younger than, say, 13 years old)
Is the killing intentional? [But...]
Did the son look somehow like the man she intended to kill? ["Somehow" – see next question]
Was her son completely under the blanket when she killed him? [Sure, that works]
Did she already intend to kill a person before she entered the room?
Was the mother in her right mind when she did it?
Did she kill him with a knife?
Is the bedroom in the house they live in?
Would it have ended differently in bright daylight? [I don't think it could have happened in broad daylight]
Did she want to kill a human?
Did she hope to accomplish something else than getting rid of the person with the murder (e.g. inheritance, to make an event happen...)?
Had she planned a "home invasion gone wrong"? [Something like that]


No
Did she turn herself in? [Doesn't really matter, but let's say no]
Does the son have an incurable disease?  (Is this a case of euthanasia?)
Does the mother realise that she's killed her son? [Not right away]
Did she know she would kill her son before she did it?
Did she think it was her husband?
Is the murder weapon relevant to this case? [Not particularly]
Had the mother taken any drugs? [Not to the point where it's relevant to the case]
Had the mother had any alcohol? [Ditto]
Had the mother inhaled any chemicals? [Ditto]
Does the mother have any mental illness? [Open to interpretation, but it was not an act of pure insanity]
Did she shoot him?
Did she suffocate him? [No, let's go with the knife]
Did she think it was an intruder / burglar?
Was it the son's bedroom she sneaked into?
Was it the parents' bedroom she sneaked into?
Did she want to kill her husband?
Is the killing an act of mercy, saving the victim from a much worse fate? (for instance certain starvation or a nuclear apocalypse)
Was the mother sleep-walking?
Were they the only people in the house at the time?
Was the mother blind?
Were her own parents in the home?
Were her husband's parents in the home?
Was she trying to kill her father/mother in law to inherit something?


Irrelevant
Were they religious?
Did they have a pet?


Ambiguous
Did she plan the murder for a longer time? [Yes and – at least in my mind – no, depending on exactly what you mean]
Was the person she wanted to kill a relative? [Depends on how you define a relative]

5
AGS Games in Production / Re: Moonchild
« on: Yesterday at 18:47 »
I'm not sure you're understanding me, or maybe it's vice versa.

My overall point is that the graphics seem (for the most part) to be in roughly 320x200 resolution, or even lower, even though you're making the game in 1280x720. So why not just make the game in 320x200? Or if what you're aiming for is a 1280x720 look, what the hell are you doing to the graphics to make them so blocky?

For example, here's your first screenshot scaled down to 320x180 (and then scaled up again to 640x360 using nearest-neighbor, just for the sake of displaying in the browser):



Apart from the blurry text (which is just from resizing), this is more or less the "look" of your 1280x720 game. So if you're worried about the game size, memory and all that, you could just make it in 320x200 (or 320x180), cutting it down to a quarter sixteenth [I forgot to square the fraction] of the size, and still have it look the same.

Here's one small part of your version of the same screenshot (where the moon meets the rock on the left), examined at very high magnification with a pixel grid:



You can see that the moon is made out of "blocks" of pixels. Typically 4x4, but sometimes 3x3, 3x4 or 4x3. The variation could be from when you shrank the image down from 1280x720 to 960x540; in any case the blocks are about 3.75 pixels on average in this picture. Which means that the moon part of the background really only uses a 256x192 pixel resolution (960x540 /3.75).

The blocks on the rock seem to be a bit smaller (2x2 pixels in some places, more in others), but it's hard to work out the exact ratio. Anyway, the effective resolution is certainly not 1280x720!

But then on top of that you have dither, which seems to be at 960x540 resolution. I'm not sure where it comes from, and whether it's part of the in-game graphics.

All of these inconsistencies and the weirdness makes it look IMO worse than the 320x180 version; it's like you're "faking" low resolution and getting it wrong.

6
Case #10
In the middle of the night, a mother sneaks into the bedroom where her son is sleeping and kills him.

(Explain the reasons and circumstances for what happened.)
OK, I think you've figured out that she stabbed her son by mistake, thinking it was someone else, in someone else's bedroom. You still need to figure out who she intended to kill, why, and why the son was in that bed (though that part isn't so important).

Yes
Was her son a child? (younger than, say, 13 years old)
Is the killing intentional? [But...]
Did the son look somehow like the man she intended to kill? ["Somehow" – see next question]
Was her son completely under the blanket when she killed him? [Sure, that works]
Did she already intend to kill a person before she entered the room?
Was the mother in her right mind when she did it?
Did she kill him with a knife?
Is the bedroom in the house they live in?
Would it have ended differently in bright daylight? [I don't think it could have happened in broad daylight]
Did she want to kill a human?
Did she hope to accomplish something else than getting rid of the person with the murder (e.g. inheritance, to make an event happen...)?


No
Did she turn herself in? [Doesn't really matter, but let's say no]
Does the son have an incurable disease?  (Is this a case of euthanasia?)
Does the mother realise that she's killed her son? [Not right away]
Did she know she would kill her son before she did it?
Did she think it was her husband?
Is the murder weapon relevant to this case? [Not particularly]
Had the mother taken any drugs? [Not to the point where it's relevant to the case]
Had the mother had any alcohol? [Ditto]
Had the mother inhaled any chemicals? [Ditto]
Does the mother have any mental illness? [Open to interpretation, but it was not an act of pure insanity]
Did she shoot him?
Did she suffocate him? [No, let's go with the knife]
Did she think it was an intruder / burglar?
Was it the son's bedroom she sneaked into?
Was it the parents' bedroom she sneaked into?
Did she want to kill her husband?
Is the killing an act of mercy, saving the victim from a much worse fate? (for instance certain starvation or a nuclear apocalypse)
Was the mother sleep-walking?
Were they the only people in the house at the time?
Was the mother blind?


Irrelevant
Were they religious?
Did they have a pet?


Ambiguous
Did she plan the murder for a longer time? [Yes and – at least in my mind – no, depending on exactly what you mean]

7
AGS Games in Production / Re: Moonchild
« on: Yesterday at 15:08 »
I feel like we maybe discussed this for your other game, but I can't find any reference to it now... Is there some reason why you're downsampling and then upscaling the graphics for the game, instead of either using graphics in the game's 1280x720 resolution, or making the game in low-res if that's the look you want? It looks a little odd this way...

8
(Tabby's question just made me realise the ambiguity of "the bedroom he was sleeping in")

;)

There is also some other important background context about these people that you haven't caught a whiff of yet.

She planned to kill her husband while he was sleeping but didn't know that their son had had a nightmare or something and had crawled into bed with Daddy and she stabbed the son by accident?

(wrong)

Case #10
In the middle of the night, a mother sneaks into the bedroom where her son is sleeping and kills him.

(Explain the reasons and circumstances for what happened.)
Yes
Was her son a child? (younger than, say, 13 years old)
Is the killing intentional? [But...]
Did the son look somehow like the man she intended to kill? ["Somehow" – see next question]
Was her son completely under the blanket when she killed him? [Sure, that works]
Did she already intend to kill a person before she entered the room?
Was the mother in her right mind when she did it?
Did she kill him with a knife?
Is the bedroom in the house they live in?


No
Did she turn herself in? [Doesn't really matter, but let's say no]
Does the son have an incurable disease?  (Is this a case of euthanasia?)
Does the mother realise that she's killed her son? [Not right away]
Did she know she would kill her son before she did it?
Did she think it was her husband?
Is the murder weapon relevant to this case? [Not particularly]
Had the mother taken any drugs? [Not to the point where it's relevant to the case]
Had the mother had any alcohol? [Ditto]
Had the mother inhaled any chemicals? [Ditto]
Does the mother have any mental illness? [Open to interpretation, but it was not an act of pure insanity]
Did she shoot him?
Did she suffocate him? [No, let's go with the knife]
Did she think it was an intruder / burglar?
Was it the son's bedroom she sneaked into?
Was it the parents' bedroom she sneaked into?
Did she want to kill her husband?
Is the killing an act of mercy, saving the victim from a much worse fate? (for instance certain starvation or a nuclear apocalypse)

9
Case #10
In the middle of the night, a mother sneaks into the bedroom where her son is sleeping and kills him.

(Explain the reasons and circumstances for what happened.)
Yes
Was her son a child? (younger than, say, 13 years old)
Is the killing intentional? [But...]
Did the son look somehow like the man she intended to kill? ["Somehow" – see next question]
Was her son completely under the blanket when she killed him? [Sure, that works]
Did she already intend to kill a person before she entered the room?
Was the mother in her right mind when she did it?
Did she kill him with a knife?


No
Did she turn herself in? [Doesn't really matter, but let's say no]
Does the son have an incurable disease?  (Is this a case of euthanasia?)
Does the mother realise that she's killed her son? [Not right away]
Did she know she would kill her son before she did it?
Did she think it was her husband?
Is the murder weapon relevant to this case? [Not particularly]
Had the mother taken any drugs? [Not to the point where it's relevant to the case]
Had the mother had any alcohol? [Ditto]
Had the mother inhaled any chemicals? [Ditto]
Does the mother have any mental illness? [Open to interpretation, but it was not an act of pure insanity]
Did she shoot him?
Did she suffocate him? [No, let's go with the knife]

10
I have a theory...

She hears two lovers, thinks her husband is cheating on her, goes in a fit of rage and kills him only to discover that it was actually her son.

(wrong)

Also, we already established that the son is younger than 13, so the "she hears two lovers" part is a bit :-X

Case #10
In the middle of the night, a mother sneaks into the bedroom where her son is sleeping and kills him.

(Explain the reasons and circumstances for what happened.)
Yes
Was her son a child? (younger than, say, 13 years old)
Is the killing intentional? [But...]
Did the son look somehow like the man she intended to kill? ["Somehow" – see next question]
Was her son completely under the blanket when she killed him? [Sure, that works]


No
Did she turn herself in? [Doesn't really matter, but let's say no]
Does the son have an incurable disease?  (Is this a case of euthanasia?)
Does the mother realise that she's killed her son? [Not right away]
Did she know she would kill her son before she did it?
Did she think it was her husband?

11
Case #10
In the middle of the night, a mother sneaks into the bedroom where her son is sleeping and kills him.

(Explain the reasons and circumstances for what happened.)
Yes
Was her son a child? (younger than, say, 13 years old)
Is the killing intentional? [But...]


No
Did she turn herself in? [Doesn't really matter, but let's say no]
Does the son have an incurable disease?  (Is this a case of euthanasia?)
Does the mother realise that she's killed her son? [Not right away]

12
Case #10
In the middle of the night, a mother sneaks into the bedroom where her son is sleeping and kills him.

(Explain the reasons and circumstances for what happened.)

Yes
Was her son a child? (younger than, say, 13 years old)


No
...

13
Oh, after Tabata's guess I figured the black hole thing was the red herring you wanted us to think, while the real answer was that he died slowly over a year or so (from a disease, maybe) while still growing normally.

OK...

Case #10
In the middle of the night, a mother sneaks into the bedroom where her son is sleeping and kills him.


14
Was he a human being?
Did he get more than, say, a couple of centimeters taller?
Was he falling at the time of death?
Was he being stretched?
Did he fall into a black hole?

15
Was he squeezed or flattened in some way?
Does it matter that he was a man?
Was he killed?

16
It's really Mandle's turn. If he doesn't want it, I do have one...

18
So I'm sure Mandle got it, but just to get it over with:

The skeleton was wearing a diving suit with air tanks, and the explanation is that he was diving in a lake when a helicopter came to scoop up water to put out the forest fire, accidentally grabbing him with it (and then he was dumped over the forest, of course).

19
When you say he knew "what happened", does that refer to how the person died (as opposed to e.g. why their body was found now)?

20
I'll look into enums, thanks. But can I set them as global variables? Can I set it up in the global scrip and then read them in the room hotspot function?

I don't think they can be set via the "Global Variables" pane, but you can declare an enum type in a script header, and it will be available to all scripts below it. You can also export and import an enum variable from the global script so it will be accessible to the room scripts, just like any other variable (bool, int, ...).

No, they change. In the current state of the project, the amount ranges from 0 (almost every hotspot[0] except two specific case) to at maximum 8, with an average of 4/5.
They change with each hotspot for a couple of reasons_
- since you can't talk to a fridge, for example, I think there's no sense in adding a "talk" option, so some interactions may not be available. This is what makes it hard to figure out what is in a specific spot. It is slightly confusing to have a series of Action_n properties, but since I code the interactions as I set up the hotspot and therefore the local values of each custom property, hopefully it's easy to remember which one is which.
- some of them indeed have custom names. Rather than a generic "use", it may be "turn on" for an electric appliance, "eat a snack" for the fridge, etc. In the case of the TV I put in the example post, it has two separate options for "whatch movie" and "whatch TV show", for example.

If they're 90% from some limited set, I would personally still use a list of meaningful names, and then have a few slots for "special actions". Something like:

Code: Adventure Game Studio
  1. struct PlayerAction {
  2.   eActionInvalid = -1,
  3.   eActionLook,
  4.   eActionTalk
  5.   eActionUse,
  6.   eActionPickUp,
  7.   // ...
  8.   eActionCustom1,
  9.   eActionCustom2,
  10.   eActionCustom3
  11.   // if you need more...
  12. };

Then each hotspot could support any subset of them, probably with a set of flags as you initially planned.

I'm a big proponent of semantic coding: making the relationship between the code and the task as transparent as possible, by (among other things) using meaningful variable names, avoiding "magic numbers" in the code, etc. It's not just about writing the code, but making it readable after the fact.

I didn't even know it was called Hungarian notations  :-[

I named variables this way because it seemed easier to remember for me what is what, especially for global variables that may be called all over the places. Why is it discouraged? What are the drawbacks?

1. In a strongly-typed language, it doesn't really provide useful information: the compiler should stop you from mixing up different types anyway (though admittedly the AGS compiler is fairly lenient in type-checking).
2. Also, the code editor has popups that tell you the type information.
3. With autocomplete, it's more you have to type before you get to the specific variable name.
4. It makes variable names longer, and buries the essential information within the name. This makes code harder to read.
5. (Not a problem with your variation of the notation: These prefixes can get both pretty obscure and impossible to pronounce, leaving you with variables like pszSrc or rgchBuf.)
6. Arguably, if the code is properly written you shouldn't have to worry about the type. The relevant methods should simply take arguments of the right type, so it should just make sense.

Prefixes can be useful if they organize related variables you might have to choose from (that's why I name all the enum values eActionXXX instead of just eXXX) or provide some information that is not given simply by the type (for example, view IDs show up in the code simply as integer constants, so I always use a V- prefix to distinguish them from other number constants). Or if you need two variables for related things that differ only by their type (e.g. a String and int representation of the same number). However, in these cases it is very often better to put the semantic "type" at the end of the variable name, rather than the front.

Pages: [1] 2 3 ... 244