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

Topics - SupSuper

#1
Even with Mouse.Visible=false, the mouse cursor pops up when dialog options are displayed at the bottom of the screen, although it won't move. It goes away again after an option is picked.
#2
I created a IScriptEditor control through GUIController.CreateScriptEditor, but there isn't much I can do with it aside from placing it in my panel and changing its content. Is there any way to be able to get text selections and other user input from it, like a TextBox? I can't cast the control since it's a custom type.
#3
Introduction
Ever since it was announced that AGS 3.0 wouldn't have an interaction editor, I've been fiddling around with an alternative, since not everyone is experienced with scripting. However, being a scripter myself, I have no idea what non-scripters would find easier, so I figured I'd post my plugin here to get some feedback, even though it's far from complete.


Click to view the demo video. (5MB)

What is it?
Simple Scripter is a bit of an indirect approach to scripting. Instead of writing the code yourself, you just add functions, properties, etc, but Simple Scripter writes the code for you. Just right-click a script and select "Simple edit". The script is displayed in a listbox on the bottom, and the top area lets you change the line in question. For example, if you select a line with a Say function, Simple Scripter will give you boxes for the Character Script-O-Name and Message, and automatically update the script below with any changes you make. You can also add lines from a list of functions, remove them, copy them, shift them around, etc.
I guess the big challenge here is not only does Simple Scripter turn an "interaction" into script, it also does the opposite.

What I'm looking for
Mainly I'm looking for what people would like to see in a "interaction editor replacement" and if this comes any close. Bug reporting at this point is rather futile since I'm aware of lots of issues and things still left unsolved. The plugin works with a rather strict coding style (only one expression per line) and will probably fumble anything else, the script reference isn't complete, there's no validating, etc. Just let me know if you would like to see this developed and what you would like to see in it.

Download
v0.01 (1 Feb 2008)
Just put it in your AGS folder and run. You can probably goof around with this as much as you want since any changes you do to your scripts won't be saved unless you press the plugin's Save button. (not the AGS Save button) But still, I'm not responsible for any damage that you might somehow possibly manage to cause with it. :P
#4
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
#5
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?
#6
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! :'(
#7
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?
#8
When using Button.Animate() to run an animation once, how do I check if the animation has finished?
#9
Is this intentional? And in that case, is there a ScreenWidth/Height equivalent that gets the "real" width/height, filters considered?
#10
I'm writing up a module that does... top secret stuff with the GUIs. But since I can't add custom properties or events for them, my concept to simulate them is to have:
- my own Struct to hold all the custom properties.
- an Array of said Struct, the size of AGS_MAX_GUIS, to "link" with the actual GUIs.
- a While loop on Rep_Ex that goes through said array, checks all the custom properties and reacts appropriately.

The catch here is that having a While loop running AGS_MAX_GUIS times every game tick is... slow, to say the least. Any suggestions?
#11
**mini-rant**
Once upon a day me and a friend set off to make an adventure game. He wrote, I scripted. Those were our things. However, we failed to find anyone else to help out. And a game can't exactly be played if there's nothing to be seen. But we didn't let that stop us, so we just made up some crude art placeholders and a batallion of Rogers to keep on making our game.
The problem is, we still haven't found any help (and probably never will), and we can't exactly release The Roger Twins Travel Through Increasingly Odd Places. Thus I have been incumbered with a task that's completely not my thing: the art. If I had my way I'd make a dynamically drawn game.
**mini-rant**

So, to make sure people won't gouge out their eyes and possibly sue us afterwards, I figured I'd better take my "art" with experts on the matter. Now, I'm not looking to create masterpieces. The more time I spend at this, the more work it becomes and the more it bothers me.
So I'm mainly looking for C&C on things that'll affect the enjoyment of the game. Flagrant flaws, problems, things missing, things you can't figure out what they are, etc. If you wanna point out anything else, feel free, I just don't guarantee that I'll look into it. Heck, the crappiness of the art might make the game more enjoyable. :P

To start off, here's some backgrounds:


These are just some... well, docks. Wooden docks. With a wooden barrel. And a wooden boat... well it's a wooden era. :P


These are just some baths. Roman era. They'll have some people in the middle and it's merely cutscene non-interactive material.

Oh and I use Flash for this. Pixel art's never been my thing. I also stick to one-point-perspective or isometric perspective. (whichever fits best)
#12
One thing that always bugged me about AGS was the built-in screenshot behavior was pretty plain, since it only takes one screenshot and that's that. Any further screenshots will overwrite the previous one.

So, for those game developers that want to let their users be screenshot-obsessed, here's some alternatives I came up with:

SaveDatedScreenShot()
This uses the current date/time for filename. A simple method to keep filenames unique.
Quote
function SaveDatedScreenShot()
{
   DateTime *dt = DateTime.Now;
   String filename = String.Format("%02d-%02d-%04d - %02d:%02d:%02d.bmp", dt.DayOfMonth, dt.Month, dt.Year, dt.Hour, dt.Minute, dt.Second);
   SaveScreenShot(filename);
}

