AGSCreditz 2.0 problemz

Started by Alynn, Sat 27/03/2004 04:45:31

Previous topic - Next topic

Alynn

Actually it did it with the first AGS Creditz as well..

Everything seems to be working just fine at first, credits are scrolling and the background is moving as the airplane flies around the screen.

However as soon as the background stops scrolling I get ghost images left over from the previous credit position (I use scrolling credits)

So I guess this is more a bug report than anything


Alynn

#1
Just for the hell of it I changed it to a static credit and this starts happening:

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x01C02875 ; program pointer is +5, ACI version 2.60.698, gtags (9,200)

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.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.


I'll look at it some more and change some things to see if I can pinpoint the problem more...

EDIT: I no longer get the error... but NOW no static credits show up at all

RunStaticCreditSequence(seq, 5); is the line I am using with seq being a parameter used in the function that RunStaticCreditSequence is called.

Alynn

#2
Ok, I played and played and played and here is where it always crashes.

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

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.

(Room 12 script line 5)


Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.
---------------------------
OK  
---------------------------


Room 12 script line 5 is in the following function

Code: ags
4:   function RunSeq(int seq) {
5:     RunStaticCreditSequence(seq, 1);
6:   }


the first time it is called is here

Code: ags
if (character[AIR].x == 70){
    if (character[AIR].y == 110){
      AnimateCharacterEx(AIR, 5, 0, 0, 0, 1);
      character[AIR].y = 111;
      MoveCharacterDirect(AIR, 70, 440);
      
      SetCreditEx("Sky Tower Rescue", 1, 63488); 
      SetCreditEx("Presented by:", 1, 25567);
      SetCreditEx("Alynn Studio", 1, 25567);
      SetCreditEx("made in association with:", 1, 25567);
      SetCreditEx("SkyTower Games", 1, 25567);
      SetCreditEx("and", 1, 25567);
      SetCreditEx("TWiG", 1, 25567);
      RunSeq(1);
    }
//The rest is if statements for other locations the character
//will be at and the other RunSeq codes
}


EDIT: Sorry I thought I should add what SetCreditEx is...
Code: ags
function SetCreditEx(string Text, int seq, int Color){
  SetStaticCredit(seq, counter, Text, 160, 120, 3, Color);
  counter = counter + 1;
}


I also had x and y pos at -1 but that didn't work either

Sorry for triple posting, but I thought three posts with different information would be easier to deal with than one long post of lots of information.

Alynn

#3
Ok I figured out that every credit has to have a title or it won't work at all... thats my first problem, but I would suggest putting in some sort of error message, as just crashes doesn't let the user know what the problem is...

Also I would suggest that you allow multiple lines for a single title... After all if there is more than one Programer  you could have them all grouped under a single "Programing:" title

EDIT: Ok after playing with it some more, it seems it doesn't like multiple sequences, it seems to crash when defining sequence 3, so maybe 2 works, but the problem is when trying to reuse a new sequence if it is shorter than the previous sequence that occupied it, the extra credits from the previous sequence are displayed.  Maybe you should put in a FlushSequence(int sequence) that will delete everything in the sequence and avoid this problem. Either that OR upon RunStaticSequence or RunCreditSequence after it is finished it will automaticly flush its contents.

AJA

#4
Thanks for testing the plugin. :)

QuoteFlushSequence(int sequence)
This feature was already in the previous version and it's not in the beta of 2.0.

Quoteit seems to crash when defining sequence 3
If I remember correctly some beta version can only handle 2 sequences (2 scrolling + 2 static).

QuoteI would suggest putting in some sort of error message
That was my plan, but I skipped all the error message parts when writing the beta.

QuoteAlso I would suggest that you allow multiple lines for a single title...
The static credits can be split on multiple lines but the static credit titles can't be. But if you need multiple lines for titles it's easy to add.


Sad that this pops up just when I don't have time. I'll try to get another beta released for the next weekend. I'll get to work.



-EDIT-

Here's the current version, if you want to test it: http://koti.mbnet.fi/dima/ac_2.0.0.5.zip
And you might want to check the ResetSequence(int seqtype, int sequence) function.
If SEQTYPE is 1 it will clear scrolling credit sequence SEQUENCE, if it's 2 then it'll clear static credit sequence SEQUENCE. If SEQTYPE is not 1 or 2 it will clear both scrolling and static credit sequences SEQUENCE.

