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

#61
Can't Flash export in other formats that AGS can use?
#62
No, it's not actually an acronym. :P

I've always been of the idea that GUIs should always look as good as the game. After all, if the game is beautiful, why shouldn't the interface be? Even if it's just a GUI, having it look all animated and fluid gives it that extra touch. You don't want players to be taken back by the grey boxes whenever they save a game.

Therefore, I've decided to start working on a module for AGS to fix this. Granted, AGS GUIs can already look nice, to an extent. But they could be so much more! Currently I've implemented the following features:

- Button views: Buttons can have Normal, MouseOver and Pressed sprites. But now, they can have views instead! And not just the former, but support for Normal, MouseIn, MouseOut, MouseDown and MouseUp! You can also hook this up with sounds or, if you need, have your own code run with these events.
- GUI transitions: instead of just having GUIs pop onto the screen, now you can have them fade, slide, and whatever else you want.
- Popup GUIs: Currently you can have GUIs pop up from the top of the screen, but with this, you can have them pop up from any side of the screen, as well as change it during runtime. I might also combine this with transitions.

But I'm probably not the only one wanting to improve the GUI, so I figured I'd post here to get some feedback on what other people wanna do with their GUIs, what do you think of my ideas, or even if it's not that useful. :P
#63
I've decided to look a bit into this and there seems to be something up with how AGS switches to such low resolutions in Vista. If you run a full-screen AGS game in 320x200/320x240, the screen will blink a couple of times (possibly trying to switch resolution) until eventually it gives up with something like this:
---------------------------
Adventure Game Studio
---------------------------
There was a problem initializing graphics mode 320 x 200 (8-bit).
(Problem: 'Can not set video mode')
Try to correct the problem, or seek help from the AGS homepage.

Possible causes:
* your graphics card drivers do not support this resolution. Run the game setup program and try the other resolution.
* the graphics filter you have selected does not work. Try another filter.
---------------------------
OK  
---------------------------
This could still be just a driver issue, but since other applications like DOSBox or The Games Factory switch to 320x200 fine, it might be worth looking into. Though you can just setup to 640x400/640x480 or to run in a window and that'll work.

I'm gonna do some more Vista testing to look for any other issues.
#64
Quote from: Stee on Wed 16/05/2007 20:29:57
Just my opinion, but with the removal of 320x200 support in Vista, would it be possible to get the compiled exe, to check the OS, and if its vista run the game in 640x480?
Actually 320x200 / 320x240 full-screen still works on Vista. It's just a mix of whether the application and video drivers execute it properly on Vista.

Thus it's still best to just use the Setup option to change it yourself since everyone might experience it differnetly.
#65
I crudely came up with this using physics.

x=x0+v0x*t
y=y0-v0y*t+0.5*g*(t*t)

(x0 = initial x, y0 = initial y, t = time, g = gravity)

In AGS, it'd end up something like:
Code: ags

float xx, yy, t=0.0;

rep_ex() {
  if (t < 12.0) {
   t += 0.25;
   xx = 100.0+5.0*t;
   yy = 200.0-8.0*t+0.5*1.0*(t*t);
   cEgo.x = FloatToInt(xx);
   cEgo.y = FloatToInt(yy);
  }
}
#66
Make sure you're using the Interact cursor mode to select them.
#67
Quote from: strazer on Mon 14/05/2007 14:15:56
Do you use this code in the game_start function?
If so, it is a known bug that System.ViewportHeight returns a height of 200 instead of 240 pixels there.
If you're coding a module, you could put the code in the on_event function instead.
That fixed it, thanks. :D

Another side-effect of this "bug" is that you also can't set a GUI.Y >= 200 in on_game_start.

Wait. If I can set the X/Y coordinates to any value in the GUI Editor, why can't I do the same in the script?
#68
This isn't a 640x400 game with "letterbox" on though. This is a native 640x480 game with no black space in it. So it ends up looking a bit ugly since part of the room is seen under the GUI.

Is there anyway I can check for "letterbox" mode in the script so I can add the extra bit respectively?
#69
I nedd to put a GUI on the bottom of the screen, regardless of whatever resolution or GUI size is used. Currently I use:

