Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Snarky

#1041
The Rumpus Room / Re: What's on TV?
Sat 06/01/2018 08:51:42
No. It's just currently available to stream from NRK.
#1042
The Rumpus Room / Re: What's on TV?
Fri 05/01/2018 22:08:41
No ideas?



(The station logo is not the original broadcast channel.)
#1043
The Rumpus Room / Re: What's on TV?
Thu 04/01/2018 22:17:22
Here's another screen:

#1044
The Rumpus Room / Re: What's on TV?
Wed 03/01/2018 22:24:46
Near-past, and nope.
#1045
The Rumpus Room / Re: What's on TV?
Wed 03/01/2018 20:52:08
Oh! It was!

Then I guess that's Leo in the foreground? Let me try and guess the episode as well... Is it the one with the flashbacks to how Josh and the others came to work for the Bartlet campaign? (Leo saying "I think we're exactly that dumb", Josh hearing Bartlet speak honestly to dairy farmers, pulling Sam out of his evil lawfirm, etc.)

Using my tried-and-true "whatever I'm watching this particular moment" method, here's the next clue:

#1046
The Rumpus Room / Re: What's on TV?
Tue 02/01/2018 16:27:44
It's not The West Wing? That blurry little guy looks vaguely like Bradley Whitford.
#1047
The Rumpus Room / Re: *Guess the Movie Title*
Tue 02/01/2018 16:24:37
Exactly!

I would recommend it. Well-made film starring David Oyelowo (who did play MLK in Selma) and Rosamund Pike (Gone Girl) about a fascinating true story:

African prince falls in love with English clerk and marries her; when he tries to return to his home country to take up the crown, opposition both from the British Empire (trying to appease apartheid South Africa) and from his own tribe threatens their love and the hope for freedom for his country â€" Bechuanaland, the future Botswana.
#1048
The Rumpus Room / Re: *Guess the Movie Title*
Tue 02/01/2018 16:08:59
Nope.

#1049
The Rumpus Room / Re: *Guess the Movie Title*
Tue 02/01/2018 10:42:43
Cool! I don't remember much from it, but I do remember the radio station.

This film might be a little obscure, so I'll go straight to a pretty revealing screen:

#1050
The Rumpus Room / Re: *Guess the Movie Title*
Tue 02/01/2018 06:52:26
The Fog?
#1051
Congrats! Do I need to play the first Cpt. Disaster game first?
#1052
Quote from: amit14 on Thu 28/12/2017 11:43:44
alright
so to begin with, can you make me understand the working of this code

please explain me how is the romanise function is working here

OK, so this code is meant to print a number in Roman numerals. So we first have to make sure we understand how Roman numerals work.

Basically, you have a set of symbols: M (1000), D (500), C (100), L (50), X (10), V (10) and I (1). Usually, to read a number you just add all the "digits" together. For example, MMXVII = M + M + X + V + I + I = 1000 + 1000 + 10 + 5 + 1 + 1 = 2017. This is the "simple" method, and we always go from the highest to the lowest symbol.

One twist: commonly, instead of writing 4 as IIII and 9 as VIIII, you write it as IV and IX (smaller digit first, meaning you subtract it from the higher digit instead of adding them). You'll sometimes see the same logic applied to 40 (written XL instead of XXXX), 90 (XC instead of LXXXX), 400 (CD instead of CCCC) and 900 (CM instead of DCCCC), but that's more of a modern convention, and this code doesn't do it.

OK, so how do we write a number in this format? It should be pretty obvious, but let's break down the steps:

You start with the highest symbol (M), and see how many times it "fits" into your number. You repeat it that many times (which can be zero), and then move on to the next symbol, fitting it into the part of the number remaining. So for 2017, we ask "how many times does 1000 go into 2017?" The answer is 2, so we write M twice: MM (2000). We subtract 2000 from 2017, leaving 17. Now we ask the same for D (500), C (100) and L (50). In each case, the answer is 0 (all those numbers are bigger than 17), so we don't write anything. When we get to X (10), the answer is 1, so we write a single X after MM: MMX. We subtract 10 from 17, leaving 7, ask how many times V (5) goes into 7 (once), giving MMXV and leaving 2, and finally ask how many times 1 goes into 2 (twice), giving us MMXVII.

And that's pretty much what the code does. It breaks the task down into handling each symbol, which is done by the romanise() function. It takes three arguments: the first (y) is the number you want to write. The second (k) is the value of the symbol you want to try to fit into that number. The third (ch) is the character representation of that symbol that you want to print. The function prints the symbol ch as many times as its value k fits into the number y, and returns how much of the number is left over:

