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

#1801
 3) Controlling characters in other rooms - CJ does the engine still crash if you attempt moving a character around in another room (i.e. one not loaded)?  If so perhaps a different behavior would be more apporpiate.  Ginny, Scropious made some script functions for this awhile back.  

#1802
I was thinking about doing a thing where you construct a character in a game.  There would be a machine with levers and buttons you use to pose a character, (kind of cyborg style) take snapshots of the poses and then assemble them for an animation sequence.   We could use something like this in the DQ games factory to illustrate the steps required in defining a character.

I suppose also such a thing could be used to impart characteristics to characters as the game progresses.  For example if a character injures his/her leg you could give him a limp by changing a couple of frames.  You could even make it progressively worse as time passes.  I know normally we just make another view but having the ability to dynamically modify the frames at run time would maybe produce interesting  results.  

I guess it comes down to how much trouble it is to implement vs how much benefit is derrived from it.  

 
#1803
I thought it was possible to do this but haven't found anything in the manual.  Is it possible to change the sprite number assigned to a view/loop/frame from a script at runtime?  

#1804
Follow my sig to the BlueGui..
#1805
I don't understand what is offensive about what the man said.   Maybe because he called the girly man "Richard Simons".  I would be deeply ofended if someone called me that  ::).  

Also I would add a bit to option b as follows ...

Quote
b) He sues him, as he is doing, yet he is forever known as the guy who got bitch-slapped by a little girly man and took a bunch of the the little girly man's money.

Personally I would have chosen option a.  
#1806
Is that what they used to call good horse sense?  ;)  
#1807
General Discussion / Re:Forum slow-down ...
Tue 23/03/2004 20:43:47
I also noticed this as well.  It has been better since I switched to Mozilla/Foxfire browser which allows me to block images hosted on slow servers such invisfreeanomizer, 2dadventure, etc.   That's one of the reasons why I complain so much about gigantic and animated sigs.

Foxfire has helped me quite a bit; if you're frustrated enough it may be worth a try.      

#1808
If it's intended that the content of the new website be dynamic (i.e.  there is seperation  between content and layout) then it's premature to be complaining about uneven column lengths, IMHO.  I believe there are number of different ways of dealing with this depending upon which (if any) CMS or portal software is used for implementation.  I don't think this has been discussed so far, if it has I appologize for not having read the thread carefully enough.
#1809
Great job Darth!!!   I prefer expanding only one sub-menu at a time because this is a more scalable approach, IMHO.  However, since the menu expansion will ultimately be done programatically (via php or other) then I see no reason why this couldn't be an option.    

Also, I wonder if it would make sense to have  "Download" as  a main menu item?  
  • Download[/b]
  • AGS 2.6
  • Demo
  • Fonts
  • Other Resources

    Oh well, I guess deciding what goes in the menu will be another one of those discussions :).  I think you pretty much nailed the page layout and navigational concept though.  

#1810
I'm with Strazer on the new menu fully expanded.  I think the solid bars on't look right either.  I wonder what it would look like if you indented the actuive sub-menu and got rid of the blue menu bars.  The menu on this website is an example of what I mean.  

http://deltascripts.com/
copy link location and the paste it into url if you have trouble loading

Perhaps there could be an expand/collapse or sitemap button that would expand all the sub-menus at the user's request but would only expand the active menu item otherwise.  

#1811
My eyes are getting bad ... I read "adventure" instead of "ags" the first time.  Ouch!!     :'(
#1812
I've made a couple of applications (module tester, event timer)  using 800x600 and 16 bit color without any problems.  
I have a 700Mhz Celeron processor and 192MB of RAM.  I would suggest that you do some tests yourself and then let us know what you come up with.  
#1813
Hehe.... The first adventure game I ever played was a text version of a Dungeons&Draons thing, I am not even sure it had a name.  It ran on an Intel MDS and an 8 inch floppy disk.  MDS was Intel's programming workstation circa late 1970's and was this huge blue box.  

We had a huge sheet of paper where we mapped out the game.  It was a communal system so you couldn't really play for very long.  As soon as some one came along to do some school work you had to give it up.

