TEMPLATE: Tumbleweed Verbs 1.4

Started by abstauber, Sat 29/04/2017 15:41:50

Previous topic - Next topic

Ray

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

imsomnia212

Quote from: Crimson Wizard on Sat 21/07/2018 21:45:23
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: ags

// Background
// set bg img_transparency to -1 if you're using 32-bit graphics and
// want to preserve the alpha channel
this.bg_img                = 276;
this.bg_img_scaling        = 0;
this.bg_img_transparency   = -1;
this.bg_color              = 0;
Are u a tuna?

Monsieur OUXX

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

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

@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 ;)


Crimson Wizard

Quote from: abstauber on Fri 27/07/2018 11:36:47
@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

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: ags

  if ((CDG.bg_img_transparency > 0 || CDG.bg_img_transparency == -1) && CDG.bg_img!=0 ) {
    info.HasAlphaChannel = true;
  }

Monsieur OUXX

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

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.

abstauber

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

 

imsomnia212

Are u a tuna?

Monsieur OUXX

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

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.

Monsieur OUXX

Quote from: abstauber on Sun 05/08/2018 20:12:18
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

 

imsomnia212

Quote from: abstauber on Sun 05/08/2018 20:12:18
@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

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

Quote from: Babar on Sun 02/09/2018 15:16:23
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

Quote from: Crimson Wizard on Sun 02/09/2018 15:34:27
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

SMF spam blocked by CleanTalk