Author Topic: TEMPLATE: Tumbleweed Verbs 1.1 Last update: 3rd August 2018  (Read 6856 times)

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
This is the long overdue overhaul of the classic 9 Verbs template:
Tumbleweed Verbs!

Here are a few highlights:

Thimbleweed(tm) mode


A new save&load system


...while offering the classic SCUMM experience


And it still speaks your local language... sort of ;)


A more complete feature list:
  • cancelable interactions, no need to wait until the character reaches the object/hotspot etc
  • doubleclick to exit locations
  • all new template graphics
  • contains a scrollable dialog gui
  • running with a double click
  • contains a nice door script in case you have lots of those
  • customizable: invent your own verbs, remove a few or add even more
  • helps with unhandled events
  • player follows the cursor while running (if the mouse button is pressed)
  • complete code cleanup: all functions are in structs
  • all settings can be reached and modified anytime
  • all settings are conveniently grouped in a separate script file
  • translations available for Spanish, German, French, Portuguese, Italian and Dutch
  • includes two demo rooms to get you started
  • it comes with a manual :)


Code
https://github.com/dkrey/ags_tumbleweed

Download
(all files compiled with AGS 3.4.1 Patch3)

Here is the template:
http://shatten.sonores.de/wp-content/uploads/2018/08/Tumbleweed_1.1.zip

The documentation is included with the template and also available as a .chm file here:
http://shatten.sonores.de/wp-content/uploads/2017/05/tumbeweed_doc.zip
« Last Edit: 05 Sep 2018, 10:58 by abstauber »

Mehrdad

    • I can help with animation
    •  
    • I can help with characters
    •  
    • I can help with story design
    •  
    • I can help with web design
    •  
Re: Tumbleweed Verbs (Beta!)
« Reply #1 on: 29 Apr 2017, 16:27 »
Great!!!. It's really useful . Nice job!!

selmiak

  • ǝsıɔɹǝxǝ ʞɔǝu puɐ uıɐɹq
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with web design
    •  
    • selmiak worked on a game that was nominated for an AGS Award!
Re: Tumbleweed Verbs (Beta!)
« Reply #2 on: 30 Apr 2017, 11:51 »
nice! Can you integrate this into the normal LA template?

CaptainD

    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
    • CaptainD worked on a game that was nominated for an AGS Award!
      CaptainD worked on a game that won an AGS Award!
Re: Tumbleweed Verbs (Beta!)
« Reply #3 on: 30 Apr 2017, 12:40 »
This looks great!  Thanks for all the hard work that's going into it.

Calin Leafshade

  • AGS Project Tracker Admins
  • Long live King Cat!
    • I can help with making music
    •  
    • I can help with voice acting
    •  
    • Calin Leafshade worked on a game that was nominated for an AGS Award!
      Calin Leafshade worked on a game that won an AGS Award!
Re: Tumbleweed Verbs (Beta!)
« Reply #4 on: 30 Apr 2017, 19:20 »
Forgive my ignorance but what is the "Thimbleweed mode"?

It looks the same to me.

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Tumbleweed Verbs (Beta!)
« Reply #5 on: 30 Apr 2017, 19:39 »
It just means the verb and hotspot name follow the mouse cursor instead of showing up in a dedicated "action bar"

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Re: Tumbleweed Verbs (Beta!)
« Reply #6 on: 30 Apr 2017, 21:14 »
@Calin & Snarky:
It is a tad more than just a label following the mouse cursor, although it is true that it isn't actually visible on the screenshot.
The "action label" also show the default action for the location and switches to the chosen action upon mouse click.
It stays that way until:
- you cancel the action
- the action is executed and done
- you move the mouse away from the location

The SCUMM mode always displays the chosen action until you click something or the action is done. It is a bit hard to explain - just try it and you will see ;)

@Selmiak: Do you have a particular feature in mind?
As long as the "normal" template is being used, I will maintain it. But the purpose of this template is to replace the older one.
I might integrate the running stuff in the 9Verbs MI-Style template at some point. Done

@CaptainD & Mehrdad: Thanks :)
« Last Edit: 04 May 2017, 16:03 by abstauber »

Re: Tumbleweed Verbs (Beta!)
« Reply #7 on: 30 Apr 2017, 22:00 »
Rounds of applause abstauber! This looks great!
"We do not stop playing because we grow old, we grow old because we stop playing."

