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

#1461
Quote
... the game won't start (i.e. the screen goes black, the program does not respond to the abort key ...
When the game starts and feore the first screen is painted,  the functions game_start() in the global script and the "room_?() // BEFORED FADE IN INTERACTION"  in the first room's script are executed.   Take a look ay the code in these functions; truy commenting out stuff to see if it makes a difference.   

Also you could try starting over with a blank game to see if you can get the diagonal loops working.  Perhaps you will be able to discover what happened to this one and repair it or find some more info about the problem to post here. 

Perhaps some else has had a similar problem and can be more helpful. Good luck and let us know how it turns out.
#1462
Quote
In the verb coin room from the hall of GUIs has no way of exiting--Only save, load, and restart.
Press Ctrl-Q to quit.   
#1463
Quote
Does anyone *not* preserve the directory structure when unzipping? That's crazy talk.
You would be surprised how many people try to run AGS without unzipping the file.  :=   One could get away with unzipping a single game without preserving the directory structure.   The usual consequence would be that the compiled folder would be recreated on the first compile and there would be some extra, unnecessary files in the source or main folder.   The point is that there should perhaps be a sentence somewhere explaining this, as obvious as it may be to some of us. 

Quote
Is there still a small, simple demo? This beast is probably quite daunting for the beginner.
Have you checked out any of the mini-games?  I hadn't put any thought into them regarding this need, as I was focused on getting the conversion done,  but it seems to me this would be the ideal way of handling this issue.

Quote
My suggestion is that you get a death message explaining what just happened and allowing you to go back to the same position, restart or restore.
Yeah, I was thinking along the same lines, except making the restart be automatic and possibly adding an animation.
#1464
You can get the latest DemoQuest from the link below.  Checkout the door and ATM animations for examples

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23083.0
#1465
I guess it all comes down to file size.  Provided that the file size is "reasonable", putting them into one zip would be best.  However, the downloadee would have to prserve th sub-directory structure when unzipping or else they would have a real mess. 

Also, I was wondering if we should update this to V2.71 and realeas the next Beta.
#1466
I recently wrote a module to read/write/etc inifile that may be of use to you.  It's here .  Just download the module and read the documentation.  What's an inifile?  They are those windows configuration files ending with ".ini" such as win.ini, system.ini.
#1467
 :o You are getting sleepy ... sleepy ... sleepy ... sleepy ...

:o Now when I count to ten you will slap the cat's ass and send RickJ a check for $10.00

Sheeesss I'm only kidding .. just make it $50.oo to show hoiw much you love me!   ;D
#1468
I just scanned tge PhysX page.  It seems to me this thing consists of both hardware and software.  Clearly it is meant to opeate on 3D models that likely contain additional information about the materials that comprise the models.   

So consequently, I don't see that this would have any effect or benefit for AGS or any other 2D game engine. 

I think realistic 3D game worlds would add to the enjoyment of an adventure game.  In such a world things happen in "real-time" so navigating such a world naturally requires "real-time" hand-eye interaction with the game.   The resut is something more like Tomb Raider than Fate of Atlantis.  I'm personally not bothered by this prospect but many AG pureists are.

#1469
Quote
That wasn't the original goal... it was just to have a coding competition.
I don't wish to be rude or anything Steve but for me it would just be a waste of valuable time and probably wouldn't be interested in participating.   Actually the same could be said for all the competitions in general.   Just imagine if all the sprite jams, background competitions, etc, etc were structured around a couple of  common sets of criteria (i.e. resolution, scaling, color depth, style, etc) and then archived and made available for use in games under a Creative Comons or GPL license of some sort.   There would be a gazillion resources available for those of us who are artistically challenged or just new to game making.

Quote
Removing the time limit also removes any pressure to release something, which removes the pressure to work on it, and so nothing happens.
The idea is that there would be an award every month.  So if ther were only one entry that peson would take the award.  I should think that the recognition would be enough incentive to see at least 12 modules released per year.