Alynn

ResetSequence works.... but perhaps a bit too good...

Here is my situation....

The first room (room A) my credits run in uses sequence 1 and runs with no problem,

It then teleports to a second room (room B) where sequence 2 is started

Then it moved to room C which is just a different scene then it new rooms back to room B wehre sequence 1 is started with new perameters.... Except the second set doesn't work because the Reset deletes everything and doesn't seem to allow any new credits to be placed into it....

This is how I tried doing it

ResetSequence(2, 1);
counter = 1;
SetCreditTitleEx("Created With", 2, RED);
SetCreditEx("Adventure Game Studio by Chris Jones", 2, RED);

counter is just an integer that keeps track of the current number ID for the credits, SetCreditTitleEx and SetCreditEx are just custom functions that basicly add the credits to them without having to put in the same info for them over and over (I'm lazy)

nothing shows and in my rooms rep_ex which keeps track of if a sequence is finished (and doing the room changes) never fires... so it seems that the reset happens after I add the new sequence....

I'm not entirely sure, but I've tried doing it in different orders (first two using sequence 1, all 3) and the same thing happens, the newly added credits don't show...

AJA@School

QuoteResetSequence(2, 1);
counter = 1;
SetCreditTitleEx("Created With", 2, RED);
SetCreditEx("Adventure Game Studio by Chris Jones", 2, RED);

Uh... I guess you have some function calls after these that set credits to sequence 1? I haven't tried the reset feature myself, so it can be buggy.

Alynn

sorry I was in the middle of changing things around when I decided to post... those 2's should be 1's....


AJA

Quote from: Alynn on Sat 27/03/2004 04:45:31However as soon as the background stops scrolling I get ghost images left over from the previous credit position (I use scrolling credits)

Uh.. Do you use TTF fonts? ->


Alynn

#10
Yea I use the Kristen ITC TTF font (I know XP has it, dont know about other OS's)

I'm guessing thats why the snail trail behind the scrolling font

It does it too with static fonts, but it isn't near as noticable just a few pixels here and there....

EDIT: The new reset sequence works beautifully!!!! Now just a few more things and I can release the intro upon the masses :)

BTW even with the small bugs it's a great tool, best part is how much file size it cuts down on for not needing graphical credits.

AJA

Now I can honestly say that it's sort of AGS's fault :D

I'll do some tests...

Alynn

Quote from: AJA on Mon 29/03/2004 17:17:35
Now I can honestly say that it's sort of AGS's fault :D

I'll do some tests...

Well I dont know anything about writing plugins for AGS, but I do program and this occurs to me.

Since it seems that when the background is refreshed (redrawn or whatever) it gets rid of the ghost trails... so how about forcing AGS to refresh the screen immediately after drawing a set of credits for static, and refreshing upon every move of the credits with scrolling...

I say this assuming that you can force AGS to refresh the screen with a plugin... so it may not be possible at all

Pumaman

This is due to a bug with the GetTextExtent plugin API feature, which in turn is due to a bug in the TTF renderer that AGS uses. For now, it's probably best if you add a few pixels to the height returned by GetTextExtent, and then invalidate the region manually.

AJA

Alynn, can you upload the font somewhere so I can test it (I have windows xp, but I don't have that font)?

Candle

Trying to use the credit plugin but when I use the script I get this error  .
I put this in the Global script and got that error .
Where would I put this so it will work ?

SetCredit(0,"Candle<.>Rudy",15,0,0,50,0);
SetCredit(1,"Candle<.>Rudy",15,0,0,50,0);


Alynn

Sorry, forgot to do this last night...

http://linuxbocks.com/astroedit/download/agsfnt0.ttf

There ya go... I went ahead and just gave you the one in my game folder instead of searching through my font folder...

AJA

#17
Quote from: Candle on Wed 31/03/2004 19:52:54I put this in the Global script and got that error
Try putting it into the game_start function in the global script or player enters screen interaction in a room.

Quotehttp://linuxbocks.com/astroedit/download/agsfnt0.ttf
Thanks


-EDIT-

Hmm, it works fine for me... Maybe my AGS version is the one that doesn't have this bug. I'll download the newest one and try again.

-EDIT2-

It still works... Weird.

SMF spam blocked by CleanTalk