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 - Ryan Timothy B

#421
The Rumpus Room / Re: *Guess the Movie Title*
Mon 24/06/2013 01:59:08
No, you can still post an image. It's just a fun and interesting "find the connection" thing that Ben does when he posts a new movie capture based on the previous.
#422
                                                                                                                                                                                     Side-note (literally):
Quote from: Renodox on Sun 23/06/2013 22:12:07
You must've fallen out of the ugly tree and hit every branch on the way down!
Quote from: Stupot+ on Sun 23/06/2013 22:42:39
Your father could be any one of the drunkards in town.
That isn't a counter response Stupot, it's a completely new insult that doesn't relate to the insult given.
#423
Are you creating any DynamicSprites?
#424
Oh OK. Makes sense. So X would be an Offset while Y would be a Position. Unless there's a "top-side" or "bottom-side" as well. Just saying. (laugh)
#425
Quote from: Crimson Wizard on Sun 23/06/2013 17:50:28
Uh, can you elaborate?
You were speaking of the offsets as actually being offsets, yes? Like whatever AGS currently automatically assigns as the position for the Portrait, the offset just adds to that? Otherwise it isn't an offset, it's strictly an X,Y position.

Code: ags
int     Game.SpeechPortraitOffsetX;
int     Game.SpeechPortraitOffsetY;
#426
Ooo I like the idea of there being the option of an offset of what AGS's hardcoded positioning will be. BUT, there should still be a manual X,Y so that you don't have to adjust via math or anything.

Edit: I prefer:
Code: ags
PortraitSpeechStyle.ManualPosition(int x, int y);

Drop the "Sierra" from the name.

Or rather:
Code: ags
SpeechStylePortrait.ManualPosition(int x, int y);