somegui.Y = System.ViewportHeight-somegui.Height;

The problem is, this doesn't work with 640x480 (letterbox resolution). The Y returned is 160, while the Y I need is 200, and ScreenWidth is completely out of the question. Suggestions?
#70
Judging by the message, the game is still using a SCI font, which only supports standard characters and symbols (as shown in the Font window). Import a TTF (TrueType) font (for example from your Windows\Fonts folder) and that should fix it. Also, make sure the TTF font is being used: replace Font 0 for display text (GUIs, boxes, etc.) and Font 1 for speech text.
#71
AGS 2.8 can't fix it either:

---------------------------
Adventure Game Studio
---------------------------
An error ocurred whilst trying to import your game. The error was: File contains invalid data and is not an AGS game.



If you cannot resolve the error, please post on the AGS Technical Forum for assistance.



Error details: AGS.Types.AGSEditorException: File contains invalid data and is not an AGS game.

   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)

   at AGS.Editor.OldGameImporter.ImportGameFromAGS272(String gameToLoad, Boolean useWizard)

   at AGS.Editor.AGSEditor.LoadGameFromDisk(String gameToLoad, Boolean interactive)
---------------------------
OK   
---------------------------

Obviously I'm an idiot and don't have a recent backup of the game. The thought only occurs when it's too late. :( There's some backup_* files in the folder, and I tried swapping them with the real ones, but still no effect.