SaveNumberedScreenShot()
Of course, if you have players that like to take lots of screenshots in a second, or just don't like the odd sorting from date-based names, you can also use this to have numbered screenshots. It's a bit more drawn out, but definitely no overwriting, and unlimited screenshots.
Quote
// Just a secondary function to check if a file exists, it's more organized than merging it with the primary one
function file_exists(String name)
{
   File *test = File.Open(name, eFileRead);
   if (test == null)
   {
      return false;
   }
   else
   {
      test.Close();
      return true;
   }
}

function SaveNumberedScreenShot()
{
   int i = 0;
   String filename = "screen0.bmp";
   // This loop detects the highest "unused" number, so players can delete and resort screenshots at will externally
   while (file_exists(filename))
   {
     i++;
     filename = String.Format("screen%d.bmp", i);
   }
   SaveScreenShot(filename);
}

I didn't feel this was worth a module, just a kind of "general tweaks" for anyone interested. Plus you can probably edit the functions a lot to make them more customizable or based on your personal preferences.
#13
Well nothing better to start a new month than a new project, and since I don't have the staff to make an adventure game, might as well help out the ones I can with a module. Made with AGS 2.71, as always.

Ok, so what's this all about? Well, sick of creating a new GUI everytime you need to show the player a message or a Yes/No dialog? Want to easily create death windows like the ones in Sierra without lifting a finger? Well then, this is the module for you!

I know SSH has made a module with the same purpose, DialogBox, but I started this before he put up his, and I wasn't just gonna dump my work. In any case, this works very differently from his module.

But enough chit-chat. Time to show you some examples of what this module can do:




See all of these windows? These were all created just by calling one function. The module reuses the same GUI and does all the positioning, sizing and changing the controls as necessary to fit your parameters, so that in the end you get a nice and neat dialog just by telling it what to display on it.

The module was initially just one function, but to keep with the same system as every other module, I decided to add the Hide() one just so it would seem more complete.

Download here

For assigning actions for the buttons, you'll probably have to use a global variable.
Example:

Code: ags

int i;

{
  i = 1;
  Confirm.Show(...);
}

(...)

{
 i = 2;
 Confirm.Show(.....);
}

function Confirm_btnYes_Click(GUIControl *control, MouseButton button) {
  Confirm.Hide();
  if (i == 1) {
    // do stuff for left-button in dialog 1
  } else if (i == 2) {
    // do stuff for left-button in dialog 2
  }
    // etc.
}

function Confirm_btnNo_Click(GUIControl *control, MouseButton button) {
  Confirm.Hide();
  if (i == 1) {
    // do stuff for right-button in dialog 1
  } else if (i == 2) {
    // do stuff for right-button in dialog 2
  }
    // etc.
}


Got it? No? Well, I can include a sample game if needed.

Anyways, anything else should be explained in the rather crummy documentation. Since AGS doesn't support optional strings, you'll have to use a blank string "" if you wanna leave something out like the titlebar.

Feel free to intensely bug-test this, because after coding it, I didn't have much patient to do it myself. Heck, originally I didn't know about the GetTextWidth and GetTextHeight functions which lead me to try and write my own and nearly kill myself. :P

Umm... enjoy. :)
#14
Ok, so I get this when trying to export a GUI:

Quote
AGS Editor Error
---------------------------
Mismatched scripts, no sectionend was found for '  #sectionend btnNo_Click '. Do not attempt to manually remove script functions.

The thing is, I didn't manually remove anything. the #sectionstart's and #sectionend's are all there, so I don't see the problem.
#15
Is it possible to change a button's OnClick function at runtime? (through code)

Basically, I'm creating a customizable confirm box, and I'd like to be able to change what the Yes button does without having to use Global Variables or some such. Heck, if I could create a Win32 MessageBox function lookalike that returns whatever button is pressed, that'd be grand.
#16
Quote from: SSH on Tue 20/09/2005 10:44:42
A savegame with screenshots module/GUE that has a list of game titles and a single screenshot displayed, rather than my one that shows multiple screenshots at a time
Well since my game uses one of those, I decided to convert it into a module. I had a look at the guidelines for modules and tried to follow what I understood, hope I didn't do anything wrong. Instructions and more detailed info included inside.



v2.0 (Only for AGS v3.0 and later)
- New version for AGS v3.0
Download here

v1.2 (Only for AGS v2.72 and earlier)
- Added support for AGS v2.72 (v2.71 should still work)
Download here

v1.11
- Now you can also show/hide the GUI by changing the gSavelist.Visible, though I don't condone this :P
Download here
Mirror (Thanks Candle!)

v1.1
- Now you can overwrite existing saved games by selecting them
- The game now checks for the 20-savegame-limit
- No more problems with forgetting to turn on "Save screenshots in savegames"
Download here

v1.0
Download here
Mirror (Thanks Neole!)
#17
Merely an experiment I'm doing with AGS. Basically, I'm trying to reproduce the GUI of commercial adventure games with AGS. What's the point of this, you ask? Well, many:
- Giving remakers a starting point.
- Seeing how far AGS' capabilities can go.
- A good learning experience.
Or, most importantly, I'm dead bored. :P