Danvzare

  • The Man with No Name
    • I can help with AGS tutoring
    •  
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
Re: Tumbleweed Verbs (Beta!)
« Reply #8 on: 01 May 2017, 15:57 »
Awesome, who knew Thimbleweed Park would have spurred abstauber to update this old template so much. :-D

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Re: Tumbleweed Verbs (Beta!)
« Reply #9 on: 03 May 2017, 10:49 »
A question for you native speakers:

How should the label for the GUI style be called? (It is a slider where you switch between classic SCUMM mode and the 'modern' thimbleweed mode.

Currently it is slider called GUI style with the options classic and modern
In German I called the slider 'Bedienung' which can be translated to Mode of operation.

But how could it be called in English? 'GUI style' sounds a bit too technical.

CaptainD

    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
    • CaptainD worked on a game that was nominated for an AGS Award!
      CaptainD worked on a game that won an AGS Award!
Re: Tumbleweed Verbs (Beta!)
« Reply #10 on: 03 May 2017, 11:28 »
Hmm... I think "Layout" or possibly just "Style" would be reasonable words to use.  I'd probably favour "Layout" myself.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Re: Tumbleweed Verbs (Beta!)
« Reply #11 on: 04 May 2017, 10:25 »
Alright, thanks! I'll stick with layout then.

Btw. I've uploaded a new beta. For better testing the second room is now scrolling.
Thanks to arj0n, we have a new translation: dutch.
Also thanks to Bicilotti, Monsieur Ouxx and Cireja for helping me with the existing translation.
« Last Edit: 04 May 2017, 16:02 by abstauber »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Re: Tumbleweed Verbs (Beta!) Last update: 4th May 2017
« Reply #12 on: 09 May 2017, 13:33 »
Here's a new beta and I finally managed to create a repository for this template.

Changes:
The "cog" button is now on the same GUI as the action label.
Slight changes to what happens if you "talk to" nothing.
Code cleanup and small bugfixes

Did actually anyone already give this a go?


abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Re: Tumbleweed Verbs (Beta!) Last update: 10th May 2017
« Reply #13 on: 10 May 2017, 13:08 »
Lo and behold, I received a bug report :-D
Beta4 is up. The running mode now waits for certain distance between player character and cursor. Also the running isn't blocking anymore.

edit: We have reached Beta5. You can now "run" on hotspots with an exit extention to change rooms.
« Last Edit: 11 May 2017, 14:50 by abstauber »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
I finally managed to update the documentation and I also added a new chapter about the changes and differences to the 9verbs MI-style template.
I guess waiting for further bug reports at this point might be a bit useless, so I call this a release candidate :P

this looks awesome abstauber!

noob question:
how do i go about updating my game from the 9-verb template? i can't seem to figure out how i can import this template into my existing game:D
i already have custom UI graphics, colors, fonts etc. in place. i suppose this is going to be a bit of a pain? :-\

p.s. i noticed in both your templates, when you look at something you can click the mouse to skip a line of text. however in lucasarts games when you look at stuff you can still move while the text keeps displaying. i feel this really helps the "flow" of the gameplay. would it be possible to achieve this in AGS as well?
« Last Edit: 26 May 2017, 13:40 by daniel »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Quote
how do i go about updating my game from the 9-verb template?
Currently both templates share the same features, except the save/load handling. You can export the save/load GUIs from the template and import them to your game. Also you need to export the optiongui module.
Actually migrating your game completely from one template to another might indeed be quite a pain ;) I'd rather say: create a new game from Tumbleweed template and import your rooms into it. Afterwards apply your other changes, fonts colors and graphics.

Quote
however in lucasarts games when you look at stuff you can still move while the text keeps displaying
Unfortunately displaying speech is usually blocking in AGS. You could use BackgroundSpeech, but that way you would loose the talking animations with "lucas style speech".

thanks abstauber,

i guess i'll just continue with the "old" template for now and maybe migrate at a later point...
actually the one thing that i like most from the new template is that the action/info is displayed over the cursor instead of an action bar.
is this possible in the 9-verb template somehow?

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Sure, that is actually not a big deal. First you need to resize the gAction GUI to your game's screen resolution (eg 320x200)
Now you need to copy over this adjusted  AdjustActionBarPosition function to your template and make sure it is called in repeatedly_execute_always