I have a working compiled game EXE though, dunno if I can get anything out of that. And if it helps, here's the game files in question. The game is void of any real content, I only use it as a "sandbox" for all my scripting work, so all I need is to get the code out of it. The rest is moot.
#72
So, I loaded up my test game and got an error. And then AGS quit. Just like that. :(

---------------------------
AGS Editor
---------------------------
Error loading game: Inconsistent data files (scm)
---------------------------
OK   
---------------------------

Please please please don't tell me my test game just hit scripting heaven. I had lots of WIP modules in there! :'(
#73
Sure, the more Math functions, the better. They all eventually become essential to coding. :)

While we're at it, some kind of "Nth root" would be nice. Square root is a bit limited.
#74
Built-in templates for the most common requests would suffice, such as Lucasarts style, RPG game, etc.
#75
That means that the thought string has no value (null) when the comparison is done. Either make sure you assign it a value at start - "StrCopy(thought,"");" - or change the comparison to this - "if ((thought != null) && (StrCaseComp("Curtis' favor", thought)==0))".
#76
Might be a system issue. I remember when I had a rather damaged Win XP installation, "Windows Installer" popped up everytime I started the AGS Editor.
#77
The only way to do that is to have a "non-blocking" Walk command, but then the character would pick up the item instantly after starting to walk.
#78
I'd store the original object position before the drag, and when 'isobjectcolliding' hits, put it back on the original position.
#79
I think a user can have more than 9 views and 9 loops though. Although I could make it break strings like "10,0,5,2,4,39" into integers. Something like:

Code: ags

static function Gooey::Animate(GUIControl*trag, String par) {
  ...
  int i = 0;
  String s = "";
  while (i < par.Length)
  {
    if (par.Chars[i] == ",")
    {
      gooey_animate[i].norm_view=s.AsInt;
      s = "";
    }
    else
    {
      s.AppendChar(par.Chars[i]);
    }
  }
  ...
}


...dammit, I'm never sticking with a method at this rate. :P
#80
So, I was calmly working on my module when all of a sudden "Script link failed: Runtime error: unresolved import 'Gooey::Animate^11'". Oh crap, I finally did it, I broke AGS with my grossly lazy code. So, time to start cutting down on my function.

This is what I currently have. It basically looks for an empty spot in the array and assigns stuff to it.
Code: ags

static function Gooey::Animate
(GUIControl* targ,
 int norm_viw, int norm_lop,
 int min_viw, int min_lop,
 int mout_viw, int mout_lop,
 int mdown_viw, int mdown_lop,
 int mup_viw, int mup_lop)
{
  int i = 0;
	while (i < 20)
	{
		if (gooey_animate[i].target == null)
		{
			gooey_animate[i].target = targ;
			gooey_animate[i].norm_view = norm_viw;
			gooey_animate[i].norm_loop = norm_lop;
			gooey_animate[i].min_view = min_viw;
			gooey_animate[i].min_loop = min_lop;
			gooey_animate[i].mout_view = mout_viw;
			gooey_animate[i].mout_loop = mout_lop;
			gooey_animate[i].mdown_view = mdown_viw;
			gooey_animate[i].mdown_loop = mdown_lop;
			gooey_animate[i].mup_view = mup_viw;
			gooey_animate[i].mup_loop = mup_lop;
			gooey_animate[i].status = eGooey_None;
			return;
		}
		i++;
	}
}

So it'd be called like so:
Code: ags

Gooey.Animate(btnHover1, 2, 0, 2, 1, 2, 2, 2, 3, 2, 4);


My first idea was to have an array:
Code: ags

static function Gooey::Animate
(GUIControl* targ, int views[10])
{
  int i = 0;
	while (i < 20)
	{
		if (gooey_animate[i].target == null)
		{
			int j = 0;
			while (j < 20)
			{
				if (views[j] == null) views[j] = 0;
				j++;
			}
			gooey_animate[i].target = targ;
			gooey_animate[i].norm_view = views[0];
			gooey_animate[i].norm_loop = views[1];
			gooey_animate[i].min_view = views[2];
			gooey_animate[i].min_loop = views[3];
			gooey_animate[i].mout_view = views[4];
			gooey_animate[i].mout_loop = views[5];
			gooey_animate[i].mdown_view = views[6];
			gooey_animate[i].mdown_loop = views[7];
			gooey_animate[i].mup_view = views[8];
			gooey_animate[i].mup_loop = views[9];
			gooey_animate[i].status = eGooey_None;
			return;
		}
		i++;
	}
}

So it'd be called like so:
Code: ags

int view[10];
view[0] = 2;
view[1] = 0;
view[2] = 2;
view[3] = 1;
view[4] = 2;
view[5] = 2;
view[6] = 2;
view[7] = 3;
view[8] = 2;
view[9] = 4;
Gooey.Animate(btnHover1, view);

The downside is, well, the user has no idea what each value is for without constantly looking up the documentation (not that the old method was any clearer, but I would fix that... eventually :P ). And it looks like an awful lot of code, but you could use while loops or some such thing for it. Plus you could have optional parameters in any order.

My other idea is having a pseudo-pointer:
Code: ags

static function Gooey::Animate()
{
  int i = 0;
	while (i < 20)
	{
		if (gooey_animate[i].target == null)
		{
			gooey_animate[i].target = null;
			gooey_animate[i].norm_view = 0;
			gooey_animate[i].norm_loop = 0;
			gooey_animate[i].min_view = 0;
			gooey_animate[i].min_loop = 0;
			gooey_animate[i].mout_view = 0;
			gooey_animate[i].mout_loop = 0;
			gooey_animate[i].mdown_view = 0;
			gooey_animate[i].mdown_loop = 0;
			gooey_animate[i].mup_view = 0;
			gooey_animate[i].mup_loop = 0;
			gooey_animate[i].status = eGooey_None;
			return i;
		}
		i++;
	}
}

So it'd be called like so:
Code: ags

int i = Gooey::Animate();
gooey_animate[i].target = btnHover1;
gooey_animate[i].norm_view = 2;
gooey_animate[i].norm_loop = 0;
gooey_animate[i].min_view = 2;
gooey_animate[i].min_loop = 1;
gooey_animate[i].mout_view = 2;
gooey_animate[i].mout_loop = 2;
gooey_animate[i].mdown_view = 2;
gooey_animate[i].mdown_loop = 3;
gooey_animate[i].mup_view = 2;
gooey_animate[i].mup_loop = 4;

This last method looks nice in theory. Gooey::Animate finds and initializes a spot for the user to fill in the values, you can easily cut down on lines if you're not gonna use every value (optional parameters), plus you can actually read what it does. The downside is exposing the gooey_animate[] array means the user can play all kinds of unexpected havoc if he wants. And then I have to clean up the mess. :P

Thoughts?
SMF spam blocked by CleanTalk