Animated title screen research and (probably soon) tutorial

CRxTRDude

Member
The tutorial is now placed on the WIKI! Check it out here.


OP:

Hey guys, I got something that I thought of a while back. It's about updated.c. I actually read about this a while back when I was still searching for the way on how did Volcanic worked the title screen to be animated in Rocket Viper 2. I found a clue when rafhot asked about making sound played in the title screen which pointed to updated.c and sure enough, there was the code related to the background warp tunnel sequence, the difficulty text and the logo animation. I then observed that it was also in Illusionista's Avengers mod, with the unlocked text at the bottom.

I'm going to attempt to make a tutorial via hit and miss, using my Shadaloo Dolls mod as the guinea pig and other things. What do you guys know about updated.c and how it worked?

I observed that there were steps that Volcanic took to achieve the animated background effect:

  • loading the backgrounds into an array
  • after the game starts, the main void is diverted to another void,
    Code:
    mainLoop
  • then checks the openborvariant:
    Code:
    in_titlescreen
    . If the game's state is such, the game proceeds to a certain void,
    Code:
    inTitleLoop
    with a variable stating whether to display the title logo.
  • you then do your animation in
    Code:
    inTitleLoop
    , which is just cycling the array of gifs.

There are things that boggles me, for one thing, the title is just gif, why not play an animated gif instead similar to scene. Is there a way to play animated gifs in script and so is it efficient to the point that it replaces Volcanic's method of complicated stuff?
 
Volcanic's method is VERY complicated. It shares the same logic with White Dragon's one.
Basically, it plays a sequence of gif frames loaded from an array. Its pretty nice, but its too much for me yet.

I then observed that it was also in Illusionista's Avengers mod, with the unlocked text at the bottom.
For the next version, I've changed that a bit so we have a load bar with gradient, a line simulating the cursor and different phrases based in how much of the game were loaded. It appears on this video, very quickly:
Custom Intros - Avengers United battle force

Is there a way to play animated gifs in script and so is it efficient to the point that it replaces Volcanic's method of complicated stuff?

I asked to DC if its possible to spawn entities in title/select screen without those methods above, he said its possible, but it requires extra settings that he had forgot :(
 
O Ilusionista said:
I asked to DC if its possible to spawn entities in title/select screen without those methods above, he said its possible, but it requires extra settings that he had forgot :(

Oh, okay then. I got that.

FINALLY, I did the thing and it works fine! The problem was my stupidity in forgetting that we're dealing with C. There should always be a semicolon ending for actions. Now the thing works fine!
 
@Illusionista and the entire community, here's the code.

The tutorial also covers how to make the pictures and what does the code do (as much as i can to explain it). That's it, I'm already spent. It's night time and I feel satisfied. ;)
 
CRxTRDude said:
There are things that boggles me, for one thing, the title is just gif, why not play an animated gif instead similar to scene. Is there a way to play animated gifs in script and so is it efficient to the point that it replaces Volcanic's method of complicated stuff?

I think it's because update.c runs in every engine cycle so if you play animated gif, it's almost like playing 1 video every milisecond (rough estimation)
BTW I did try to play animated gif with update.c and it crashed  :-[
Though maybe there's a way to play an animated gif once every defined time period before it's replayed
 
I noticed that in updated too when I try to clean up the gifs on screens other than the title and menu screens, but alas doesn't work. I don't know if it's possible to circumvent this by a update once only script here [honestly I don't know if there is a term for that], where it would call the function just once and will not update again.
 
Back
Top Bottom