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

#1
Just reiterating my request in another post to increase the amount of background frames allowed per room on a per-game basis. Ex: Some games could use 2 backgrounds per room, others 8... etc.
#2
fovmester: Agree on the 3d physics thing. We're doing 3-space in Calculus, and it requires an entirely different type of math, 3d vectors. It's messy, at best... I have a test on it tomorrow... I should study  :-\

Obligatory Comment: 2d stuff on the other hand could be relatively simple. In its simplest iteration, it would be nothing more than gravity and simple collision detection. Regions could be used to define "floors". Objects and such would need to bounce when hit. Later versions could include point-by-point collision, acceleration, and fulcrums. Problems I could see arising would be including support for all of AGS' many types, Objects, Characters, and Items. Working knowledge of trig is, unfortunately, entirely necessary.

EDIT: For those of you who care, I had my test. It went well.
#3
Pumaman: Please... if you're still working on new builds, I would suggest to add some sort of increase into the next release. Perhaps even an option in the Game Preferences to allow the developer to specify the amount of frames per room in each game. This could decrease loading times on slower machines, if the dev only plans on using one background, and allows developers to use more than 5 frames total, without going through a workaround.

GarageGothic: Thanks for that code. You can bet I'll make liberal use of it.
#4
I know this has been brought up before, but I'd like to bring it up again, because I don't see a viable work around.

In a game I'm working on, I need to be able to switch each room background between a total of _nine_ different images. Each one needs to be entirely different. Before anyone says anything, no, this isn't for an animation, I can't use objects, unless you suggest I use an object the size of the entire screen... Which is doable... Basically, there's a state-based system through which the room backgrounds need to be able to change, based on the value of a variable, which should be mutable at run-time.

The entire crux of my post is to ask Pumaman what purpose limiting the amount of backgrounds serves... I'm assuming it's a memory allocation issue, but it seems to me that it should have been made dynamic long ago.

Assuming that the 5 frame limit isn't going to be changed, I was curious as to any workarounds anyone might be able to suggest... I had thought of having more than one room per room.... but then things could easily get tricky. Please reply with any suggestions you may have. I had looked into the DynamicSprite functions, but I'm not up to date on their proper usage... can Dynamic Sprites be used to replace room backgrounds? If so, they may be a possible answer to my problem.
#5
Hooray CJ! Thanks for pointing out that I should be using an if statement. No point in sticking a while loop in there when repeatedly_execute is already looping for me, right?

For those who are interested, here's the piece of working code:

Be sure to call SetTimer(1, 10) from game_start() or elsewhere in your code.

Code: ags
int WalkSpeed = 0;

function repeatedly_execute()
{
  if(player.Moving == true){
    if (!IsTimerExpired(1) && WalkSpeed < 8)
    {
      WalkSpeed++;
      lblCurrSpeed.Text = String.Format("Current Speed: %d", WalkSpeed);
      SetTimer(1, 10);
    }
  }
  else{
    if (!IsTimerExpired(1) && WalkSpeed > 0)
    {
      WalkSpeed--;
      lblCurrSpeed.Text = String.Format("Current Speed: %d", WalkSpeed);
      SetTimer(1, 10);
    }
  }
}


#6
Right, so I could reset the timer in the while loop and it would return true again once it completed.... Right...
#7
Not that it means anything... but here's his fine print:

"As far as we know, all software available for download on this site had been discontinued by their authors and is now available for free, or was published as free since release. We appreciate comments to remove any software that is not of free usage and has accidentaly appeared on this site."

I suggest a perl script to run through the AGS database and his own database... checking for title matches... But that'd require perl, which I don't know....
#8
I'm having algorithm issues.... I think... It's the only reason I didn't stick this in the beginner's board.

I'm trying to make a ticker on the dashboard to show the players "speed". It's entirely behind the scenes, but the number should gradually get higher as the player continues to walk... Here's what I have currently, it outputs to a GUI.

Code: ags
int WalkSpeed = 0;

function repeatedly_execute()
{
  if(player.Moving == true){
    while(IsTimerExpired(1) && WalkSpeed < 8)
    {
      WalkSpeed++;
      lblCurrSpeed.Text = String.Format("Current Speed: %d", WalkSpeed);
    }
    if(IsTimerExpired(1))
      SetTimer(1, 10);
  }
  else{
    while(IsTimerExpired(1) && WalkSpeed > 0)
    {
      WalkSpeed--;
      lblCurrSpeed.Text = String.Format("Current Speed: %d", WalkSpeed);
    }
    if(IsTimerExpired(1))
      SetTimer(1, 10);
  }
}
#9
Why yes, that's exactly what happened  ::)

Thanks. *goes off into a corner and feels sheepish for a while*

EDIT: Oh, by the way. Is that divider movable for you? Because it's static over here... I can provide screens.
#10
I'm running a flat screen and AGS doesn't look too great. But I'm not complaining, because I'm more interested in the functionality it provides than how pretty the IDE looks when I'm coding in it...

Then again, ever since I got this flatscreen... everything's gotten screwy...
#11
Did the Show and Say for the dialog script get moved somewhere wierd in 3.0? Because I can't see them...

