Author Topic: Better dialogue in AGI  (Read 352 times)

0 Members and 1 Guest are viewing this topic.

Offline bokkers

Better dialogue in AGI
« on: April 29, 2025, 08:47:02 AM »
Hi folks,

I'm wondering how I can improve the gaming experience for an adventure game I'm working on (V): There's lots of dialogue between player and npcs, and the print command with its black on white text works fine, but compared to how SCUMM presents dialogue, it's not optimum: Colored text on top of the screen, without window popups, character animations while they say something and we can read the text, this must be achievable in AGI somehow.

It's not just about the look, I mainly want the player to be less confused about who's speaking after 2 or 3 AGI print popups.

How can we achieve neater dialogue flow in AGI games? Several aspects and approaches:
1) The display command gives us colored text. Neat! If I do that on an animated screen, how I can I erase it smoothly without breaking the screen?
2) Is there really no way to get the typical AGI text popups to use something different than black on white? Can we at least mess with the red border or something?
3) Can we have a text window pop up (with print.at) simultaneously with a sprite next to it, and then both disappear on key press? That would offer a workaround, where the player at least sees who is speaking at all times.

Need to experiment around with this, but maybe some of you have ideas or experience with character dialogue presentation i thought...
Cheers from the workshop!
b.o.k.
« Last Edit: April 29, 2025, 08:55:59 AM by bokkers »



Offline lskovlun

Re: Better dialogue in AGI
« Reply #1 on: April 29, 2025, 07:41:09 PM »
This would be easy in SCI (see for example the CatDate demo by Kawa where the intro presents its dialogue very differently to the main game). I think AGI allows you to print text given text mode coordinates (meaning it works in multiples of 8 pixels or so), but I'm not sure.

Offline cosmicr

Re: Better dialogue in AGI
« Reply #2 on: April 30, 2025, 12:11:24 AM »
I remember the "Operation Recon" demo - they used speech bubbles. The author(s) wrote an external utility that would render and save new view files with a custom font that they then imported into their game.

You could try that, but you run the risk of your game growing very fast in size. I can't remember the maximum amount of views on the screen, but it if it's more than say, 100 (it isn't) or so you could build text up programmatically too with each character/letter being a view. Not really feasible.

1. I think that the Display command draws directly to the visible screen, so if you call show.pic after displaying the text it should redraw the double buffer (I'm not 100% sure).

2. The only way to change the styling of the builtin text box is to alter the game executable as far as I know

3. I think it is possible to display a view with a print.at command at the same time. You just call draw and erase on the view before and after displaying the text.

Offline bokkers

Re: Better dialogue in AGI
« Reply #3 on: April 30, 2025, 01:47:16 AM »
Thanks for your input folks! I will play around with 1 and 3 in the coming days and let you know what I find.

Offline Kawa

Re: Better dialogue in AGI
« Reply #4 on: April 30, 2025, 08:14:21 AM »
Mixed-up Mother Goose anyone?

Offline bokkers

Re: Better dialogue in AGI
« Reply #5 on: April 30, 2025, 06:21:06 PM »
Right on! Had totally forgotten about MUMG. Two interesting techniques in there:
1) The speech bubbles are great, just a static view cel and display commands on top.
2) There's also a "fake" text window with progressing text and an animation playing underneath. They set windows_remain first, then open up an empty text window, and then display single lines on top of that:
Code: [Select]
 
  set(f15);
  print.at("                                   \n\n\n\n\n\n\n",0,3,37);
  display(1,3,"There was an old woman");
  display(2,3,"   who lived in a shoe.");
Neat! Thanks for bringing up that game!

Offline AGKorson

Re: Better dialogue in AGI
« Reply #6 on: May 01, 2025, 10:32:12 PM »
If you are releasing the game to run in MSDOS (or DOSBox) only, the Power Pack would be a good option. The print window colors are fully customizable in the Power Pack.

There is no other way to change the print window colors- the values are hard-coded in AGI.EXE.

Also, remember that when using the display() command on the graphics screen, you color choices are severely limited - you can have black characters on white background, or any color characters on black background. No other combinations work. (Well, one minor exception- you can overflow the values passed to set.text.attribute() to can get black characters on any color background - see the WinAGI help file if you want details).

Once you add text with the display() command, there is no easy way to clear it. You can call the graphics() command, which will work, but it causes a very noticeable flicker. Another option that would work would be to draw an object with a rectangular view that completely covers the text, but with a priority that doesn't add anything to the visual screen. That will clear the text cleanly. Or, if you are using a view to show a bubble, erasing that will also clear the text that yu draw on top of the bubble.

Offline bokkers

Re: Better dialogue in AGI
« Reply #7 on: May 02, 2025, 08:09:45 AM »
Thanks for chiming in! Good points there.

I am now styling the dialogue with only print.at and a static portrait of the speaker next to it. That already greatly improves dialogue presentation and avoids confusion. Perfect solution for me, as I love the classic AGI look and feel and don't want to stray to far away from that. :) The display command is great for text in arcade sequences and special story events, and I will definitely use that add a couple speech bubbles to the game for dramatic effect.

EDIT: Here is what looks like.
« Last Edit: May 02, 2025, 09:28:47 AM by bokkers »

Offline cosmicr

Re: Better dialogue in AGI
« Reply #8 on: May 07, 2025, 12:05:00 AM »
Looks great! Can't wait to see our Lizard overlords.

Offline bokkers

Re: Better dialogue in AGI
« Reply #9 on: May 10, 2025, 09:02:47 AM »
Great to hear. Will make sure it will be an adventure gaming feast, not just for reptile lovers... ;)


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.051 seconds with 23 queries.