Code: Adventure Game Studio
  1. void AdjustActionBarPosition()
  2. {
  3.   int actionLabelWidth = GetTextWidth(ActionLine.Text, eFontTextOut) + 4;
  4.   int actionLabelHalf = actionLabelWidth / 2;
  5.   int xpos = mouse.x - actionLabelHalf ;
  6.   int ypos = mouse.y - Game.SpriteHeight[mouse.GetModeGraphic(mouse.Mode)] - 4;
  7.  
  8.   if (xpos + actionLabelWidth >= System.ScreenWidth) xpos = System.ScreenWidth - actionLabelWidth;
  9.   else if (xpos < 0) xpos = 0;
  10.  
  11.   if (ypos < 0 ) ypos = 0;
  12.  
  13.   ActionLine.X = xpos;
  14.   ActionLine.Y = ypos;
  15.   ActionLine.Width = actionLabelWidth;
  16. }
  17.  

Hi Abstauber!

Is it possible to use your save/load GUI (with screenshot/date/hour mode) on other templates?
I'd like to use it in a game I'm currently developing!

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Hi,
as long as you know your ways around AGS, it should not be too hard. The whole GUI stuff is already pretty much modulized.
You need to export the optiongui module from the template, as well as the GUIs: gSave, gSaveConfirm, gLoad (and optionally gOptions).

In gOptions you might want to remove the Layout slider and the code behind it, since this is the only(?) template specific thing in this module.

Hi,
as long as you know your ways around AGS, it should not be too hard. The whole GUI stuff is already pretty much modulized.
You need to export the optiongui module from the template, as well as the GUIs: gSave, gSaveConfirm, gLoad (and optionally gOptions).

In gOptions you might want to remove the Layout slider and the code behind it, since this is the only(?) template specific thing in this module.

Thank you very much!:-D
I'm at my first game and I'm currently Learning Scripting but I'm confident to be able to do it (nod)

Hi Abstauber!

I tried to import the module but my AGS version is slightly older than the one you used for the module... so the importing failed
do you know if is it possible to use it in another way?

Sure, that is actually not a big deal. First you need to resize the gAction GUI to your game's screen resolution (eg 320x200)
Now you need to copy over this adjusted  AdjustActionBarPosition function to your template and make sure it is called in repeatedly_execute_always

Code: Adventure Game Studio
  1. void AdjustActionBarPosition()
  2. {
  3.   int actionLabelWidth = GetTextWidth(ActionLine.Text, eFontTextOut) + 4;
  4.   int actionLabelHalf = actionLabelWidth / 2;
  5.   int xpos = mouse.x - actionLabelHalf ;
  6.   int ypos = mouse.y - Game.SpriteHeight[mouse.GetModeGraphic(mouse.Mode)] - 4;
  7.  
  8.   if (xpos + actionLabelWidth >= System.ScreenWidth) xpos = System.ScreenWidth - actionLabelWidth;
  9.   else if (xpos < 0) xpos = 0;
  10.  
  11.   if (ypos < 0 ) ypos = 0;
  12.  
  13.   ActionLine.X = xpos;
  14.   ActionLine.Y = ypos;
  15.   ActionLine.Width = actionLabelWidth;
  16. }
  17.  


This is perfect! Thank you. But is it possible to hide the actionline when starting an action, in an easy way?
"Talk to character" for example is still on the screen (highlighted) when the dialog goes on. And sometimes those texts even overlap each other.

Thank you!

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
helping me with the existing translation.

Watch out you made a copy&paste mistake in the French screenshot : It's not "ourvrir", it's supposed to be "ouvrir".

Question : apart from the new copy&save, are there any other improvements? We've just finished integrating the 9verb into the "custom save with screenshots" and bam, just at the same time you release it packaged. So I'm thinking if it's worth integrating again.
« Last Edit: 19 Apr 2018, 10:05 by Monsieur OUXX »
 

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
@zurik I'll have a look tomorrow

@Monsieur Ouxx
Hehe, thanks for the hint. I'll update the graphics in the future. How comes that you stumble upon this template almost exactly a year after it's release? (laugh)
Quote
We've just finished integrating the 9verb into the "custom save with screenshots" and bam, just at the same time you release it packaged.
Did I release something recently?

The main additions are double click running and the new save gui. And of course the whole code reorganizing and refactoring stuff, but technically these aren't features ;)
« Last Edit: 19 Apr 2018, 20:58 by abstauber »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
@zurik
I think the trick was to set the action label to an empty string after an action was executed or the GUI gets disabled. The GUI gets disabled once a dialog starts, so we use this effect.

