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

#3361
Presumably Powergen know your address, too, so that would be traceable too. One thing that bothers me with chip & pin is:

a) How do you know that its a genuine pin device they give you to type your number in and not a card duplicator?

b) When you sign for things now, no-one checks the signature anymore (e.g. They have Chip&PINs in Canada and France but its a different system so incompatible, so you have to sign)

c) Banks have secured themselves but not their customers. Really online banking should use Secure tokens with one-time one-minute passwords and cards should have photos on them
#3362
Possible bug report here: I've been finding that sometimes when using CTRL_T test game, when I close the game down control returns to the editor, but the game is still running and I have to kill it with the Task Manager before I can use test game again. It doesn't happen all the time (maybe only when quiting when a Display box is shown) but its a real pain. I'm also getting a very slow frame rate on a dual-processor AMD Athlon 64 X2 4800+ with 2G memory....

seems to happen when exiting via Windows X or Alt-X. Not with ctrl-Q yet. Also, when it finally is killed by task manager, AGS pops up "Run time engine did not terminate correctly, if prersistsent please post in Tech Forum"

Other problem I'm getting on this code:

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x00433BBE ; program pointer is +6, ACI version 2.71.888, gtags (0,0)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.

in Credits (line 151)
from Credits (line 230)
from Room 1 script (line 12)

line 151 of Credits script is:          

       this.typet=nl.Substring(0, 1);

strangely, this was working fine until just now. It had been OK, then it broke, then I added in some debug code and it worked again. Took out the debug and it still worked, then changed something else and it broke again and I cant fix it now!

You can find this dodgy code at: http://www.lumpcity.co.uk/~ssh/credittest.rar
#3363
Hey, I'm glad someone's using this. I guess if the plugin doesn't work with AGS 2.71 then it will be used a lot more... but maybe CJ should put something in that makes older plugin APIs work with the new strings, otherwise everything will need to be recompiled.

The answer is:

Code: ags

if (Credits[n].IsRunning == eCreditFinished) {

}


as described in the script module README and in the module header:

//   Credit[n].IsRunning();
//      This function returns a value of type CreditRunning_t, which will be equal to
//      eCreditFinished when the sequence has finished.

although, now I notice that this says Credit rather than Credits: another thing to fix in the next version!

Edit:

So, I've fixed most of the problems with the Static credits and now both versions should work. See top post for details

I've also included a function that inserts linebreaks into typewriter credits to make the wordwrap look better

Edit 2:

Please feel free to suggest improvements or note bugs, although I don't promise to fix any!
#3364
It would be nice as well if you could do it all in one line, actually, something like:

exporting int x,y;

rather than

int x,y;
export x,y;
#3365
AGS normally only runs interactions on "Button up" rather than "Button down" so I'm not sure why you get this behaviour to start with, unless you've been changing the default script around a lot already.
#3366
General Discussion / Re: Scheme ?
Mon 24/10/2005 09:52:45
Well, as an emacs-lisp hacker myself, I'd love to be able to do some of the list manipulation stuff, etc of lisp (and hence scheme) in AGS. On the other hand, I don't want to type lots of brackets.  ;)

But a functional (as opposed to imperative) language based engine would be great! It would suit a callback-based system well.

My preference would be for an ML-based system, though, 'cause then I'd be the only one who colud use it ;) Well, actually, .NET F# is ultimately baed on ML.
#3367
General Discussion / Re: I have superpowers.
Mon 24/10/2005 08:35:59
Quote from: MillsJROSS on Mon 24/10/2005 06:50:27
Moist implies internal wetness

My mum used to describe the weather as "A bit moist". Either she is secretly an erotic fiction writer instead of a Deaconess, or Mills is speaking sloblock
#3368
Can you add Gaussian, Poisson, Normal distributions, as well as Uniform? ;D

The other solution to the issue of parameters is to pass a "Random format string", so that you can say the probabilities of different outcomes:

x = SuperRandom("50:3 20:5 10:8 10:9 5:101 5:1001");

which would return 3 50% of the time, 5 20% of the time, etc

#3369
C'mon lets do this then. I think thee's been enough support for the competion to start. If Rick doesn't like it, he doesn't have to enter, and we'll try not to assume its because he's afraid of the competieion  ;)