Quote
(I agree that if modules were the goal, we'd end up with several non-robust modules that do much the same thing to choose from. Not good for the end user. So probably better to forget the modules.)
Maybe robust module production should be the goal?   I think at the moment there is a range of quality in the modules that are being released.    A module competition or award activity would perhaps give less disciplined or experienced developers incentive and guidance to improve their work.   In fact all of us could benefit from peer review.   It  could be a fun way if getting quality modules released and getting more people involved in module development (provided there is enough interest).   

I realize this idea is a bit different than what was originally suggested so I'll understand if I'm the only one who thinks it's cool.  :'(   Hehe, anyway it's just my 2 cents worth.  I think I'll just go slap the cat's ass now, so cheers.
#1470
Hmmm,  I'm a bit skeptical about this. If the goal is to end up with high quality modules I'm not sure a time limited competition will produce it.   

Ask yourself what will it take to win one of these competitions?    It seems to me people will end up spending their time adding cool features and less time debugging and documenting what they have done because that is what will win the competition.   You can say that those things will be part of the judging criteria all you want but will people really vote/judge that way?   

Perhaps there needs to be something like a monthly module award or something similar.   A  Module Awards Moderator  (MAM  ;)) could maintain a module wish list from which module developers could choose.   Developers could choose to work on the same or seperate (I think separate is probably preferable) modules.  The MAM could keep track of and publish who is working on what.   If it takes one month fine, if it takes longer thats fine too.  When a module is completed it would be sumitted for evaluation  to the MAM.   Either the MAM himself or a committe appointed by the MAM could then render judgement and each month publish the results.  Perhaps the judging committe could  consist of the MAM and the other developers who submitted entries for a specific month.  The developers would have to vote for someone other than themselves.  In this way modules would get completed at their own pace and would likely be more complete and robust than if there were a time limit.  Also people would end up working on things in which they have an interest and/or expertise. 

I also like Squinky's idea also, although it probably isn't what dkh had in mind.   It would be neat if you could link up a character, backgorund, and game coding competitions.  If there were some common criteria then you could accumulate resources for a game pack that way?

Anyway these are just some of my thoughts I thought I wouold share with you.

Cheers
Rick






#1471
General Discussion / Re: DEMO Games??
Thu 13/10/2005 03:45:39
#1472
General Discussion / Re: Mistakes
Sun 09/10/2005 18:14:41
The King and I:
Spoiler

In one of Yul Brenner's dance numbers he is whirling and twirling around the palace.  He has on 2 ear rings which stand out at right angles to his head from the centriptal (sp?)  force.   At one point in the dance he bends over and when he stands up again the ear rings are gone.  Ok, one could postulate that they fell off when he bent over, but a few minutes later he bends over again and this time when he stands back up the ear rings have magically returned to their former position firmly attached to his ears.   :o
[close]

#1473
The way I read it if a positive value is specified for wait then one character is printed  every "wait" game cycles.  If minus one is specified for the wait parameter then the time between characters is dependent on some kind of keyboard action.   Since I have no idea where or how the value of the variable keyx is determined I can't say more. 

When I tested my script keyx was defined within the bounds of the function and permantely set to zero.   I am not able to help any more from thje information you provided.  You could try putting some "Display" statements at various points in the script to see what it's doing.   The first one that comes to mind is to display the message buffer, msg, after the new line characters are inserted.   This will show you the modified message.   
     :
            b = 0;                           // Clear line buffer for next line  
         }
      }

      Display(msg);    // Add this line for debug purposes
      // Display Message
     :

If it looks ok then you can focus on the code that follows the "// Display Message" comment.

   
#1474
Hmm,  it worked fine for me.   I had the keyx variable defined and initialized to zero though.  I commented it out because I assumed you had it defined somewhere else.  I guess you could could try renaiming keyx in my script to keyy and uncommenting the declaration and see what happens.   I also specified a value for the wait parameter when I called TypeLine as well, so you can also try that. 