This is from the tumbleweed script, so there's a bit work left to adapt it to the 9verb GUI variable and function names.

Code: Adventure Game Studio
  1. function repeatedly_execute_always() {
  2.  
  3.  
  4.   if (!IsGamePaused() && !Verbs.IsGuiDisabled()) {
  5.  
  6.     // Update Actionbar
  7.     if (classicGui == false) {
  8.       Verbs.CheckDefaultAction();
  9.  
  10.       // Update Actionbar after command is executed
  11.       if (location_clicked != null && location_clicked.Length > 0) {
  12.         if (location_clicked.IndexOf(">") > 0) temp_location = location_clicked.Truncate(location_clicked.IndexOf(">"));
  13.         else temp_location = location_clicked;
  14.       }
  15.       else temp_location = "";
  16.  
  17.       if (IsInterfaceEnabled() || temp_location != location || location == "") {
  18.         Verbs.UpdateActionBar();
  19.         location_clicked = "";
  20.       }
  21.       Verbs.AdjustActionBarPosition();
  22.     }
  23.     // Doubleclick Timer
  24.     if (dc_timer_run == true)
  25.     {
  26.       if (disableDoubleclick) {
  27.         dc_timer_run = false;
  28.       }
  29.       else {
  30.         dc_timer_click++;
  31.         if (dc_timer_click >= dc_speed){
  32.           dc_timer_click = 0;
  33.           dc_timer_run = false;
  34.         }
  35.       }
  36.     }
  37.   }
  38. }
  39.  
  40.  

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
The main additions are double click running and the new save gui. And of course the whole code reorganizing and refactoring stuff, but technically these aren't features ;)

So basically it does exactly what our template does. Even the running. I'm gutted. Proof I should visit the forums more often ;)
 

Hi Abstauber!

First of all, love the new Verbs, great design.

I'm having some trouble with the doors. I set up the doors as I learned and the Anyclick works. Problem is this: in my new game I will have more than one playable characters, the user can switch anytime he wants. So, what I want to get working is this: If a Character on one side of a door opens the doors(but steps not trough it), then it should also be open in the next room, even if an other characzer approaches it from the other side, right?
I put the Getdoorstate in room_load on both sides, trying to always update the door state. Ot works for going trough the door, but it doesn't change the corrsponding object. Hence:
You will step trough an open bit displayed closed, door.
Well this is how I set doors up:

Code: Adventure Game Studio
  1. Room_First_Load {  
  2. //Set up a doors with ID 20 and set it to unlocked but closed
  3.  
  4. Doors.Initobject (20, oDoor.ID);
  5.  Doors.Setdoorstate (20, 0);
  6. }
  7.  
  8. Room_Load{
  9.  //check if door is closed or open
  10. Doors.Getdoorstate (20);
  11. }
  12.  
  13.  
Code: Adventure Game Studio
  1. Room_First_Load {  
  2. //Set up a doors with ID 20 and set it to open
  3.  
  4. Doors.Initobject (20, oDoor.ID);
  5.  Doors.Setdoorstate (20, 1);
  6. }
  7.  
  8.  
  9. Room_Load{
  10.  //check if door is closed or open
  11. Doors.Getdoorstate (20);
  12. }
  13.  

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Hi and thanks for the kind words.

Without testing it I'd say you need to init the door object every time the room loads.
GetDoorState just return the state of the door, but doesn't apply it. InitObject does both: it get the state and modifies the object if needed.

Code: Adventure Game Studio
  1. Room_First_Load {  
  2. //Set up a doors with ID 20 and set it to open
  3.  Doors.Setdoorstate (20, 1);
  4. }
  5.  
  6.  
  7. Room_Load{
  8.  //check if door is closed or open
  9. Doors.InitObject (20, oDoor.ID);
  10. }
  11.  

EDIT: Doors work now! I'am so happy!

Thanks! I'll try this evening and let you know :)
Oh, I also had another bug regarding the safe-system. I have to recreate it in the evening because I'm at work now, but I would describe it like this:
If I open the Menu via the GUI Button I can safe and load without problem. But If I open the Menu via F5 and safe I get an error. As I said I have to recreate it, but I recall it pointed to the part of the script where you added a comment saying "workaround for taking a screenshot without the menu-gui".

I tried with both compiled game and the testeun with AGS open.