Code: c
    j=y/k; // How many times does k fit into y (divide y by k, rounding down)
    for(i=1;i<=j;i++) // Print the character ch that many times
        printf("%c", ch);
    return(y-k*j); // Return the part of y that is left over (subtract the value of k, multiplied by the number of times we printed it, j)


The rest of the function deals with the fact that 4 and 9 are written differently as special cases. Should be pretty clear, except for one thing: The return values, (y%9) and (y%4), use an operation called modulo. (Which gives the remainder of an integer division. For example, 17%5 = 2 because 17/5 = 3 and 17 - (3*5) = 2.) They will always be equal to 0, and writing them in this format is a little pointless.

So when we call romanise() repeatedly, each call will print a certain symbol a certain number of times, and let us know how much of the number remains to be printed. We feed that value into the next function call (it's important to note that since we write yr = romanise (...) on each line, the value of yr is changing at each step; it's always the remaining part of the number the user entered). We repeat until we're down to 1, and at that point the number is complete:

Code: c
main()
{
    int yr;
    printf("Enter year");
    scanf("%d", &yr);
    yr = romanise (yr, 1000, 'm');
    yr = romanise (yr, 500, 'd');
    yr = romanise (yr, 100, 'c');
    yr = romanise (yr, 50, 'l');
    yr = romanise (yr, 10, 'x');
    yr = romanise (yr, 5, 'v');
    yr = romanise (yr, 1, 'i');
}
#1053
Site & Forum Reports / Re: Bug reports
Wed 27/12/2017 13:03:17
The "All games list" says that there are 23 pages of results, but after page 20 the list is blank. I assume that there actually are somewhere between 2200 and 2300 games in the db, and that the list just can't return more than 2000.
#1054
Bump for latest update, v0.8.0:
-Implemented Character.SayBackgroundBubble() (as requested by Dave Gilbert)
-Added SpeechBubble.DefaultGui property (to address issue reported by Bavolis)
-Fixed crash with characters that don't have a speech view set (as reported by Loslem)
#1055
Thanks again, Dave! ;-D

I've forgotten to mention that bx83 hired me to develop this module for his upcoming game (and agreed to let it be made available to the AGS community), so he deserves the kudos for its existence. Check out his game when it's finished: from what I've seen it looks pretty slick!
#1056
The Rumpus Room / Re: *Guess the Movie Title*
Mon 11/12/2017 17:53:46
The Long March?
#1058
Yeah, I just came across that issue as well. I've put in a check for it. Thanks!
#1059
Thanks!

You mean this template? I haven't used it, but as far as I can tell it doesn't really change anything to do with speech, so you should be able to use both the Tumbleweed Verbs template and the SpeechBubble module at the same time without issue. So you just import the module into your game project. (Save the scm file to your computer, and from the AGS "Explore Project" pane, right-click on "Scripts" and choose "Import Script...")

To get the speech bubble effect, you have to call Character.SayBubble(). So you should put that wherever you had Character.Say() before (where Character is replaced by the name of some character, or the special player variable).

So instead of this:

Code: ags
  cRoger.Say("It's a blue cup.");


You write this:

Code: ags
  cRoger.SayBubble("It's a blue cup.");


In dialog scripts, you must use the command instead of the simple "name: line" format, and have to indent the line with spaces or tabs. So instead of this:

Code: ags
player: What we have here is a failure to communicate.
Davy: What was that?


Put this (Notice that the lines start with two spaces):

Code: ags
  player.SayBubble("What we have here is a failure to communicate");
  cDavy.SayBubble("What was that?");


There's not much more to it. Hope that answers your question!
#1060
This is an AGS limitation. It renders things in a certain order that cannot be changed, back-to-front:

-The room and Objects and Characters in it
-Overlays, including SayBackground() overlays
-GUIs
-The Say() Overlay (and as of 3.4.1, the speech portrait)
-The cursor

So only by using Say() will text always show up in front of the GUIs. (Personally I think it would be more logical for speech to display behind GUIs by default, but it is what it is. The best thing would be if we could manipulate the Z-order freely.) By default, the SpeechBubble module displays the speech bubbles on Overlays, so they'll appear behind any GUIs.

However, there is a way to work around that limitation: you can pass a GUI to SayBubble() as an optional argument, and the module will display the bubble on that GUI instead of on an overlay. (The GUI should be empty and set to a transparent background and border.) If you set the GUI.ZOrder property higher than any of your other GUIs, it will display on top.

Also, as a pro-tip, if want to always use that GUI and don't want to add the argument every time you call SayBubble(), you can edit the SayBubble() function in the module to add this line at the very top (should be line 967):

Code: ags
  bubbleGui = gSpeechBubble; // Replace gSpeechBubble with the name of the GUI you want to use


(In an upcoming version I'll add a default-GUI property to the module so that you won't have to do this.)
SMF spam blocked by CleanTalk