I didn't really take the time to understand how that bit of code was working, just assumed it worked the way you wanted it to work.
Quote
         // Wait for awhile before displaying next character
         if (wait>0) WaitKey(wait);
         else if (wait == -1) while (IsKeyPressed(keyx) == 0) Wait(1);

#1475
You can get monitor cables at Jameco as well as many other places.   Just Google to find them.   I think Yak has the best idea.  Get a replacement or extension cable, cutoff the end you don't need and connect it to the inside of your monitor.

#1476
Here is a debugged version of the above script.   Let me know if it works for you.
function TypeLine (int message, int xpos, int vpos, int width, int delay, int wait) {
   int    font=1;                           // set to font id for overlay
   int    b, i, j, k, msglen;             // declare local variables for use within 
//   int    keyx=0;
   char   msg[200], buf[200];               // this function only
   Overlay *ovr;
   
   // If game is paused do nothing, otherwise display the message 
   // one character at a time.
   if (IsGamePaused()==0) {                  

      // Initialize some things
      GetMessageText(message, msg);         
      player.StopMoving();
      ovr = Overlay.CreateTextual(xpos, 100, width, font, 15, "");
      WaitMouseKey(50);

      // Get message and insert line breaks 
      i = 0;
      b = 0;
      j = 0;
      k = -1;
      msglen = StrLen(msg);                // Get number of characters in message
      while (i<msglen) {
         // Copy message to line buffer
         buf = msg;
         if (msg==' ') {               // Remember location of last space
            k = j;
            j = i;
         }
         i++;
         b++;
         buf = 0;
         
         // When pixel width of line buffer is greater than the width of the 
         // overlay buffer is full and is displayed.
         if ((width<GetTextWidth(buf,font)+10)&&(j!=k)) {   // j==k when word > width pixels
            k = j;
            i = j;
            msg='[';                        // Replace the space with a line break
            i++;
            b = 0;                           // Clear line buffer for next line  
         }
      }
      
      // Display Message
      i = 0;
      b = 0;
      while (i<msglen) {
         buf = msg;                      // Buildup display buffer char by char
         b++;
         i++;
         buf = 0;         
         ovr.SetText(width,font,15,buf);
         if ((buf!=' ')&&(buf!='[')) {   // If not space or line break play sound
            PlaySound(1);         
         }
         // Wait for awhile before displaying next character
         if (wait>0) WaitKey(wait);
         else if (wait == -1) while (IsKeyPressed(keyx) == 0) Wait(1);
      }
      // Remove text from screen
      Wait(15);
      ovr.Remove();
   }
}
#1477
Like I said I didn't do any testing or compiling.   However, looking at my script the eror seems to be caused by this line. 

Remove ovr from here:  "int    b, i, ovr, msglen; "

It was left over from before upgrading to the new style overlay commands.

Cheers
#1478
I took a shot at re-writting your function to work the way you describe. 

Before displaying characters it is first necessary to replace the last space charater before the max pixel width is exceeded with a line break character.  This is done by copying characters one by one to a buffer and then checking it's their pixel width.  When the width of the line buffer exceeds the overlay width the message buffer is searched backwards (i.e. towards the beginning) for the first space character.  That space character is replaced by a line break character.  The line buffer is then cleared and the whole process repeats until the end of the message buffer is reached.

Now the message buffer should have line breaks at the proper points so that the behaviour you describe never occurs.   You may want to conduct some tests to be sure that the hardcoded 1 pixel margin is large enough enough to account for the line break etc and so that spurious blank lines are not generated.   The message buffer can now be displayed one character at a time similar to the way it was done in your original script. 

I took the liberty of updating some more things to the new style scripting as well.  Anyway here is my approach to this.  I haven't compiled or tested it but it should give you an idea how to implement such a thing and probably close to being in working condition.