Edmundo's query in Tech for a multi-line note taking module in AGS would be a good one, as there are various ways to approach the problem!

#3370
Hah! I suspected it was the GUI resizing! Go SSH, Go SSH, Go SSH!
#3371
two words: Cillit Bang
#3372
Rui: the GUI objects themselves have character limits, too, even if you use Strings.

This sounds like a good thing to have for the coding competition, since there are various way to do it!
#3373
It doesn't matter if the GUI is offscreen. I've done it for my "tooltip" GUI before.

Hopefully the mighty Puma might offer a solution before you have to comment things out, but who can fathom his mysterious ways? I was just offering a possible way to track things down if he doesn't answer soon for whatever reason...
#3374
I think there is a difference, though

Sometimes I have wanted to hit people and didn't do it. Obviously, I'd be less evil if I had never wanted to hit them, but that I restrained myself is somewhat virtuous. On the other hand, sometimes I shot the people instead...  :=
#3376
Quote from: fovmester on Fri 21/10/2005 12:41:38

The GUI has no borders and no background image so I don't think there's any Dynamic Sprite being created.

So much for taht idea!
Quote

I show the status bar next to the cursor so I need to control the size so that the text is always on one line.

Why not just leave it as 320 wide?

#3377
Elliott is right: walkbehinds are for where things walk behind backgrounds. If you have used an object sprite for the bed, don't bother with a walkbehind for it at all.
#3378
Firstly, if it is reproducable, why not comment out suspicious bits of code and see which one is doing it. You can probably tella bit sooner if it's going to die by using the windows task manager and checking the memory used by the app there. This will be easier in windowed mode, obviously.

Quote from: fovmester on Fri 21/10/2005 10:56:11
Code: ags

string buffer;
 Overhp.GetText(buffer);
 int width = GetTextWidth(buffer, Overhp.Font);
 if (width>=0 && width<320) {
	Overhp.Width = width + 1;
	gLabel.Width = width + 1;
 }


which changes the width of the statusline (Overhp) to match the text in it.

My gut feeling would be that I would suspect this code most. I'm not sure why resizing a GUI to the text it contains would be necessary, unless the GUI provides a border or backgroudn to the text. Maybe there's a memory leak in the GUI resizing code in AGS: does the GUI have a BG image that gets clipped? Mayeb the dynamic sprite I guess that is created for the clipped background doesn't get cleared up  properly, or something? The declaring of the pointers shouldn't matter as they just create another reference to an existing object...

As for your module: interesting, but why not just combine speed and fading into one? then you could do:

Code: ags

#define SPEED 4
#define CONSTANT 0
#define STD_SPEED 2

struct FaderGui {
  int fading; 
	// fading:
	// larger than CONSTANT = fade out, 
	// equal to CONSTANT = don't fade
	// less than CONSTANT = fade in
};

FaderGui guis[AGS_MAX_GUIS];


static function GUIFader::fadeInGUI(int guiNbr,int speed) {
		guis[guiNbr].fading = -speed;		
}

static function GUIFader::fadeOutGUI(int guiNbr,int speed) {
		guis[guiNbr].fading= speed;		
}



function repeatedly_execute_always() {
	int nbrOfGuis = GetGameParameter(GP_NUMGUIS, 0, 0, 0);
	int count = 0;
	while (count < nbrOfGuis) {
			GUI *theGUI = gui[count];
			int trans = theGUI.Transparency;
			
			if (guis[count].fading != CONSTANT) {
				//fade in
				
				trans+=guis[count].fading;
				if (trans<=0 && guis[count].fading<0) { 
					trans = 0;
					guis[count].fading = CONSTANT;
				} else if (trans>=100 && guis[count].fading>0) {
					trans = 100;
					guis[count].fading = CONSTANT;
				}

				theGUI.Transparency=trans;
				
			} 
			count++;		
	}
}


#3380
I think there's been some confusion between "Walk to" and "Player walks on to" here. But even after knowing that, I'm still confused: Elliott, can you re-explain your current problem, please... or is it fixed by now?  :=
SMF spam blocked by CleanTalk