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

#981
Since it seems like they are just downsizing their payroll and don't have a problem with you personally, why don;t yhou offer to work for them on a temp or sub-contractor basis.  You already know how they do things and what needs to be done, etc...  I know, firing someone and then hiring them back as a contractor seems counter-intuitive but it happens more often than you would expect.   ;)
#982
Have you tried changing the "Handle Inventory Clicks in the script" option in General Settings?  I don't know if this will help or not.  :-\
#983
I was thinking more along the lines of a function in the Build menu "Rebuild All (with listing)".  The compiler would generate an old school listing in the form of a text file.  The file could have a number of sections containing info about the game.   For example there could be one section documenting sprite usage and another section showing where variables/functions are defined and where they are used.

Since not everything is in a text file format a search function would likely have to partially duplicate the compiler's operations and would possibly take longer than anyone would desire.   I'm speculating that when the compiler does a "Rebuild All" operation it knows where everything is defined and used and could produce some kind of a report that could be used later to provide "where used" and "where defined" information as well as other things that may be useful to know.     

What other things?  How about something like a memory(disk map) showing how much space is taken up by different entities.  So if someone was trying to minimize their download size they could use such a report to identify where to apply their efforts.   There could also be a section with a list of things which are never referenced.  This would be very useful in removing sprites, variables, functions, etc that are no longer necessary.  Having such a report is, IMHO, more efficient that searching things out one by one.

I guess the downside is that the file can get out of date and would need to be regenerated periodically.  You would likely also have to manually navigate to the location of the thing of interest. 

Anyway I think we are getting way beyond the scope of the original simple suggestions, which CJ seemed willing to do if a couple of other folks also thought they would be useful.   Y'all please  remember that "A bird in the hand is worth two in the bush!".   ;D

[edit]
Hmmm, or was it "A hand in the bush is worth two birds..." ?  :-\
#984
Although I wished I had something like this on many occasions I am not sure a global find function is practical to implement.  It would have to open and read every single file and in a large game this could possibly take a longer time than people would like.   

I was thinking that perhaps a better and more practical approach would be to have a compiler option that would direct the compiler to create a listing in the form of a text file.  The text file could show where everything was defined and used as well as other useful information. 

The text file could be opened with the script editor and so would be searchable via the find function.   The usage info would be very helpful in identifying unused crap during  pre-release cleanup and at other times.  Also if we were allowed to write to and save the file, it would be possible for us to markup the file to keep track of what we are doing with it.

Dualnames ans SSH what do you guys thing about this?
#985
Quote
There's a fundamental theorem of computer science that proves that there's no general, surefire way to tell whether a program has gone into an infinite loop.
I don't see what that has to do with what's being discussed here.   As a practical matter, for most all applications  it's possible to determine a time limit;  it's done all the time and is referred to as a Watchdog Timer.  The cited article talks mostly about hardware but the same techniques are also used in software, especially where multiple computers are communicating real-time data over a network.   

The AGS loop check, as I understand it uses a similar technique, substituting iterations for the time limit.   As you correctly point out someone may (and they have already) create a program that legitimately executes more than 150,000 iterations and so there is a noloopcheck keyword that can be used to surpress  the error. 

But all of this is completely irrelevant to the discussion because we were not talking about detecting infinite loops but instead were discussing how the current loopcheck rather authoritatively declares that there is a problem in a particular place in the code when in fact it is somewhere else.  It is entirely possible to determine which loop has exceeded the allocated time/iteration slot but it's apparently not easy to implement at this point in time. It's something that will be considered and possibly dealt with in the future.   It was suggested that additional information in the actual error message and in the description of the "while"keyword would be helpful and perhaps adequate.  :=


#986
Thanks monkey, your explanation of the loop check helps make sense of what I observed.  I think the confusing part is that the error message seems so damn sure of itself and where the problem is.   

Perhaps, instead of implementing a more elaborate loopcheck, the error message could just include a disclaimer such as "inifinte loop may be in calling function, check call stack" and include some additional information in the manual under the :while" function, explaining how the loop check is done and how to disable it with the noloopcheck keyword etc.

Quote
... I have found cases where it is simplest to use a break flag as the condition of a while loop.
I usually just set the iterator to it's max value to break a loop, this however, usually requires that the value of the iterator first be copied another variable.   I prefer this method because I can  use/reuse single character  variables for iterators and meaningful intuitive names for specific iterator values.  It also makes for somewhat simpler conditional expressions.

I do agree  that the break keyword is sorely missed and I hope that it will be added to the language in some future version of AGS.   
#987
I am working on a fairly large module at the moment.  Navigating around such a large file has inspired me to think about ways of making this easier and so I'd like to share a couple of things on my wish list.