function TypeLine (int message, int xpos, int vpos, int width, int delay, int wait) {
   int    font=1;                           // set to font id for overlay
   int    b, i, ovr, msglen;                // declare local variables for use within 
   char   msg[200], buf[200];               // this function only
   Overlay *ovr;
   
   // If game is paused do nothing, otherwise display the message 
   // one character at a time.
   if (IsGamePaused()==0) {                  

      // Initialize some things
      GetMessageText(message, msg);         
      player.StopMoving();
      SetTextWindowGUI(1);
      ovr = Overlay.CreateTextual(xpos, 100, width+1, font, 1, "");

      // Get message and insert line breaks 
      i = 0;
      b = 0;
      msglen = StrLen(msg);                // Get number of characters in message
      while (i<msglen) {
         // Copy message to line buffer
         buf = msg;
         i++;
         b++;
         buf = 0;
         
         // When pixel width of line buffer is greater than the width of the 
         // overlay buffer is full and is displayed.
         if (width<GetTextWidth(buf,font)) {
            while ((msg!=' ')&&(i>=0)) {   // Backup to last space character
               i--;
            }
            msg='[';                        // Replace the space with a line break
            i++;
            b = 0;                           // Clear line buffer for next line  
         }
      }
      
      // Display Message
      i = 0;
      b = 0;
      while (i<msglen) {
         buf = msg;                      // Buildup display buffer char by char
         b++;
         i++;
         buf = 0;         
         ovr.SetText(width,font,1,text);
         if ((buf!=' ')&&([buf!='[') { // If not space or line break play sound
            PlaySound(1);         
         }
         // Wait for awhile before displaying next character
         if (wait>0) WaitKey(wait);
         else if (wait == -1) while (IsKeyPressed(keyx) == 0) Wait(1);
      }
      // Remove text from screen
      ovr.Remove()
      Wait(5);
   }
}


Kinoko, In case you or anyone else is interested here are a couple of tips on how I think you can improve your scripts.     
Quote
if (IsGamePaused()==0) {
:
int i=0;
Not sure what they say in academia but I prefer not to decalre variables in the bowels of conditional statements.  IMHO, it's error prone and makes it harder to read the script.

Quote
textid = 0;
:
textid = CreateTextOverlay(xpos, 100, 400, 1, 1, displayedline);
It is redundant to set a variable to zero and a few lines of code later set it to soemthing else.   Since it doesn't do anything you can eliminate it to make the script easier to read and understand.

Quote
textid = 0;
length = 0;
StrCopy(displayedline,"");
GetMessageText(message, line);
Since these should be declared within the function they are used.  Declaring them outside means that they are static and that other scripts have access to them.    It is usually to declare these kinds of variables inside the functions where they are used unless there is reason to remember the data after the function has finished executing. 

Quote
function TypeLine (int message, int xpos, int vpos, int width/b], int delay, int   
:
textid = CreateTextOverlay(xpos, 100, 400, 1, 1, displayedline);
You pass in a pixel width in the function and then use a hardcoded value of 400.  I'm not sure if this is an error or if this has some utility I missed?

=========================
Anyway good luck with this.  Let me know if have any trouble getting it to work.
#1479
Sorry Mats for the confusion.  I thought that would have been enough.  Anyway here is the entire code snippet for AGS 2.62.   It assumes that there IDLE_NUMBER_OF_VIEWS idle views consecutively numbered with the first one being given by the constant IDLE_VIEW.  The constant IDLE_DELAY determines how often the selection is changed.    You can set these constants to whatever numbers that give the best results in your opinion.   

#define IDLE_NUMBER_OF_VIEWS   5
#define IDLE_VIEW   7
#define IDLE_DELAY  10

int IdleTmr=IDLE_DELAY;

repeatedly_execute() {
   IdleTmr--;
   if (IdleTmr<) {
      CharacterSetIdle(EGO,FIRST_VIEW+Random(IDLE_NUMBER_OF_VIEWS));
      IdleTmr = IDLE_DELAY;
   }
}
#1480
CharacterSetIdleView();
SMF spam blocked by CleanTalk