Intro cutscene help! (Flash to AGS)

Started by malditojob, Fri 17/07/2009 04:42:21

Previous topic - Next topic

malditojob

Hi everybody! this is my first post here  ;D

I'm a chilean student of Graphic Design (sorry my bad english). Right now i'm making an educational adventure game to finish my studies, but now i'm having some problems with the animations of the game.

I created the intro animation in FLASH, and the image quality of the exportation to AVI or MPG is so bad that I don't wanna use it. So I exported 200 frames (800 x 600 .jpg's) to make a VIEW in AGS to create my intro cutscene. I created a "Room 0" and the PlayerCharacterView is set to "4" (my 200 jpg's View). THIS DOESN´T WORK, so I have a few questions:

1) Where must I use the VIEW? (I created a character cAniminitial with StartingRoom "0", but still don't appear the animation)

2) The "Loop 0 (down)" of the View only plays when the character walks?

3) HOW CAN I MAKE MY INITIAL CUTSCENE WORK???  ???



Here is the code of the room 0:

// room script file

function room_AfterFadeIn()
{
StartCutscene(eSkipESCOnly);
mouse.Visible = false;
Wait(8000);
EndCutscene();
player.ChangeRoom(1, 400, 300);
mouse.Visible = true;
}


Any help is welcomed, thanks!

Gilbert

You have to animate the character. The view won't play automatically. So:
Code: ags

// room script file

function room_AfterFadeIn()
{
StartCutscene(eSkipESCOnly);
  mouse.Visible = false;
  cAniminitial.LockView(4);
  cAniminitial.Animate(0, 1, eOnce, eBlock, eFowards);
  cAniminitial.UnlockView();
  Wait(8000);
  EndCutscene();
  player.ChangeRoom(1, 400, 300);
  mouse.Visible = true;
}


There should be better alternatives, but as long as things work I usually won't advice others to use other methods.

Ghost

Also, make sure you use character.ChangeRoom(RoomNumber) to move your animation to the correct room (since you mention Room0).

malditojob

I tried like Gilbet says, but still don`t work  :(

any other suggestion??

Gilbert

Did you put that character for animating in that room? Also, double check whether the numbers (the view, loop, etc.) used are correct.

Khris

Shouldn't the starting room be #1? Afaik, AGS starts numbering rooms at 1, not 0.

Also, I'm pretty confident that the quality of the exported avi/mpg can be set within Flash's export dialog.

malditojob

Problem resolved!

I put a background image in Room 0 to see the animation, and I noted that just a part of it was visible on a corner. The cAniminitial character (initial animation) was StartX = 1 and Start Y = 1 ('cause I thinked it would put in the top left pixel :P). The correct numbers to view the character (on my 800 x 600 game) are:

StartX = 400
StartY = 600

I don't understand why is it so, but now my cutscene works!  :D


KhrisMUC: A normal exportation of my 577 Kb Flash movie created a 13 Mb AVI file. A non-compressed AVI file is bigger than 100 Mb! I exported frame-per-frame in medium and low quality in flash, so 50 .jpg's makes me just 1 Mb, and look's MUCH BETTER than the AVI file  ;)

Gilbert

Note that, however, for an AGS game, exporting them to JPEG has no benefit over other lossless formats like BMP or PNG, as AGS doesn't store the sprites in lossy JPEG format. The editor will convert them into lossless images when sprites are being imported. So, because of the artifact created by the JPEG compression, you may expect the resulting game files would be even larger, not smaller.

Import sprites from JPEG images is highly discouraged.

Khris

Ah ok, yeah, the filesize is prone to get big, that's true.

Characters are positioned using their feet, i.e. the bottom center of the sprite is at the character's coordinates, not the top left corner.

malditojob

Quote from: Gilbet V7000a on Fri 17/07/2009 10:28:43
Note that, however, for an AGS game, exporting them to JPEG has no benefit over other lossless formats like BMP or PNG, as AGS doesn't store the sprites in lossy JPEG format. The editor will convert them into lossless images when sprites are being imported. So, because of the artifact created by the JPEG compression, you may expect the resulting game files would be even larger, not smaller.

Import sprites from JPEG images is highly discouraged.

I DIDN'T KNOW THAT! Now I will export full resolution PNG images...


Thanks a lot dudes, this forum is really the way to find answers about AGS!

SMF spam blocked by CleanTalk