Even before that I played a game on an IBM 360  called WUMPUS or WOMPUS that was also a text based game.  I actually got paid for that;  I had a little job repairing terminals for the University and we were supposed to "burn'em in" before sending them back repaired.  
#1814
Darth, I'm glad you liked my ideas.  

Quote
Only I would suggest making the main links (on the top bar nav) go to the first page in the sub-nav elements.
The discussion is past this already but this is what I had in mind.  Guess I didn't explain that aspect very well.  

I like your latest prototype.  I think there could be more games in the right column.  In addition to pick of the month/favorites there could also be some that are randomly selected each time there is a page change.   So that coulmn might look something like this:
  • Pick of the Month
  • Most Popular
  • Other random selections
  • Statistics

    Just out of curiosity, will the final implementation be done with cold fusion or are you just using it to  make the prototypes, templates, etc.   I ask because much of the current site and the forum is PHP and some flavor of SQL database and I wonder what if any technical problems may be ahead?  

    Anyway great work...  

#1815
Example (continued)
//===================================================================
// Event Handlers 
//
// The following functions are to be called by AGS event handler 
// routines. 
//===================================================================
int new_wire, sel_wire, tmp_wire;      // Wire id 
int debR, debL;                        // Mouse button debounce timers

function wire_start() {
   // Called when "Player Enters Room" 
   int i;
   
   RawSaveScreen(); 
   new_wire=NONE;
   sel_wire=NONE;
   tmp_wire=NONE;

   i=0;
   while (i<MAX_WIRES) {
      wire.active = 0;
      i++;
   }
}

function wire_execute() 
{
   int id;
   string buf;  

   // Use left button to draw a line, press left button and 
   // drag mouse.  Lift button to complete line.   
   if ((IsButtonDown(LEFT)==1)&&(new_wire == -1)) {      // Mouse Down - Create a new wire
      new_wire = NewWire();
   }
   else if (IsButtonDown(LEFT)==1) {                     // Mouse Drag - Drag the wire
      DragWire(new_wire);
   }
   else if ((IsButtonDown(LEFT)==0)&&(new_wire != -1)) { // Mouse Up - Complete the wire
      CompleteWire(new_wire);
      new_wire = -1;
   }

   // Use right button to select and delete lines.  Right 
   // click on a wire to selecte it.  Right click on a selected 
   // wire to delete it.  Right click anywhere but the wire to 
   // deselect it.
   if (IsButtonDown(RIGHT)) {  
      if ((WireIsSelected(sel_wire))&&(debR==0)) {
         EraseWire(sel_wire);
         sel_wire = NONE;
         tmp_wire = NONE;
      }
      else {
         sel_wire = SelectWire(mouse.x, mouse.y);
         debR = 10;
      }
   }
   else if (debR>0) debR--;

   
   // Update drawing changes
   DrawWires();

   // Debug messages
   StrFormat(buf,"Wire(%d) fx:%d fy:%d tx:%d ty:%d color:%d active:%d",
             id,
             wire[id].from_x,
             wire[id].from_y,
             wire[id].to_x,
             wire[id].to_y,
             wire[id].xcolor,
             wire[id].active);
   SetLabelText(0,0, buf);

   StrFormat(buf,"dx:%d dy:%d m:%d id:%d sw:%d tw:%d",
             wire[id].dx,
             wire[id].dy,
             wire[id].m, id, sel_wire, tmp_wire);
   SetLabelText(0,1, buf);
}

//===================================================================
// Event Handler Functions (i.e. function room_a())
//===================================================================
function room_a() {
  // script for room: Player enters screen (before fadein)
  GUIOff(MENU);
  wire_start();
  SetCursorMode(6);
  
}

function room_b() {
  // script for room: Repeatedly execute
  wire_execute();
}
#1816
Example 3-17-04
I debugged my first example and have listed the script below.  
//===================================================================
// AGS ROOM SCRIPT
//
// PROJECT: AGS Tutorials
//
// ROOM:    Drawing Wires
//              
// ABSTRACT:
// This is a basic wire drawing example. Operation is as follows:
//
//    Draw Wire - Press and hold left mouse button while moving 
//                mouse.  Release mouse button to complete wire.
//
//    Select Wire - Position cursor over wire and left click.
//
//    Erase Wire - Position cursor over selected wire and left click.
//
// REVISION HISTORY:
// 03-17-03 RJJ   Original version
//
//===================================================================

