AGS 3.3 Wishlist

Started by subspark, Tue 09/12/2008 03:34:03

Previous topic - Next topic

GarageGothic

#180
Float On, there is a module that already does that, though it should be updated to use extender functions and add diagonal directions, but that's pretty easy to do yourself. In fact, it's probably easiest to write it from scratch, should take about 5 minutes.

Trent R

#181
subspark: What you're looking for is under File->Preferences, although no Alpha at this time.. I do support a suggestion of that.

Float On: That's been suggested before (checking), in the Output/Stack pane at the bottom. But CJ would have to rewrite the script compiler for that to happen..
However, what you're asking isn't too hard. Script in the rep_exec a check on a global string, which is modified by a Game.InputBox. Also, check out Dualnames' AGS Console module.

FloatOn2: Extender functions! :)  Just create function FaceDirection (this Character*, FaceDirection dir) along with enum FaceDirection
[Edit]: Or check out the module that Garage posted.

~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

monkey0506

#182
@dkh: Oh...yes I must've overlooked that last night. You could do it like this:

Code: ags
import void DrawSurfaceAtXY(this DrawingSurface*, DrawingSurface *source, int x, int y, int transparency=0);

void DrawSurfaceAtXY(this DrawingSurface*, DrawingSurface *source, int x, int y, int transparency) {
  if ((source == null) || (x > this.Width) || ((x + source.Width) < 0) || (y > this.Height) || ((y + source.Height) < 0)) return;
  bool negx = (x < 0);
  bool negy = (y < 0);
  if (negx) x = -x;
  if (negy) y = -y;
  if (transparency < 0) transparency = 0;
  if (transparency > 100) transparency = 100;
  DynamicSprite *sprite = DynamicSprite.Create(source.Width, source.Height);
  DrawingSurface *surface = sprite.GetDrawingSurface();
  surface.DrawSurface(source);
  surface.Release();
  if ((negx) && (negy)) sprite.Crop(x, y, sprite.Width - x, sprite.Height - x);
  else if (negx) {
    sprite.ChangeCanvasSize(sprite.Width, sprite.Height + y, 0, y);
    sprite.Crop(x, 0, sprite.Width - x, sprite.Height);
  }
  else if (negy) {
    sprite.ChangeCanvasSize(sprite.Width + x, sprite.Height, x, 0);
    sprite.Crop(0, y, sprite.Width, sprite.Height - y);
  }
  else sprite.ChangeCanvasSize(sprite.Width + x, sprite.Height + y, x, y);
  surface = sprite.GetDrawingSurface();
  this.DrawSurface(surface, transparency);
  surface.Release();
}

GarageGothic

#183
Seems a bit overly complicated to me, monkey. What's wrong with:

Code: ags
void DrawSurfaceAtXY(this DrawingSurface*, DrawingSurface *source, int x, int y, int transparency) {
  DynamicSprite* sourcesprite = DynamicSprite.CreateFromDrawingSurface(source, 0, 0, source.Width, source.Height);
  this.DrawImage(x, y, sourcesprite.Graphic, transparency);
  }


?

You could optimize by putting in some coordinate checks for CreateFromDrawingSurface, to avoid handling a bigger section of the image than we need. But in your example, you still draw the full surface so no real speed gain by the cropping and changing of canvas size.

DoorKnobHandle

Ah, that was the workaround I said I knew that it existed but couldn't figure out! :) Of course, the .Graphic property!

monkey0506

#185
Quote from: GarageGothic on Sun 12/04/2009 18:37:11DynamicSprite.CreateFromDrawingSurface

Where are all these functions coming from? :=

@self: RTFM n00b!!%!#%^##%! ::)

DoorKnobHandle

This degree of confusion even with coders who are experienced (I dare say :) ) just shows how much these two optional ints (x, y) for the DrawSurface function would improve it all, though!

JpSoft

Higher limit in objects per room and controls per GUI would be nice.

Jp

SSH

We really should only have the dynamic sprite warning log thing in Debug versions, not compiled.
12

GarageGothic

#189
Quote from: SSH on Thu 16/04/2009 15:58:41We really should only have the dynamic sprite warning log thing in Debug versions, not compiled.