That way if you ever added more SpeechStyles, it's easier to find them with autocomplete.
#427
Quote from: Crimson Wizard on Sun 23/06/2013 12:06:25
I'll redo that to a property.
What do you mean by that? (I'm not too knowledgeable with programming terms)

The other option is to do it this route:
Code: ags
game.speechPortrait_setPosition(int x, int y)  // which also enables "manual positioning"
game.speechPortrait_disableManualPositioning()  // to disable it and revert to AGS hardcoded placement


I'm not too agreeable with the disableManualPositioning(), but it is certainly clear and to the point.
#428
Quote from: ShinjinNakamura on Sun 23/06/2013 11:29:01
By the way I tried the whole new script on a non alpha channel image. Unfortunately it didn't work.
Hmm. Out of curiousity... Did you end up putting the dialog_options_get_dimensions function that you had in? Is it possible the X and Y of the DrawImage was off the boundaries of this dialog?
What part of the dialog_options_render didn't work - just the drawImage or the text as well? Did you try changing the option text color, did that work? If not then it sounds like more of an issue than just your image not drawing.
#429
Quote from: Armageddon on Sun 23/06/2013 06:33:29
Is that chapstick in your shorts?
Is that a Tic Tac in your shorts or did you just swim in cold water?

-------------

You'll never be the man your mother is!
#430
Quote from: Crimson Wizard on Sat 22/06/2013 10:14:56
   game.speech_portrait_placement = 1; // enable custom offsets
I haven't had the chance to check this out, but is this what I think you've done. Instead of adding a new built-in enum, you've done the "unspeakable" mess of using an int that doesn't help the programmer in anyway to know what they're reading? I don't agree with this at all. Just my 2 cents.

Magic numbers should be avoided in programming. Especially in a widely used program. CJ was bad at this too.

Or was this meant as a boolean? If so, the variable name is a little misleading. (edit: now that I've read it again, it most certainly must be boolean - very misleading name indeed)

Edit again: I suggest:
Code: ags
game.speech_portrait_manual_placement

To be similar to other AGS variables like Character.ManualScaling, etc.
#431
I was a little confused earlier. I had forgot how AGS's dialog_options_render worked. I was thinking "info" was your GUI. My apologies.

Quote from: ShinjinNakamura on Sun 23/06/2013 03:18:55
surface.DrawImage (100, 100, oDoor.Graphic, 40);
Where oDoor.Graphic is placed, how do I signify an object as a graphic? I assumed any object/picture/character we use always takes the form of a sprite.
For instance, in the case of your bubble graphic, you would simply use:
Code: ags
surface.DrawImage (100, 100, 13);

oDoor.Graphic simply points to the sprite or dynamic sprite number that the object is using. I personally think it's a little misleading as it should've been named oDoor.SpriteID or oDoor.SpriteIndex, or something along those lines.


If you want the dialog options to be drawn over the cloud bubble sprite (13), simply do this (assuming your sprite isn't an alpha channel image). Mostly copying from the manual:
Code: ags
function dialog_options_render(DialogOptionsRenderingInfo *info)
{
  info.Surface.Clear(COLOR_TRANSPARENT);    // Clear the area transparent
  info.Surface.DrawImage(0, 0, 13);    // Draws your cloud sprite behind the custom dialog render
  
  int i = 1,  ypos = 0;
  while (i <= info.DialogToRender.OptionCount)    // Render all the options that are enabled
  {
    if (info.DialogToRender.GetOptionState(i) == eOptionOn)
    {
      if (info.ActiveOptionID == i) info.Surface.DrawingColor = 13;
      else info.Surface.DrawingColor = 4;
      info.Surface.DrawStringWrapped(5, ypos, info.Width - 10, eFontFont0, eAlignLeft, info.DialogToRender.GetOptionText(i));
      ypos += GetTextHeight(info.DialogToRender.GetOptionText(i), eFontFont0, info.Width - 10);
    }
    i++;
  }


This code along with the one you posted that adjusts the X, Y, Width and Height.

Now if your speech bubble is an alpha channel image, then an actual GUI is likely the route you'll need to go. Let me know.
#432
I have to work in just a moment so this will be very brief. You're using DrawImage and DrawingSurface wrong. From the manual, this is what it shows for DrawImage and DrawingSurface:
QuoteDrawImage
Code: ags
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
surface.DrawImage(100, 100, oDoor.Graphic, 40);
surface.Release();


Then under the manual for getting a drawing surface for an existing sprite:
Quote
GetDrawingSurface (dynamic sprite)
Code: ags
DynamicSprite *sprite = DynamicSprite.CreateFromExistingSprite(object[0].Graphic);
DrawingSurface *surface = sprite.GetDrawingSurface();
surface.DrawingColor = 13;
surface.DrawLine(0, 0, 20, 20);
surface.Release();
object[0].Graphic = sprite.Graphic;
Wait(40);
sprite.Delete();


I'm still not sure what you're trying to do. Assigning sprite 13 as the GUI's background sprite? And then you're also adjusting the width/height and position in dialog_options_get_dimensions. Since it's a GUI, why not just adjust that stuff within the GUI editor?

I don't have time to explain how to use a custom GUI, but the previous should help you understand what your error is.
#433
@Problem: That was awesome! ;-D
#434
Sorry, I didn't mean to suggest you were doing it wrong. I just meant if it's only a small portion of the background which is actually changing (not the entire image. Eg: night to day) then you're better off having a single background with an object animating the small background area that changes. Understand?
#435
I find that people animate backgrounds far more than they need to. They often over use it. For instance having the clouds at the top of the image change shape, one doesn't need two different backgrounds (unless the whole background is affected by this change). All you would need is an object covering the sky with the cloud images - instead of perhaps 5 entire background images for just the skyline.
#436
QuoteCharacters are not saved in room, they are global objects.
d) the sprites assigned to the characters that are in the new room (as long as they weren't travelling with you, AGS has to load their sprites into memory).
#437
Replace  eBlock  with eNoBlock
Since you're now checking if cBoram's Y position is 380, there is no need for a blocking call. BUT you also need to check if he's walking first.

Code: ags
function room_RepExec()
{
  if (!cBoram.Moving) {  // condition continues if he's not moving
    if (cBoram.y != 380) cBoram.Move(705, 380, eNoBlock, eAnywhere);
      else cBoram.Move(705, 370, eNoBlock, eAnywhere);
  }
}


Very basic, this is only assuming your character only moves up and down, and that's all.
#438
Quote from: frenzykitty on Tue 18/06/2013 16:48:38
I can still remember the first game I ever got (my dad bought it for me on my birthday) was Maniac Mansion :)
Mine was Loom and Monkey Island wrapped and sold together, given to me and my brothers at Christmas. At first I had called it Monkey Is-land.

I still feel Monkey Island is the best game I've ever played, or at least the most memorable.
#439
Quote from: monkey_05_06 on Tue 18/06/2013 01:29:09
But Ryan Timothy can take ahold of his precious Java and take a running leap.
I saw this coming before I even finished reading your post. I'll say this again: I wholeheartedly prefer C# over Java. I had only suggested Java in the first place because of C# requiring .NET (and it being Microsoft - whom you hate). That and how Java is universally accepted on all OS.

Quote from: Calin Leafshade on Tue 18/06/2013 02:33:17
My guess is that CJ simply wanted the challenge of making a language and compiler from scratch
That's exactly what I was going to say after reading Monkey's post. The challenge alone, if I were as capable as CJ, would've steered me towards making my own scripting language as well.

I've actually been looking into MonoDevelop and SharpDevelop lately and they seem to be likely candidates if one were to do a redo of AGS. *blasphemy*  (and no, I have no problems saying AGS script is shit to deal with)

And let's continue this conversation elsewhere.
#440
In the character editor there's a button at the top: Make this the player character

Then for that character, in the properties tree under Starting Room, select the room you wish.
SMF spam blocked by CleanTalk