If they did... could we have them back... I've got instances where I'm going to need to keep the player from seeing exactly what they're going to say...
#12
Thanks SSH! I've gotten past that nasty bug and now I can start fixing the functionality... which apparently broke while I was working on the other part.
#13
Thanks for the quick response, SSH. Unfortunately, I did what you told me and I'm still getting the same error. Which means I probably described something incorrectly. Here's the resulting code as it stands thus far:

EmotionDialogEngine.ash
Code: ags
Dialog* dialogArray[20];

struct EmotionDialog
{
  int dialogNumber;
  int EmotionTopics[31];
  import function init(int, Dialog*);
  import function SetTopicEmotion(int, Emotion);
  import Emotion GetTopicEmotion(int);
  import function ToggleTopics();
  import bool CheckTopicForCurrentEmotion(int);
  import function StartDialog();
};


EmotionDialogEngine.asc
Code: ags
function EmotionDialog::init(int dialogID, Dialog* dlog) { 
  this.dialogNumber = dialogID;
  dialogArray[dialogID] = dlog;
  
  int i = 0;
  while (i < 30)
  {
    this.EmotionTopics[i] = 0;
    i++;
  }
}

function EmotionDialog::SetTopicEmotion(int topic, Emotion emote) { this.EmotionTopics[topic] = emote; }
Emotion EmotionDialog::GetTopicEmotion(int topic) { return this.EmotionTopics[topic]; }

bool EmotionDialog::CheckTopicForCurrentEmotion(int topic)
{
  Emotion topicEmotion = this.EmotionTopics[topic];
  
  if(topicEmotion > 1)
    if(CurrentEmotion == topicEmotion)
      return true;
    else
      return false;
  else
    return false;
}

function EmotionDialog::ToggleTopics()
{
  int i = 0;
  while(i < 30){
    if(this.EmotionTopics[i] > 0) {
      Emotion topicEmotion = this.EmotionTopics[i];
      if(this.CheckTopicForCurrentEmotion(i))
        dialogArray[this.dialogNumber].SetOptionState(i, eOptionOn);
    }
    i++;
  }
}

function EmotionDialog::StartDialog()
{
  dialogArray[this.dialogNumber].Start();
}


Global Script in game_start()
Code: ags
   exDiag.init(0, ExampleDialog);
   exDiag.SetTopicEmotion(1, eNONE); // eNONE is an enumeration in another module
   exDiag.SetTopicEmotion(2, eRAGE);
   exDiag.SetTopicEmotion(3, eSAD);
   exDiag.SetTopicEmotion(4, eHAPPY);


Room Script function calls
Code: ags
function hHotspot1_Talk()
{
  exDiag.ToggleTopics();
  dialogArray[exDiag.dialogNumber].Start(); //the offending line
}


That's all the code I've written. The offending line is that dialogArray[exDiag.dialogNumber].Start();. I'm getting a null pointer referenced (error -6).

As you can see, I've eschewed the dynamic array entirely. Before, I was able to access the array from within game_start, but for some reason, when I go to use it in a room, it crashes and burns.

Your comments are appreciated.
#14
I've defined a dynamic array in my global header, expecting it to be available everywhere. Instead, I seem to be having issues.

When I go to access the array from a global function (GameStart) it runs perfectly... my pointer works just as it should be. When I access the array from a room function, (a hotspot action) it tells me I'm accessing a null pointer. Could this be because the array is resetting itself each time the global header is run (and thus every time a new room is loaded)? If so, how could I go about declaring and initializing the dynamic array without resetting it each time I load my header?

I would include code, but it's scattered about 4-5 files... let me know if you need it.
#15
The Rumpus Room / Re: Cheesy subtitle for AGS
Fri 21/12/2007 04:23:30
Quote from: lo_res_man on Wed 14/11/2007 02:17:53
AGS: Acronyms Genarate Suicide

Brilliance! I lol'd
#16
Sweet and sexy hotness!!! I downloaded it twice!!  ;D

EDIT: Would there possibly be a way in the next RC to load and edit room backgrounds as well?!? It would seem that most of the implementation is there, the focus just needs to be changed.

Just an idea. ;D
#17
I'd like to see an abstraction of the entire dialogue GUI interface. To make it more manageable as far as the code is concerned, without hassling with creating your own GUI/dialogue engine.

That's even more than what Ghost wished for. But, hey, I like to think big. :D

I would also like to see some more OO paradigms make their way into the code. Namely, direct access to the standard AGS classes, as far as custom variables are concerned. And polymorphism. I've heard CJ mention that both would make it much more difficult to implement saved games. Perhaps if that was also abstracted out. Of course, it wouldn't be used much of the time, but it would be available.

Anyway, keep dreaming big, if we ask for big stuff, we're more likely to get something simpler, which is always a step in the right direction. :D
#18
Woah... dude...   :o
#19
Rawr, thanks for the quick response.
#20
I recall there being a module or plug-in for this after Apprentice was released, because so many people wanted to know how the programmers implemented the hill on the tower. I'm not sure what it was called though :(
SMF spam blocked by CleanTalk