I totally agree with this. No reason to worry the end user with a non-problematic error that is bound to happen whenever someone uses Alt+X or Alt+F4 to quit the game.

Edit: And just to remind CJ, please remove the 50 character limit for savegame names.

Edit 2: A recent post reminded me of something I've been meaning to suggest for a while. Any chance there could be a GetArraySize(name) function? The size property must be stored somewhere since AGS knows when to crash with an out-of-bounds errors, so it would be great if that value could be retrieved at run-time. Of course you can always keep track on it using a #DEFINE (for static arrays) or an int, but especially for dynamic arrays it would mean cleaner code with less variables to juggle around.

monkey0506

Regarding the array size that is something Chris has talked about for some time but IIRC he wasn't sure what the most streamline method of implementing the functionality would be (i.e., in your example the function would have to be overloaded for every data type which is something AGS doesn't do or allow anywhere else!).

One possibility to allow a cleaner workaround would be if we could have dynamic arrays within custom structs then we could at least do:

Code: ags
struct IntArray {
  writeprotected int Size;
  int Data[];
  import bool Resize(int size);
};


But a built-in way of doing this would be much appreciated! :=

Crimson Wizard

Sorry if this was mentioned sometime ago (don't have a patience to read all this thread through  ::) )
I have couple of humble ideas, simply something that comes in mind when I trying to create my first game...

First of all, what about allowing user to define sprite metrics (width & height) manually when importing one from a bitmap. Sometimes that could be easier than to drag a selection box. Also maybe the input fields for these metrics could display currently selected width and height if user decided to drag the box anyway.

Secondly, a way to copy/paste GUI elements when editing GUI control - this would make it faster to create several buttons of same size.

Matti

I would greatly appreciate it if the room's object limit would be increased by 10 or 20..

For adventure games 50 objects are quite enough but for non-adventure games it sometimes isn't.

Crimson Wizard

Ah, yes, and "Watch" feature for runtime debugger, if possible!

Crimson Wizard

What about extra OnShow event handler for GUIs? Could be handy for GUIs with complex usage.

Trent R

Quote from: GarageGothic on Thu 16/04/2009 16:11:06
Edit: And just to remind CJ, please remove the 50 character limit for savegame names.
Recently came across this, and would like to voice my support.


Crimson1, this was brought up in the beginning of the thread (pages 2 or 3 I think), but CJ said it would require rewriting the script compiler, so it won't be coming soon. (If I'm getting your suggestion right. You mean to view the values of variables at runtime, right?)
Crimson2, what do you mean by OnShow? What's wrong with if(gui.Visible) check?


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Crimson Wizard

#196
Quote from: Trent R on Sat 25/04/2009 05:32:03
Crimson1, this was brought up in the beginning of the thread (pages 2 or 3 I think), but CJ said it would require rewriting the script compiler, so it won't be coming soon. (If I'm getting your suggestion right. You mean to view the values of variables at runtime, right?)
Yes, that's it.
Well, frankly, it isn't that much critical, at least for me (do not have too much complicated scripts).

Quote from: Trent R
Crimson2, what do you mean by OnShow? What's wrong with if(gui.Visible) check?
I mean an event handler that is run as soon as GUI became visible. Nothing wrong with "if(gui.Visible)" check, I just suppose it would be more convenient that way.
Well, it could be also something like "VisibilityChanged" to cover hiding GUI event as well. Maybe.

Gius

If Ags were able to manage a direct connection with the webcam?


thanks

monkey0506

Are you planning to add motion sensing (like the EyeToy) to AGS? If so you'd probably need a lot of capabilities AGS doesn't offer and would have to write a plugin anyway.

Otherwise I can't fathom a reason for AGS to utilize a webcam.

No offense though, but I can't see how it could be useful at all for AGS to support this without a ton of new functionality being added which has no practical use in an adventure game.

Shane 'ProgZmax' Stevens

I'd like to see the theora video support cj added expanded to work like scotch's plugin but with usability improvements.  For instance, being able to resize the video and have it play at a specific location as a background element; be able to set a video controls like eOnce, eRepeat, eBlock, eNoblock.  Actually, I'm curious if PlayVideo could just be expanded to support these settings for all the video formats?

SMF spam blocked by CleanTalk