Find History
How about having another drop list, as is done for function names, that would contain the text of previous Find operations.   The list would be ordered from most recent at the top and least recent at the bottom.  The list could be limited to an arbitrary number of the most recent items searched for if necessary or desired.

A click on an item in this list it would copy that item to the find buffer and perform a Find  Next operation.   Subsequent presses of the F3 key would search for the same text.  On opening the Find Dialog (if no other text is selected) the search text field would also contain the text selected from the list.

Reverse Search
Would like to be able to search in the other direction (i.e. from current position in file towards beginning).  Perhaps it could be implemented with an extra button on the Find Dialog and a ctrl+F3 short cut?

Separate Find and Replace Menu Picks
People almost always know if they want to Find or Replace something before they click on the menu.   As it is now at least 50% of the time they have to click on an extra button to get the dialog that they really want.   

Couldn't there just be another Menu pick called Replace that opens the same dialog only with the replace field activated and conversely couldn't the Find menu pick open it without the replace field activated?   Everything else could be the same as it is now.

F3 - Find Next shortcut closes  Find Dialog
How about closing the "Find" dialog box and then doing the normal "Find Next" action when the F3 button is pressed?   If someone wanted the dialog to stay open they could just click on the Find Next button in the Find Dialog or press enter.   If they wanted it closed but still wanted to do  multiple Find Next operations they would just use the F3 key.   
#988
Nested While Loop Check
I don't know if this is known or not so I thought i would report it just in case.  I had situation where I called a function from within an infinite while loop (unintentionally of course  :=).   The function that was called also contained a while loop but this while loop worked just like it was supposed to and did not have any problems. 