//===================================================================
// Constant Definitions (i.e. #define)
//===================================================================
#define NONE -1
#define ALL  -2

//===================================================================
// WIRE LIST
//
// A wire list is needed to hold the coordniates of the wires/lines to 
// be drawn.  The drawing of a wire requires four coordniates.  It 
// would be convenient if  there were a variable type that could 
// hold all four coodniates.  Since there is not such a variable type
// built-in to AGS we can make one of our own using "struct"
//
// This constant define the maximum number of wires that may be in 
// the system.  The value below may be modified as needed.  The 
// more wires the more work AGS has to do.  
       #define MAX_WIRES                 3
//   
// The following constant defines the normal wire color.  It is used 
// to show  completed wire.
       #define  WIRE_NORMAL_COLOR        0
//   
// The following constant defines the normal wire color.  It is used 
// to show a selected line.  
       #define  WIRE_SELECT_COLOR        63488
//
// The following constant defines the drawing wire color.  It is used 
// to show a line that is the process of being drawn.
       #define  WIRE_DRAW_COLOR          65472
//
// The following constant defines the distance between the cursor and a 
// wire when attempting to select.
       #define  WIRE_SELECT_RANGE        10
//
//===================================================================

// Create a "wire"  variable data type definition, WIRE_DEF can then 
// be used as is "int", "string", "char", etc.
struct WIRE_DEF {
   int active;              // 0=don't draw, 1=draw this line
   int xcolor;              // line color
   int from_x;              // line coordinates
   int from_y;
   int to_x;
   int to_y;
   int dx;
   int dy;
   int m;
};

// Declare an array variable of type WIRE_DEF
WIRE_DEF wire[MAX_WIRES];

//===================================================================
// DrawWires
//
// Draw all the wires in the wire list, wire.  
//===================================================================
function DrawWires() 
{
   int i;

   // Erase the wires first
   RawRestoreScreen();

   // Draw the wires
   i=0;
   while (i<MAX_WIRES) {
      if (wire.active) {
         RawSetColor(wire.xcolor);
         RawDrawLine(wire.from_x,
                     wire.from_y,
                     wire.to_x,
                     wire.to_y);
      }
      i++;
   }
}

//===================================================================
// EraseWire
//
// Erase the wire specified by id, the wire array index.  If 
// an invalid id, such as -1, is specified then all wires are 
// erased.
//===================================================================
function EraseWire(int id) 
{
   int i;
   if ((id >= 0) && (id < MAX_WIRES)) {
      wire[id].active = 0;
   }
   else if (id==ALL) {
      i = 0;
      while (i<MAX_WIRES) {
         wire.active = 0;
         i++;  
      }
   }
}

//===================================================================
// WireIsSelected
//
// Return 1 if the specified wire is selected and 0 otherwise.
//
//===================================================================
function WireIsSelected(int id) 
{
   int status;
   
   if ((id>=0)&&(id<MAX_WIRES)&&(wire[id].xcolor==WIRE_SELECT_COLOR)) status=1;
   else status = 0;
   return status;
}

//===================================================================
// NewWire
//
// Search the wire array for an empty slot and create a new wire 
// in that slot.  The new line's start position will be set to the 
// current mouse position.
//===================================================================
function NewWire() 
{
   int i, id;

   // Find an empty slot
   id = NONE;
   i = 0;
   while (i<MAX_WIRES) {
      if (wire.active == 0) {
         id = i;
         i = MAX_WIRES;
      }
      i++;
   }

   // Set begin point of wire
   RefreshMouse();
   wire[id].active = 0;     //  don't make active until line length > 0
   wire[id].xcolor = WIRE_NORMAL_COLOR;
   wire[id].from_x = mouse.x;
   wire[id].from_y = mouse.y;
   wire[id].to_x   = mouse.x;
   wire[id].to_y   = mouse.y;

   // return id of new wire
   return id;
}

