gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > video? intro thing..

#42955 - Issac - Tue May 17, 2005 1:22 pm

I've been making an intro clip for my game in flash (can save as several movies, flash files etc.) But i'd like to know how to add it to a gba or something :S
I'd first have to convert it somehow... and then insert it into my coding and all, please, I really need help with this.
_________________
yeah, well, maybe... or? anyways.... eh... what was i talking about??

#42958 - tepples - Tue May 17, 2005 1:44 pm

Sorry, GBA has no easy way to play SWF.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#42988 - Miked0801 - Tue May 17, 2005 8:39 pm

Convert your flash to a series of .bmp files and include all of them. Play them in order and deal with double buffering them. good luck.

#42989 - tepples - Tue May 17, 2005 8:59 pm

Converting to .bmp files would just run up your ROM size, possibly beyond what one GBA Game Pak can store without bankswitching and definitely beyond what you'll be able to afford to have replicated should you manage to get your game accepted by a publisher.

I'd consider using some SWF tool for prototyping the animation and then recoding the animation using GBA sprite hardware.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#43141 - Touchstone - Thu May 19, 2005 1:10 pm

Or use this sweet little thing, which does exactly what you want. http://www.pokewhat.com/touchstone/ (That's right, I don't mind tooting my own horn. :) )

Oh, I read the first post wrong. My animation system is for Director, not Flash. Anyhow, check it out.
_________________
You can't beat our meat

#43337 - Issac - Sun May 22, 2005 10:16 am

ooh really?
the intro is quite short, just 5.6 seconds, and there are 24 pics each second.
How does your program work, touchstone?
maybe I could convert the swf to a director file, or something, (since macromedia made both).

Nice seeing another swedish dude around
_________________
yeah, well, maybe... or? anyways.... eh... what was i talking about??

#43344 - tepples - Sun May 22, 2005 2:46 pm

5.6 seconds times 24 frames per second equals 134 frames, and 134 frames times 240x160 pixels times 8 bits per byte equals 41 Mbits.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#43346 - strager - Sun May 22, 2005 3:05 pm

tepples wrote:
5.6 seconds times 24 frames per second equals 134 frames, and 134 frames times 240x160 pixels times 8 bits per byte equals 41 Mbits.


Uncompressed.

#43348 - tepples - Sun May 22, 2005 4:18 pm

strager: What kind of compression?

More precisely, do you claim that there exists a publicly available, freely usable full-motion video compression system with acceptable rate/distortion performance and real-time decoding on a 16.78 MHz ARM7 CPU? It's not like a homebrew developer could just call up Majesco, ask to use their GBA Video codec, and expect to get any useful answer.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#43354 - Issac - Sun May 22, 2005 6:19 pm

tepples wrote:
5.6 seconds times 24 frames per second equals 134 frames, and 134 frames times 240x160 pixels times 8 bits per byte equals 41 Mbits.


Oh is that so? dang...
So there is no good way?
But how are the Pirated Intros made? is that sprites and a background, and not a movie? :S
_________________
yeah, well, maybe... or? anyways.... eh... what was i talking about??

#43358 - strager - Sun May 22, 2005 7:33 pm

Issac wrote:
But how are the Pirated Intros made? is that sprites and a background, and not a movie? :S


Yup. Usually written in ASM for size, or optimized heavily in C.

#43361 - Issac - Sun May 22, 2005 7:43 pm

hmm, I guess I will just have a pic then, fade in from black, and fade out to black after a few seconds, or if you press a button.... better for the space....
_________________
yeah, well, maybe... or? anyways.... eh... what was i talking about??

#43363 - strager - Sun May 22, 2005 7:50 pm

You might make a cool effect, like have every even line go left, and every odd line go right. Use an HBlank interrupt to do this.
Or some other neat thing, to show off your mad coding skills. ;-)

#43366 - Issac - Sun May 22, 2005 8:07 pm

hmm, and how would that be done?
Im not that good you know ;) hehe
_________________
yeah, well, maybe... or? anyways.... eh... what was i talking about??

#43370 - strager - Sun May 22, 2005 8:19 pm

Hehehe.

In your interrupt code:
Code:
/* Let SCANLINE be the register at 0x006 */
/* Let BGX be the background's X register (make adjustments if it is in RS mode) */
static int s = 0;

if(SCANLINE & 1) /* odd */
    BGX = s;
else
    BGX = -s;

if(SCANLINE == 160) /* move to the left/right */
    s++;


That's a bit of psuto (can't spell it; soo-toe) code, but it should be clear. And I infer that you know hoe to set up the HBlank interrupt, no?

#43371 - Issac - Sun May 22, 2005 8:29 pm

since i do most programming in school, and not at home, i cant test it out right now.. but I'm sure i'll work it out Thank you!
and its called Pseudo ;)
_________________
yeah, well, maybe... or? anyways.... eh... what was i talking about??

#43373 - strager - Sun May 22, 2005 8:59 pm

Issac wrote:
Thank you!
and its called Pseudo ;)

Thank you, and you welcome. ;-)

If that effect is too slow, just replace s++ with s += 2 or something.
I can post other effects if you'd like. Maybe I should compile them into a rom to show you how it works...

#43377 - Issac - Sun May 22, 2005 9:34 pm

yeah that would be awesome!
along with a text document explaining what is done, and how it works..
i bet you know what i mean

Thumbs up for you!
_________________
yeah, well, maybe... or? anyways.... eh... what was i talking about??

#43379 - Lord Graga - Sun May 22, 2005 10:00 pm

When making video, I suggest being using as many tricks as possible to get the size down. Use 120x80, and cut it down to 20 fps, compress it with the heavist stuff you can get your hands on. That'll give you 3 full frames to decompress in mode 4, which should be enough for some really heavy decompresssionmodules :)

If you are lucky you'll end up at <300 kbyte for 6 seconds without writting an actual codec :P

#43387 - strager - Sun May 22, 2005 10:36 pm

http://tron2.8k.com/fx.gba

Uploaded the fading routine I showed you to my ancient, free, ad-infested server.

If you want the source, just ask.

#43422 - Issac - Mon May 23, 2005 10:47 am

umm, it doesn't work :S I mean, the link..

And I'd love the source too thanks.
_________________
yeah, well, maybe... or? anyways.... eh... what was i talking about??