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

#141
I've managed to figure out half the problem. Using my remove function and inputting the text from the second string (the one created when the text wraps) works fine, now it's just a matter of figuring out exactly what the characters in the top string are.
#142
Hello,

I've got a Casebook in my game which features a list of objectives that are added and removed as progress is made throughout investigations. Until now, I had coded some pretty basic functions to add the objective text to a listbox, as well as removing it by name.

For reference, I used the help of this thread for removing the items.

Today, I used monkey0506's code from this thread so that my text would wrap, as up until this point it had been trailing off the screen.

Now the issue I'm having is that removing the text no longer works if the string wraps. I'm assuming this is because the function to make it wrap is changing the string text when truncating and appending, so referring to it by its original name no longer causes it to match.

Is there any way to still remove the longer strings by name?
#143
AGS Games in Production / Re: Lamplight City
Sun 06/08/2017 05:32:21
Right, I went back and properly animated the Spanish moss. Hopefully it looks a bit more natural now :)
#144
AGS Games in Production / Re: Lamplight City
Sat 05/08/2017 14:48:15
Yeah, it's my first real go at this, so I'm learning! Thanks for the feedback :)
#145
AGS Games in Production / Re: Lamplight City
Sat 05/08/2017 01:36:50

Playing with some environmental animations. A light breeze wafts through St. Denis Cemetery.
#146
Yeah, I'm using 640x400.

Glad to hear it worked!
#147
It's a great aesthetic that nobody ever used, so that's why I'm appropriating it :)

Anyway, for the text on the bottom, I wrote a simple custom function I called SayEx:
Code: ags
function SayEx(this Character *, String text)
{
  Game.SpeechFont = eFontFont3;
  Speech.TextAlignment = eAlignLeft;
  if (text.Length >= 102)
  {
    this.SayAt(0, 376, 630, text);
  }
  else
  {
    this.SayAt(0, 365, 630, text);
  }
  Game.SpeechFont = eFontFont1;
  Speech.TextAlignment = eAlignCentre;
}


What this does is change the display font (if it's going to be different from the rest of your game's font) and it also checks to see how long the string is so it can determine where to display the text. Since SayAt can be a little tricky, I have to have it display at different Y coordinates if it's longer than 102 characters. You might have to play around with these values to figure out what works best for you.

As for the dialogue GUIS, I have a custom text box GUI for the closeup options, and have this custom script for the regular dialogues at the bottom of the screen:
Code: ags
function dialog_options_get_dimensions(DialogOptionsRenderingInfo *info)
{
  if (GetGameOption(OPT_DIALOGOPTIONSGUI) != 2)
  {
  // Create a 200x200 dialog options area at (50,100)
  info.X = 0;
  info.Width = 640;
  info.Height = 43;
  // Enable alpha channel for the drawing surface
  info.HasAlphaChannel = true;
  }
}

function dialog_options_render(DialogOptionsRenderingInfo *info)
{
  if (GetGameOption(OPT_DIALOGOPTIONSGUI) != 2)
  {
  // Clear the area yellow
  info.Surface.Clear(16);
  int i = 1,  ypos = 0;
  // Render all the options that are enabled
  while (i <= info.DialogToRender.OptionCount)
  {
    if (info.DialogToRender.GetOptionState(i) == eOptionOn)
    {
      if (info.ActiveOptionID == i) info.Surface.DrawingColor = 15;
      else info.Surface.DrawingColor = 17430;
      info.Surface.DrawStringWrapped(5, ypos, info.Width - 10, 
                         eFontFont3, eAlignLeft, info.DialogToRender.GetOptionText(i));
      ypos += GetTextHeight(info.DialogToRender.GetOptionText(i), eFontFont3, info.Width - 10);
    }
    i++;
  }
  }
}