//===================================================================
// DragWire
//
// This function sets the specified wire's end point to the current 
// mouse position.
//===================================================================
function DragWire(int id) 
{
   RefreshMouse();
   if ((id >= 0) && (id < MAX_WIRES)) {
      wire[id].to_x   = mouse.x;
      wire[id].to_y   = mouse.y;
      wire[id].xcolor = WIRE_DRAW_COLOR;
      wire[id].active = 1;
   }
   else {
       Display("*** Error-DragWire, invalid id=%d specified",id); 
   }
}

//===================================================================
// CompleteWire
//
// This function completes the drawing of a wire.  It sets
// the specified wire's color to normal and calculates it's
// slope. 
//===================================================================
function CompleteWire(int id) 
{

   if ((id >= 0) && (id < MAX_WIRES)) {
      // Calculate line's slope
      wire[id].dx = (wire[id].to_x - wire[id].from_x);
      wire[id].dy = (wire[id].to_y - wire[id].from_y);
      if (wire[id].dx!=0) wire[id].m = ((wire[id].dy * 1000) / (wire[id].dx));
      else wire[id].m = 999999;

      // Set normal color
      wire[id].xcolor = WIRE_NORMAL_COLOR;

      // Set wire active 
      wire[id].active = 1;
   }
   else {
       Display("*** Error-CompleteWire, invalid id=%d specified",id); 
   }
}

//===================================================================
// SelectWire
//
// This function selects the specified wire's end point to the current 
// mouse position.
//===================================================================
function SelectWire(int sx, int sy) 
{
   int i, id, nx, ny, y, range, valid;
   int ymax, ymin, xmax, xmin, symax, symin, sxmax, sxmin;
   string buf;
   
   // Deselect any previously selected wire, onl allow one selectionat a time
   i = 0;
   while (i<MAX_WIRES) {
      if (wire.xcolor==WIRE_SELECT_COLOR) wire.xcolor = WIRE_NORMAL_COLOR;
      i++;
   }
 
   // Test each of the wires to see if the point sx,sy 
   // lies on or near the wire.
   id = NONE;
   i  = 0;
   while (i<MAX_WIRES) {

      // Validate selection coordinates
      valid = 1;
      if (wire.from_x > wire.to_x) {
         xmax = wire.from_x;
         xmin = wire.to_x;  
      }
      else {
         xmax = wire.to_x;
         xmin = wire.from_x;
      }
      if (wire.from_y > wire.to_y) {
         ymax = wire.from_y;
         ymin = wire.to_y;  
      }
      else {
         ymax = wire.to_y;
         ymin = wire.from_y;
      }
      sxmax = sx + WIRE_SELECT_RANGE;  
      sxmin = sx - WIRE_SELECT_RANGE;
      symax = sy + WIRE_SELECT_RANGE;
      symin = sy - WIRE_SELECT_RANGE;
   
      // Line segment fits within rectangular range of cursor
      if ((sxmax>xmax)&&(sxmin<xmin)&&(symax>ymax)&&(symin<ymin)) {
            wire.xcolor = WIRE_SELECT_COLOR;
            id = i;
            i = MAX_WIRES;
      }
      // Selection coordinates are within rectangular area 
      // containing line segment
      else if ((sx<=xmax)&&(sx>=xmin)&&(sy<=ymax)&&(sy>=ymin)) {

         // Normalize selection coordinates to from_x,y
         nx = sx -  wire.from_x;
         ny = sy -  wire.from_y;

         // Calculate (y = mx+b)  for normalized coordniate system
         y = (nx * wire.m)/1000;

         // Is y within range of ny ?
         range = y-ny;
         if (range < 0) range = -range;
         if (range < WIRE_SELECT_RANGE) {
            wire.xcolor = WIRE_SELECT_COLOR;
            id = i;
            i = MAX_WIRES;
         } 
      }
      i++;
   }
   return id;
}


continued ...
#1817
Congratulations Darth, and Kudos to all entries.  


Darth, I looked at your template but couldn't find the sub-menu.   Speaking of navigation, what would you think of putting the sub-menu down the left column.   Maybe make the news just a headline and date.