EDIT: The Error Reads "Error running function 'repeatedly_excecute'": Error: Null String referenced

and it refers to the line 402 of the optiongui.asc

Code: Adventure Game Studio
  1. if (save_scheduled) {
  2.     SaveGameSlot(saveSlotId, saveSlotString);
  3.     saveSlotId = 0;
  4.     saveSlotString = "";      
  5.     save_scheduled = false;
  6.   }
  7.  
« Last Edit: 24 Apr 2018, 15:04 by Loslem »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
A good thing, that I called this a release candidate ;)

Here's your bugfix.

In globalscript.asc at line 25 edit your code like this:
Code: Adventure Game Studio
  1.   if (keycode == eKeyF5) {
  2.     //gOptions.Visible=true; // F5 - OPTIONS
  3.     Verbs.UpdateActionBar();
  4.     OptionGui.ShowOptions();
  5.   }
  6.  
That fixed the issue for me.

Hi it's me again, back to bother you! :D

Say: It's super convienient to set Door Hotspots with the extension >o, so that right click right opens them. Problem: if you click right again you always get the door string for the open door.
Is there a way to implement that the door is closed again with a right click?

EDIT: Sorry I found it on site 14 of your Verbs Manual. Good write!
« Last Edit: 12 Jun 2018, 22:16 by Loslem »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Great that you've sorted it out.

And since we're at it, I've added the fixes to Github and updated the template.
So after over a year in RC state, I now proudly call it 1.0 :-D

imsomnia212

  • Imsomnia
First of all I really love the template.
Well, I have a question: Is possible to show the save screenshot with anti-alising when your game is nearest-neighbor? I wan't to show it like the way Thimbleweed do, but in the template with a nearest-neighbor game, it pixelate and lose information in the screenshot.
Are u a tuna?

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Well, I have a question: Is possible to show the save screenshot with anti-alising when your game is nearest-neighbor? I wan't to show it like the way Thimbleweed do, but in the template with a nearest-neighbor game, it pixelate and lose information in the screenshot.

This would require applying different graphic filter at runtime, which AGS currently cannot do, I am afraid. (Well, technically it could, but there is no script command or option to make it do so).

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
imsomnia212 : What you can do is apply the anti-aliasing AFTER taking the screenshot.
I'm not detailing, but :
1) locate the place in the module where the screenshot is taken
2) Open the file from disk or start fiddling with the dynamic sprite directly (I haven't checked which of those two scenarios applies here)
2) Resize the sprite using the DynamicSprite and DrawingSurface scaling abilities -- apply the antialiasing at that time.
3) Save the sprite as a file where it should normally have been saved in the first place
 

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
2) Resize the sprite using the DynamicSprite and DrawingSurface scaling abilities -- apply the antialiasing at that time.

I don't understand how this step is supposed to work. Neither DrawingSurface.DrawImage()/DrawSurface() nor DynamicSprite.Resize() allow you to specify antialiasing – I'm not sure whether it's always off or whether it depends on the "Smooth scaled sprites" setting in winsetup, but it's not something you can control through AGS script (the best you can do is game.disable_antialiasing, but there's no game.force_antialiasing).

It might be possible to write a function to do bilinear sprite scaling by reading and drawing individual pixels, but that would be SLOOOW.

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
2) Resize the sprite using the DynamicSprite and DrawingSurface scaling abilities -- apply the antialiasing at that time.

I don't understand how this step is supposed to work. Neither DrawingSurface.DrawImage()/DrawSurface() nor DynamicSprite.Resize() allow you to specify antialiasing – I'm not sure whether it's always off or whether it depends on the "Smooth scaled sprites" setting in winsetup, but it's not something you can control through AGS script (the best you can do is game.disable_antialiasing, but there's no game.force_antialiasing).

I was too confused by this advice. At first I thought there is a mode for SetGameOption I forgot about, but then I checked engine code, and this is not the case with anti-aliased sprites. But that option is not even applied to DrawingSurface operations, only when drawing characters and objects in the room.
(Which may be an oversight really. Also, that should be technically possible to add an option to switch sprite anti-aliasing at runtime, if really necessary)
« Last Edit: 23 Jul 2018, 12:37 by Crimson Wizard »

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
But that option is not even applied to DrawingSurface operations, only when drawing characters and objects in the room.
(Which may be an oversight really. Also, that should be technically possible to add an option to switch sprite anti-aliasing at runtime, if really necessary)

It feels like a design decision made back in 2000 or thereabouts that doesn't make much sense any more.

How I would want it to work, ideally:

-Antialiasing (or more properly interpolation) for scaling characters is a game setting that can be controlled in script
-There's a game-wide default value, but it can also be overridden for individual characters
-Possible values for this setting would be Nearest Neighbor, Bilinear, Bicubic and User-Configured (which would then be controlled by winsetup; the default for backwards compatibility), with option to extend later
-For relevant DrawingSurface/DynamicSprite operation (scaling and rotation), there would be an optional interpolation argument with the same possible values, defaulting to Nearest Neighbor
-While we're at it, also add a subpixel Translate operation to shift a sprite by a fraction of a pixel (using any of the interpolation settings – though Nearest Neighbor wouldn't really do much).