The infinite loop (in MyFunction) caused a run-time exception as one would expect, however, the editor pointed me to the while loop, that was working correctly, an located in the called function (dosomething).   I stared at the dosomething() code for a long time thinking there must be something really obvious wrong  :(.

I finally took a break and went for a walk with my cat who told me that if there aren't any birds in the tree you may as well hunt somewhere else.   So that's exactly what I did when I got back to the computer.  I looked at the place from where dosomething() was called and lo and behold it was being called from within a sometimes infinite while loop.

There error message was correct but it pointed to the wrong place and was therefore confusing.   I should have known better I guess but I always suspect my self first and the compiler last.   Anyway here is an illustration of the situation. 

Code: ags

function dosomething() {
     int i = 0;
     while (i<SOMETHING)( {
          // Do something here
          i++;
     }   // Game aborts with infinite loop message and opens editor on this line
} 

function MyFunction() {
     int i = 0;
     while (i<SOMETHING)( {
          // Do something here    
     }
}


I'm one beta version behind so I didn't have the benefit of the call stack but I pretty much knew where dosomething() was being called from.   There is not much that can be done to makeup for programmer stupidity but perhaps this info will help you think of something.    ;D
#989
I have recently noticed if a member function is given the same name as a built-in function the compiler will report an "already defined" type of error.  For example attempting to do the following will generate such an error ...
Code: ags

*** Module Header ****
struct MyStruct {
     import static function Display(String text);
};

*** Module Script  ****
static function MyStruct::Display(String text) {
   Display(text);
}

*** Room Script ***
MyStruct.Display("Hello world!!");

I'm not 100% sure but I think this is only an issue with non-OOed functions.  I don't know if this behavior is intentional or is the result of something leftover from before the OO version of the script language.   I thought I would take the time to report it in case there is a list it should be on or something.   If everything is as it should be then feel free to ignore this post.  ;)

P.S. Yes, of course there are very obvious workarounds so I don't need any help with that  :=.   And yes there are times when it's desirable to wrap some additional functionality around  standard functions.

#990
I would also note that there is mucho white space on the right hand side of the current drop list, as fucntion names tend to be so much shorter than the screen width so it would perhaps be worth considering adding a second drop list so that there would be one for functions and a new one for bookmarks?
#991
The "drop list-goto function"  at the top of the editor is a really great feature.   I was thinking that it would be even be better, especially when working on very large scripts,  that it would be even better if it could also list user defined bookmarks, at the top of the list.

Perhaps there could be a #bookmark  directive to insert the bookmark so if  something like this were inserted in the script ...
Code: ags

#bookmark  Static Variables
int MyVar;
     :
#bookmark  Variables I am working on 
     :
#bookmark  The Function I am working on
     :

(general settings)
The drop down list would look something like this:
Code: ags

Static Variables
Variables I am working on 
The Function I am working on
----------------------------------------------------------------------------
game_start()
on_key_Press()
     :


Anyway it's just something that I thought would be very useful and not too difficult to implement.  There have been other suggestions such as folding, etc that also address this issue.   This is perhaps the easiest to implement and would eliminate or lessen the need for some of the other more difficult/complicated solutions?
#992
Hehe, didn't get the  :=;D

Anyway phycokill, welcome to AGS. Cheers
#993
I read the title and post and understood just fine.  I gave him the link to the TCP/IP plugin which will be needed for something like this.   I also offered my opinion that this is not a trivial task, evidenced by the fact that no one to date has completed such a game.   I concluded by suggesting that phycokill start with something a little easier which is nearly always good advice.    It was late when I made the post so I apologize if I didn't convey my advice in a friendly manner.
#994
Hey Squinky,

Good to hear from you again.   I was wondering about you  about a just a couple of weeks ago and now here you are.     ;D
#995
AGS is not designed to make such a game easily.   There is a TCP/IP plugin that can be used to implement network communications.  It is discussed in this thread where a download link is provided.   To the best of my knowledge no one has ever produced an online or multi-player game using AGS.   Frankly I think you're in over your head and ought to consider doing something a little less ambitious.   ;)   
#996
Quote
As a first step I suppose it would be useful to just allow you to manually move the handler functions into different scripts and have AGS still run them from there.
I think this would be of immediate benefit to module and GUI designers.  It would allow the GUI handlers to be embedded into the module code itself.  It would no longer be necessary to instruct module/gui consumers to create GUI handlers and to populate them in a certain way, etc, etc.   

As for characters, inventory, etc, allowing their handlers to be placed in other scripts would allow us to experiment a bit   to further the discussion.   

So I think your proposed first step would be of great help to many.   
#997
Quote
- Seperation of gui-, character- and global script. Only virtually for the user to be in an extra page. Actually the codes ARE in the global script but the user can't see them, as they are only shown in the EDIT GUI SCRIPT/EDIT CHARACTER SCRIPT panes. (more info here: link)
This was discussed in the following thread:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=35370.0
#998
You need to create an event;  just creating a function with the name "repeatedly_execute() won't do it.  Edit the room (not the room script), you should see the room's background.  In the properties window there is a button with a lightning bolt icon.  Click on this and you shpould see a list of reoom events.  Repeatedly execute is on the list. Click in the field.  Clkick on the ... button to get the default name and open the room script. 
#999
Quote
It's not possible to filter on the "No more files" message, because on non-English versions of Windows that message will be localized.
Smiley sent me the following PM today likely in response to your comments ...

Quote from: smiley
since I think it's a WinAPI error, it might be possible to get an error code from GetLastError() and use this to filter it. Sorry for not thinking about that before.

http://ueberlicht.googlepages.com/test.exe
Same procedure: insert the path to the share into the textbox.

You should get a message box with an error code.
(I hope it's '18', because that's the error code for ERROR_NO_MORE_FILES.)
I tried his test and indeed it returned an error code of 18 as he expected it to do.  So perhaps this is the solution you seek?   

Again hope this is helpful...
#1000
Quote
With every statement there's a big fat of course that in some games a Rude Goldberg device can fit the in-game universe perfectly. After all, isn't adventure gaming's single most famous puzzle a Rude Goldberg?
First of all the man's name is Rbue Goldberg not Rude Goldberg.   
Secondly there is a huge difference between humorous/silly and obtuse/obnoxious...

Quote
Quote
Quote from: RickJ
I do, however, harbor a suspicion that the enjoyment of solving overly difficult and/or convoluted puzzles, for some folks, is derived from other peoples inability or difficulty in solving said puzzles.
That.. erm, sounds slightly paranoid to me. There seems to be a real 'us' and 'them' mentality forming over the fault line here..
Hmmm,  So you're saying that people don't get any enjoyment in being the first person in their adventure gaming peer group to solve a difficult or seemingly impossible puzzle?   That's not been my observation of human nature.   

Now consider what it's like playing a game with such puzzles in isolation (i.e. no peer group to impress or to get help from).  Also imagine not having much spare time  to devote to games (i.e. work, life, etc have priority).  I personally can't imagine many self supporting people being able to derive enjoyment from such a situation. 

My point is that there is a social aspect to the issue of difficult/illogical adventure game puzzles that is seldom mentioned or acknowledged.   I don't think it's at all paranoid to opine on the subject, suggesting  that at least some of the enjoyment say they get from difficult puzzles is due to the social aspect..
SMF spam blocked by CleanTalk