Here are some other things (in addition to above) that could possibly be put in that lefthand column:

  • SubMenu - Selectng an item from the main menu  wouold change the sub-menu.  Selecting from the sub-menu would only change the center column and possibly make some random game selections in the right column  as discussed elsewhere in this thread.

  • News - Only needs to be date and headline of last two or three news items.   These are only quick links to the most recent events on the news page which is accessable from the main menu.  

  • Ags Statistics - This could be somthing like the number of completed and in progress games, number of forum members, number of downloads AGS and games, etc).

  • Login - Standard login box for games page.

  • Poll - Set something up so CJ can easily create a poll.  That way it would be easy for him to solicit feedback from us about different AGS issues.   Also maybe have an archive of previus polls and their results.

    Maybe some other folks have some ideas about this as well.  I don't think everything has to be on every page.   For example, on the games page there could be a login box instead of the poll.  On other pages there could be other content in  that column.  

    What do you think?

#1818
Thanks CJ.  Thanks for your response in my other recent threads as well.  
#1819
Quote
It could be that Al-Queda are very very cunning. Why would they attack Spain? Well, Spain is the "Coalition against terror"'s biggest supporter that they could influence like this. In the UK, the main opposition party was also in favour of the war in Iraq, so they couln't swing an election like this. In the US, too many of the public were in favour of the war too and also the Democrats have only retrospectively been very against the war. But in Spain the main opposition were close enough to swing like this, and the population were massivley against their own government's involvement in the war.
You seem to be saying that the Spainsh population's political views have made them targets and that in other countries whoose populations are not as easily swayed to political views favorable to the terrorists were relatively immune.   If this is true then their new president, who campaigned on policies favorable to  terorists, is likely more responsible for the attack that the previous president's support for the US.

Quote
Now, human nature being what it is they couldn't be sure to have as large a swing as they did, but it was bound to have some effect if it was known that Al-Queda were behind it. Like with September 11, they couldn't have been sure that the towers would collapse and kill so many, but they could be sure of causing plenty of deaths anyway.
However they mis-calculated the character of the American population, who, instead of aquiesing decided that enough is enough and launched an agressive  policy to deal with the individuals and groups involved.

Quote
... People vilify the Vichy government, but would it have been better for France to fight until all its people were dead?
Yes ;), because if they had that mentaility they quite probably would have defeated the Germans.  Didn't England face a similar choice during WWII as France and choose otherwise?    

Quote
Should the US have stayed in Vietnam?
We should have fought it to win in the first place.  The liberal party that was in power at the time wanted to appease the China and so instead of trying to defeat the enemy they said ok here is this line and you guys stay on your side and we'll stay on our side.   The other side, however was playing to win.  So the result was that 50,000+ died over there so that a bunch of politicians over here didn't need to make tough decisions. The other party took over in 1968 so they got tough for awhile but by that time the entire US population had enough and wanted it over with.   So they negociated their way out.  If they stayed in they would have eventually won and Vietnam would have been much better off for it today.    

Quote
I am angry with George Bush and Blair and Aznar for putting the UK and Spain in this position. The war in Iraq has increased terrorism in Iraq and throughout the world, so arguments about it saving lives are bunk.
I'm confussed now.  I thought that there isn't connection between Iraq and Al Queda?  Why Wouldn't Al Queda be more pissed off about getting their asses kicked in Afganistan than a war in a country where they no connection and that resulted in liberation of thw population.   Will they now target France for sending troops to helping the US in Hatti?  I guess you're agreeing with Bush and Blair then,  that there was a nexus between the former Iraq and Al Queda.  

Quote
Terrorists, catholic, muslim or whatever, believe in their cause beyond the level we can comprehend. It has nothing to do with money, violence or thrill and everything to do with revenge, hatred and faith. They believe what they're doing is right and makes the world a better place...
This is more or less true of the people that carry out  the attacks.   But without money and power you are left with a few nuts running around ranting.  You get an ocassional Timothy McVeigh but not an enduring and organized movement.  The people who run Al Queda gained both power and money as a result of the attack in Spain.  They now know that they can pressure the European population to do what they want  and  with that success they will be able to raise more funds for future mischief.  

 
#1820
I can second the need for error handling.  The problem with doing this for FileREad functions is that most of them already return a data value.  The FileIsEOF() function was added to be able to know when to stop reading a file.      Perhaps a FileIsError() or similar funct could be added to check for errors while reading or writing?
SMF spam blocked by CleanTalk