Ray

  • Alien from planet Earth
Thank you very much for this template!
I'm just starting with AGS, so such a good example will definitely be a help :)

imsomnia212

  • Imsomnia
This would require applying different graphic filter at runtime, which AGS currently cannot do, I am afraid. (Well, technically it could, but there is no script command or option to make it do so).

That's sad but maybe in a near future that's Will be possible.
I have another problem, when I set up a bg for the dialog gui (is a image with alpha channel) it show a pink bg and not the transparent img like do when use the ags gui system, see:

Using the ags gui system for the main gui (verbs, inventory items, etc):


Using the dialog script provide by Tumbleweed module:



I set up the script like the note said:

Code: Adventure Game Studio
  1. // Background
  2. // set bg img_transparency to -1 if you're using 32-bit graphics and
  3. // want to preserve the alpha channel
  4. this.bg_img                = 276;
  5. this.bg_img_scaling        = 0;
  6. this.bg_img_transparency   = -1;
  7. this.bg_color              = 0;
  8.  
Are u a tuna?

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
I'm so confused right now. Wasn't there a new parameter added recently to DynamicSprite.Draw or .Resize or whatever where you could choose the scaling algorithm? Or am I mixing it up with the new parameter for transparency copy (legacy, additive...)? My bad then.

But anyways, even if imsomnia212 has to write the antialised method himself (which shouldn't be too hard because it doesn't have to be real-time, it can be super slow, just copy some bilinear code from wikipedia), it's only an extra step to the method I described to achieve his goal of antialised saved games screenshots.
 

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Scripting a bilinear interpolation filter is complicated by AGS's crappy color handling (not allowing you to get or set the full 32-bit color value). To get the correct result without degrading the screenshot to 16-bit, you would have to grab the individual pixels as sprites and draw them on top of each other at various transparencies.

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
@imsomnia212 I can replicate this, but I'm clueless why it isn't working anymore. Drawing images with an alpha channel used to work on dialog GUIs - at least in 2017. I'm trying to find out in which version of AGS, this feature broke again. It never broke, see below ;)

« Last Edit: 27 Jul 2018, 11:56 by abstauber »

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
@imsomnia212 I can replicate this, but I'm clueless why it isn't working anymore. Drawing images with an alpha channel used to work on dialog GUIs - at least in 2017. I'm trying to find out in which version of AGS, this feature broke again.

What version of AGS are you using? Does it replicate in this template right away, or you need to do something extra to see it?

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Sorry for accusing AGS: I messed up :X.
I forgot to set info.HasAlphaChannel = true;

@imsomnia212
In line 382 (function dialog_options_get_dimensions) add this

Code: Adventure Game Studio
  1.   if ((CDG.bg_img_transparency > 0 || CDG.bg_img_transparency == -1) && CDG.bg_img!=0 ) {
  2.     info.HasAlphaChannel = true;
  3.   }
  4.  
« Last Edit: 27 Jul 2018, 11:56 by abstauber »

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
When you double-click on the hologram character, the player does not "fast walk". Is that intended? I haven't tested but I guess the same thing would happen when you double-click on objects or hotspots?
 

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
For some reason I thought that this would be the way to do it. But apparently you can doubleclick-walk to everything in Thimbleweed Park.
So yeah, it seems to be an intentional bug which I'll fix right away :)

In the meantime you can comment out the 'if condition' in line 2075 and it's bracket in 2085. In line 2095 remove this piece from the if condition: 
"&& location_type == eLocationNothing"