function dialog_options_get_active(DialogOptionsRenderingInfo *info)
{
  if (GetGameOption(OPT_DIALOGOPTIONSGUI) != 2)
  {
  int i = 1,  ypos = 0;
  // Find the option that corresponds to where the player clicked
  while (i <= info.DialogToRender.OptionCount)
  {
    if (info.DialogToRender.GetOptionState(i) == eOptionOn)
    {
      ypos += GetTextHeight(info.DialogToRender.GetOptionText(i), eFontFont3, info.Width - 10);
      if ((mouse.y - info.Y) < ypos)
      {
        info.ActiveOptionID = i;
        return;
      }
    }
    i++;
  }
  }
}

function dialog_options_mouse_click(DialogOptionsRenderingInfo *info, MouseButton button)
{
  // do something here if you want!
}


At this point in the game, it's just a matter of calling SetGameOption(OPT_DIALOGOPTIONSGUI, dialog GUI number)

Hope that helps!
#148
Hey, I think I have an idea of what you want to do. I'm doing something similar in my game, but I'm not sure if it's exactly what you want.


Narrator text appears at the bottom of the screen.


Dialogue options in "wide" view also appear at the bottom of the screen.


Dialogue options in closeup conversation view appear in a list in the center on a custom GUI.

If this is more or less what you're trying to achieve, I'll gladly let you know how I'm doing it!
#149
AGS Games in Production / Re: Lamplight City
Wed 26/07/2017 06:29:08
Ah, I can see how it looks like a cityscape! It's just supposed to be a crumbling wall with the brick exposed. I'll tweak it a bit so it reads better.
#150
AGS Games in Production / Re: Lamplight City
Mon 24/07/2017 22:50:05
Quote from: Hobo on Mon 24/07/2017 22:31:54
Were chalk outlines an actual professional investigation thing? They always struck me as kind of odd.

I'm pretty sure the practice of chalk outlines at crime scenes is purely in the realm of fiction, considering it would contaminate the evidence at the scene. It is a visually striking image, though, so I'm willing to trade realism for style :)
#151
AGS Games in Production / Re: Lamplight City
Mon 24/07/2017 17:39:06
Depends on the background, but generally speaking about 1-2 days. I didn't keep track of how long this latest one took me, but I'd estimate about 16 hours total. I've definitely gotten faster with practice!
#152
AGS Games in Production / Re: Lamplight City
Sun 23/07/2017 16:39:41
Quote from: ClickClickClick on Sun 23/07/2017 16:23:45
Are the black bars there to prevent spoilers?


No, the game is just letterboxed. The GUI appears in the top bar and some game text appears at the bottom.
#153
AGS Games in Production / Re: Lamplight City
Sun 23/07/2017 15:37:55

Investigating a murder in the rough part of town.
#154
Backed, applied as a speaker, and attending! :D
#156
I hadn't seen this in a while. Something about seeing an uncensored Guido still creeps me out :grin:

Nice job!
#157
AGS Games in Production / Re: Lamplight City
Wed 05/07/2017 21:06:50
Quote from: AndyfromVA on Wed 05/07/2017 19:24:29
Quote from: Grundislav on Tue 04/07/2017 02:44:37
So, as you may or may not have heard, Lamplight City won't be published by Wadjet Eye.

I hope to be able to make an announcement about the game's future within the next couple of weeks, but details are still being ironed out.
Not great news.  Please don't give up on this wonderful project.

Oh, don't worry, the project isn't going anywhere. It'll be released one way or another, it's just those details that I'm currently sorting out :)
#158
AGS Games in Production / Re: Lamplight City
Tue 04/07/2017 02:44:37
So, as you may or may not have heard, Lamplight City won't be published by Wadjet Eye.

I hope to be able to make an announcement about the game's future within the next couple of weeks, but details are still being ironed out.
#159
Episode 109

Jacob Janerka, creator of Paradigm, joins us to talk game design and the challenges of your first release.
#160
AGS Games in Production / Re: Lamplight City
Tue 27/06/2017 19:45:36
I have now sneakily gone through and updated all screenshots in this thread to reflect the higher resolution sprites.

And here is a sample of a handful of characters redone at higher resolution.


I realize the last 2 on the right are a bit funky below knee level. That's because they both always stand behind counters so I got lazy :D
SMF spam blocked by CleanTalk