strange black screen stuff

Started by Sektor 13, Thu 21/10/2004 00:00:30

Previous topic - Next topic

Sektor 13

Hi.

I have strange problem. (game is for 640x480)- I have room size of 1280x480 px, after some talk, player moves
to the far right side of the screen onto REGION which executes some quick animations and than transports main character to the next room.
But the next room is black (i tried few different rooms too), if i press CTRL-Q (for quit) it shows the screen and nothing is moving,
There is no mouse cursor or anything that is moving, everytime i press ctrl-q screen uptades current player position, if you accidently move it. ???
...

thanx

Goot

Did you just do NewRoom, or NewRoomEx? If you just did NewRoom and the player is at x coordinate 1000, when you move him to a new room (assuming that room is not scrolling), he'll be off the screen. So the viewport (what part of the room you're looking at) will also be off the screen, which I guess is black.

By the way, do you see the character on the screen?

Also, if you've done some sort of custom room transition, and not faded back in, that could do it too.

Sektor 13

i used  or NewRoomEx and i use coordinates  200x150, so it should be in screen range, i didnt use any type of extra fadein/out.. no i don't see character on screen, it is all black...

strazer

Have you recently changed the game's color depth?

Sektor 13

no, any all other things works normaly -  all room transitions are normal, noly this one is not, and if i set time in that "black room" like, wait(20)-> go to next room, next room works normaly..

Scorpiorus

What's script code you have in the original room?

Sektor 13

// room script file

#sectionstart room_a 
function room_a() {
  // script for room: Player enters screen (before fadein)
SetBackgroundFrame(0);
GUIOff(9);                  // my inventory GUI
HideMouseCursor(); 
}
#sectionend room_a 

#sectionstart region2_a 
function region2_a() {
  // script for region2: Player walks onto region
SetBackgroundFrame(1); 
}
#sectionend region2_a 

#sectionstart region2_b 
function region2_b() {
  // script for region2: Player walks onto region
NewRoomEx(36,113,159);
}
#sectionend region2_b 

Scorpiorus

Hmm, I guess you also used the Interaction Editor actions in that room, right?

Is there any chance you could upload a roomX.crm file (where X is the room you posted the script for)?

Additionally to that, what AGS version do you make the game with, and what color depth is the game designed at?

Sektor 13

deph 32 bit,  newest version of AGS, 2.61xx

Scorpiorus

#9
Hmm, I managed to replicate a bug where the engine aborts with an error message - "Error: unknown new interaction". I didn't get this blank screen, though.

Replication:

- Start AGS 2.62 RC2 editor;
- New game, 640x480;
- Change color depth to 32bit;
- Import 1280x480 background;
- Fill the whole room with a walkable mask;
- Draw a region near the right edge of the room;
- On player walks onto this region put:
Code: ags
Display("goto room 2!");
NewRoomEx(2, 100, 100);

- On player enters room add an action:
Character - Move EGO character to 1280, 140 (Wait=true); 1280, 140 are chosen so that EGO walks onto the region.
- Create another room to go to (room2.crm);
- Run test game

The player character goes to the region where after the message passed away the current room is unloaded but an error message appears on loading another room.

[EDIT]:

I guess it's some how related with using Character - Move character action rather than the MoveCharacterBlocking script function. When region RunScript's script is done there is a request to change a room but the engine has been running the On player enter screen interaction command. So, does the engine correctly terminates the execution of that interaction?

[/EDIT]

Test game:
http://www.geocities.com/scorpiorus82/repl_Reg.zip [21kB] (Copy & Paste)

AGS version 2.62 RC2

Pumaman

#10
Well spotted, that is indeed a bug, and yes it's because the engine doesn't abort the interactin before unloading the room.

The whole way that it deals with queuing up things to be done at the end of scripts/interactions is a bit of a mess at present. It's not something I'll hold back 2.62 for, but I will concentrate on getting it fixed early in 2.63.

I've added a tracker entry to track this:
http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=489

SMF spam blocked by CleanTalk