I'll test it some more and see if this fix breaks anything.
--edit: of course it broke something :P Gotta fix the door handling now.
« Last Edit: 31 Jul 2018, 10:19 by abstauber »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Here's the new version - sorry for refactoring so much code after the 1.0 release.
All template settings are now grouped in a separate module and you can change them from anywhere in your code. I've also removed the old doubleclick code and integrated CW's module instead.

Btw. thanks to CW and Snarky for telling me about attributs and how they work :D Also thanks to Monsieur Ouxx who brought the issue up.

This version also contains two bugfixes:
1) Alpha transparency for the dialog GUI is now a thing
2) Running works on everything, not just plain areas.

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
hurray!
 

imsomnia212

  • Imsomnia
Hey thanks for the fix!
Are u a tuna?

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Tiny issue : the "tiny" font points to the same file as other fonts : xpaider2.ttf. And that file does not seem to be the right one. I tried importing it at small sizes (5 or 6pt) but it's not right. Can you help me?
 

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Oh, that's easy to explain: the "tiny" font is a .wfn font. But if I recall correctly, you have to start with a ttf font first and then replace it with the wfn font in the file system.
You can find the wfn font in the assets folder in Github, or here on the forums: it is Tom Thumb.
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48798

@Imsomnia212: Cheers! I'm looking forward to see some of your games in the future. Your abandoned mags game already looked very promising.
« Last Edit: 06 Aug 2018, 08:31 by abstauber »

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
You can find the wfn font in the assets folder in Github, or here on the forums: it is Tom Thumb.
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48798

Cool. That's also the one I've been using in other places.
 

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
fyi : I've done a pull request.
 

imsomnia212

  • Imsomnia
@Imsomnia212: Cheers! I'm looking forward to see some of your games in the future. Your abandoned mags game already looked very promising.

Soon I will show in the forum something that I'm working on too hard
Are u a tuna?

Babar

  • Creator, Mutator and Defecator
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
I get a "Not Found" page when I try to download the template.
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
I get a "Not Found" page when I try to download the template.

I think you may still download the source project from github:
https://github.com/dkrey/ags_tumbleweed
if you click on green "Clone or download" button and choose Download ZIP.

Babar

  • Creator, Mutator and Defecator
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
I think you may still download the source project from github:
https://github.com/dkrey/ags_tumbleweed
if you click on green "Clone or download" button and choose Download ZIP.
Yes, that is what I did, I just figured I'd try to get the template as an agt file.
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
@Babar: Sorry about the broken link, I've just fixed it.

@Monsieur OUXX: Your changes seem to make a lot of sense, but unfortunately your pull request does not compile (yet)
Quote
GlobalScript.asc(54): Error (line 54): '.AdjustLanguage' is not a public member of 'Verbs'. Are you sure you spelt it correctly (remember, capital letters are important)?

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
your pull request does not compile (yet)

Weird. I made sure I never committed without compiling and testing first.
How do pull requests work? Do you see the state of the code at the time I did the pull request, or do you see the current state of the cloned respository and the branch it contains?
 

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
I downloaded your last commit from Aug 18th (dedfd488392cf46dad0af3dbe2ddde97eb44c1d f) and tried it to compile it with AGS. Since then I still didn't find the time review all the changes and probably find a fix for the remaining bugs.

That also raises the question: do I need merge this borked pull request and fix the bugs in the master branch or do I have to work in your repo to make it happen?

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
That also raises the question: do I need merge this borked pull request and fix the bugs in the master branch or do I have to work in your repo to make it happen?

Sorry for barging in the discussion; technically both ways are viable, usually this is rather an organizational question.
Also, a while ago Github has allowed such feature as letting the owner of target repository to add commits directly to pull request branch, if the PR creator has ticked this option. Personally I cannot tell if it's the case not having necessary permissions there.

BTW this reminds me, Monsieur OUXX, have you noticed my comment to your pull request?
https://github.com/dkrey/ags_tumbleweed/pull/1#issuecomment-411395083

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Quote
Sorry for barging in the discussion
I was actually hoping you would do that :D
Thanks for the clarification, I guess I just need to wait until Mathieu replies. Maybe in the meantime I find time to do a full code review, since this pull request is quite a biggie.
In any case the #error command will find its way into the template (nod)

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Sorry guys I had a crazy month (I think the other people in my game project have probably hired bounty hunters to get me by now). I'll check out my code and the state of the pull, as well as CW's comment asap.