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 - Khris

#361
Here's how to draw stuff on a GUI's background:

Code: ags
DynamicSprite *gbg; // we need a persistent pointer

function game_start() {
  gbg = DynamicSprite.Create(200, 200);
  gSomeGUI.BackgroundGraphic = gbg.Graphic;
}

function DisplayStuff() {
  DrawingSurface* ds = gbg.getDrawingSurface();
  // draw stuff
  ds.Release();
}
#362
Ah, no, unfortunately bitmap fonts only support a single color.

You can look into the SpriteFont plugin though, that should work: https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/another-plugin-spritefont-renderer-native-bitmap-fonts/
Github: https://github.com/CalinLeafshade/ags-spritefont

It allows you to use arbitrary sprites for characters and can be used with native commands like Display().
#363
You can do this by editing one of the fonts. You can't use more than one font in a Display() message so you would have to use a bunch of special characters for this.

Download FontEdit to edit AGS fonts.

To add a font, open your game and create a new font. Save the game and close AGS. Now open the .WFN file of the font you want to use in FontEdit, draw the keyboard key characters, then save it over the newly created WFN file (if your game had three fonts previously, save the font over agsfont3.wfn, that's the fourth font you just created in AGS).
Now use that font for your Display messages.
#364
Btw, Shaun had (as usual) a great take on this whole situatiuon:

#365
A bunch of people have argued (and I agree) that Twitter should ideally be run by the government(s) as a public service (because it's not merely the current thing destined to go the way of MySpace, Twitter is rather a unique and very useful platform, despite all the bullshit that's also on there).

Musk is a manchild trying to desperately achieve one of the few things endless money can't buy: being a "cool guy". He's also in the process of firing all the people who kept twitter running, and they can't simply be replaced by new people because they took home all the institutional knowledge. So twitter is probably going to become unusable soon because it's already showing the small cracks that are a telltale sign of collapse.

So my vain hope is that it's eventually going to become a public service, or that Mastodon isn't going to buckle under the influx of new users and turn into a usable alternative.
#366
Agreed 100%.

It's also really funny how the new verification system immediately and predictably want up in flames. People made accounts like LookheadMartini (still giggling at that one), bought verified status for 8$ then tried to get retweeted while posting basically "what if companies were honest" tweets.

Ken Klippenstein has posted a bunch in the last few days: https://twitter.com/kenklippenstein/status/1591262905101479936

Also this happended:

 
#367
The Rumpus Room / Re: What grinds my gears!
Thu 03/11/2022 16:18:00
Youtube has been making subtle changes to its UI since forever but the latest one is just jaw-dropping.
The info box below the uploader's name will say "3 years ago" for a video that came out 3 years and 364 days ago. This is truly some next-level math. I get what they're trying to do there but that's a pretty spectacular fail.
#368
Looking great so far, reminds me very much of Chrono Trigger, and clearly focuses on the visual aspect from the start, which is something I can never manage to do myself :P

Regarding the interface I'd make more use of the mouse tbh; right now you're basically clicking on a gamepad menu but if the game is built around mouse controls I'd scrap the four button approach and build this with a mouse in mind from the start.

Want to attack an enemy? Just click them.
Switch to a different party member? Click them.
Want to use a recovery item? Just click it. (Requires a bar displaying these obviously.)
Want to defend? Right-click the mouse anywhere.

Unless of course you want to also offer gamepad controls, however even with those I'd probably completely change the classic controls. I'd probably use LB/RB to switch enemies/party members and use the D-pad for the various actions (up = attack, down = defend, etc.).

Finally, fighting is a major part of a game like this, and the arguably most important thing (at least for me) is to be able to basically hold down a button to auto-fight against a weak enemy. In Chrono Cross for instance you just need to spam the X button and your party will automatically pick the strongest physical attack that is likely to land, making the fight last as short as possible. This is invaluable for areas of the game where weak enemies respawn.
The same should be possible for a mouse-driven interface, as in clicking in between enemies should attack the closer one so you don't need to move the mouse after an enemy is killed and the game re-centers the remaining ones.
#369
Great game, great breakdown, also featuring a forum member (starting at ~25:00)!

#370
That means you want to fundamentally change how the template works, so you need to edit its script accordingly, not do this on a per-hotspot basis.
Also, the template doesn't really use the different cursor modes but stores the selected verb.

I gave it a try and it seems to work, but no guarantees wrt side-effects later:

1. open Scripts/Tumbleweed/Edit Script and scroll all the way down to line 2495

2. directly above the repeatedly_execute function you will find, add:
Code: ags
bool was_hovering_exit = false;
Action prev_action;


3. inside the function there's a main block checking  !IsGamePaused() && !Verbs.IsGuiDisabled(). Directly inside this block, add
Code: ags
    // walk to exit hotspots
    bool is_hovering_exit = Verbs.ExtensionEx(1,  verbsData.location_ex) == 'e';
    if (is_hovering_exit && !was_hovering_exit) {
      prev_action = verbsData.global_action;
      verbsData.global_action = eGA_WalkTo;
    }
    else if (!is_hovering_exit && was_hovering_exit) {
      verbsData.global_action = prev_action;
    }
    was_hovering_exit = is_hovering_exit;

(note the indentation, the above is indented by 4 spaces because it's two blocks in: the function itself and the if block inside)
#371
 I see, you don't need to mess with cursor modes for that.
Simply append  >er  to the name of the hotspot. That's an exit to the right. Use el, eu, ed for the other three directions.
You can also read about this in the PDF that comes with the template in the "Exit Extensions" section.
#372
All cursor modes use the same crosshair sprite. Your code works but you can't see the change of cursor mode. Unless you have assigned a different sprite to the walkTo mode?

The more important question is, what do you want to achieve? The Tumbleweed template doesn't really use different cursor modes (like the Sierra games / template), everything is based on the activated verb.

Do you want to show an exit arrow or something like that?
#373
General Discussion / Re: Free Steam keys!
Mon 03/01/2022 12:52:14
All three Tomb Raider games are free in the Epic Store.
#374
The Rumpus Room / Re: What grinds my gears!
Wed 15/12/2021 08:16:36
It grinds my gears when I see actual tweets of actual people defending Elon Musk.

I know he has fans, and probably millions of them, but I can live with that as an abstract bubble of people I'll hopefully never see let alone meet. Being reminded that these are actual, real people who feel the need to jump to the defense of a 12-year-old bald wannabe comedian who's also the richest person alive and exploiting his workforce is very depressing and annoying.
#375
Great!

I should probably add an .Enabled bool to the chats... :P
#376
The module has a repeatedly_execute_always, but that only really does stuff when the button used to display the chat is visible.
Are you using multiple buttons? Or a single one for all chats? Because if the latter, the module might actually draw all chats on top of each other... :X
#377
#378
Yeah, that's probably the famous alpha blending issue.
Can you make a screenshot and crop it and use that as basis for your background sprite? Because I'm pretty sure there's no easy fix for this.
#379
The Rumpus Room / Re: What grinds my gears!
Thu 19/11/2020 17:56:36
What grinds my gears right now is how prevalent innumeracy is. Or rather, people confidently and loudly spreading nonsense while also not understanding extremely basic math.

1. Biden and Trump are hailed for their record-breaking voter turnout all over the place. The amount of people who vote grows with the population though, so the only relevant figure is the percentage of potential voters. Both have less than Reagan, Trump has less than Bush, and if you go back to when women were allowed to vote, they are on #10 and #15, respectively, behind Nixon. Not exactly as news-worthy though, I guess.

2. One of the loudest anti-lockdown fuckwits in Germany is confused about how exponential growth works and thinks that if the growth rate goes down it's no longer exponential growth. This is trivially false, as anybody understands who has ever had a bank account and seen their interest go down a few points.
#380
Thanks Cassie, I guess you're right; I was just hoping to somehow avoid the hassle of returning it. Oh well :)
SMF spam blocked by CleanTalk