I don't know if this is the right forum, if there's even any point of me doing this and posting this, but I'm still gonna do it. I understand there might be copyright issues, but somehow I doubt I'll get sued for using copyrighted graphics merely for demonstration purposes. Still, I hereby hold no responsibility on the use that others give to these GUIs.

But enough chit-chat. My first experiment. Reproducing the GUI of Leisure Suit Larry 1, the VGA edition. Here's some screenies:

Iconbar.
Control panel.
Inventory.

Don't mind the buttugly test room, it's meant purely for testing since I can't have a working GUI without a room. :P

This was purely based on screenshots, and not yet complete, so it's not a perfect reproduction.
All the buttons have normal/hover/pressed states like the Sierra ones and all the LSL cursors and help descriptions are in there, and it works just like the original. Or so I hope. Coded with the latest AGS and scripting techniques.

Issues I ran into:
- All of the GUI is "hardcoded" because AGS just wouldn't get things to work my way. For instance:
o The iconbar is a "Popup Modal" that I coded to work like a "Mouse YPos". This is because AGS' "Mouse YPos" automatically disappears after pressing a button and forces the Pointer cursor, which rendered the Help mode useless.
o To "simulate" the Help mode I had to make every button run a script, even those that normally just change the cursor.
- The Detail slider doesn't actually do anything since there's no such thing in AGS. :P
- The Inventory looks like the LucasArts one. This is because if I used the Sierra-like default, it'd be uncustomizable.
- The Control Panel buttons look rather ugly since AGS doesn't center button text vertically.
- Since AGS already uses Interact for selecting items in the Inventory, I had to use the unused Pickup mode looking like the Interact mode to reproduce Sierra's Interact mode in the inventory.

Things missing:
- LSL1VGA's fonts. I have no idea how to get those.
- Save/Restore/Quit dialogs haven't been changed.
- No Sierra icon in the About button in the Control Panel, dunno how to put that without a new button image.

I'll put up the AGS files if anyone wants to try it out themselves (just exporting the GUI probably wouldn't include the new sprites, cursors and script) and have a look at my sloppy coding.

Templates:
- Leisure Suit Larry VGA
- Full Throttle
- The Dig
#18
AGS Games in Production / The Legacy
Wed 03/08/2005 16:40:34
Six lives, one legacy...

Story-description-type-thing
The Legacy is a game set across six distinctive eras and locations around the globe. Play as six different characters as they attempt to uncover the mystery of the Legacy, as well as solving their own personal problems. From ancient Rome to a space station in the far future, the Legacy is a game that you'll want to play again and again.

Features
1. It's a classic style point and click adventure!
2. Distinctive dialogue for every interaction, no more generic "I can't do that!"'s.
3. A blend of different genres - comedy, period drama, detective noir, sci-fi and more.
4. Extras to uncover and Mini-games to find.
5. Totally rewritten GUI, for easier and faster use.

OMG Screenshots!


Lots of crazy responses!


When we say "every interaction", we mean it.


No boring grey dialogs here.

Team and Overall Progress

Founder/Writer/Concept Design: Utterly Mad
GUI/Scripting/All the work with AGS: SupSuper
Music: Paul.Power, M3ntal

Story: 100%
Scripting: 40%
Graphics: 0%*
Sound/Music: 10%

*All the art you see on the screenshots is temporary crappy placeholder art made by yours truly. Because:
WE NEED ARTISTS! Pleeeeeease. I've gone through 5 forums already and still no response, so I figured giving more details on the game would help. It doesn't need to be anything fancy, after all, the game's 320x200. If you can draw rooms, backgrounds, characters, ANYTHING, please contact me or just post. Trust me, if we end up being the artists, it won't be pretty.
#19
- I'm using the "Save screenshots with saved games" feature. However, the screenshots get saved with the Load/Save dialog on top (which isn't very helpful) EVEN if I close the dialog before using SaveGameSlot(). How do I fix this?

- Is there a way to get the text in Display() boxes to be center-aligned, instead of left-aligned?

- I've got the following bunch of code:
EndCutscene();
Text.SetText("");
gBar.Visible = false;
Display("England, Clement Manor : March 1839");

However, after EndCutscene(), the script jumps to the Display() line, not running the lines in-between. How do I fix this?
#20
I've got the weirdest problem ever in AGS. I'm scripting an adventure game with AGS 2.7 which, in the beginning, is kinda like an intro cinematic, since the player can't do much but dialogue and skip ahead.

However, for no apparent reason, my character disappears when it reaches room 3. I've checked all the scripting, tried changing the position it starts on, give it Walk commands, but nothing. The character can still talk as if he was there, though.
I've thought about deleting and creating the room again but there's already a lot of scripting in it, so I really don't want to do it all over again.

I understand this probably doesn't help much, so if you want you can download the game from here and see for yourself:
http://supremesuper.tripod.com/TheLegacy.zip (689KB)
Don't mind the crappy art, it's mostly placeholder until the artists get their part done.
SMF spam blocked by CleanTalk