Screen transitions[solved]

Started by Icey, Thu 09/06/2011 01:43:34

Previous topic - Next topic

Icey

How do you make custom screen transitions?

Khris

#1
"Trastion"?

And what kind of question is this?
What else would you do except code them?
Just set the transition to instant, then implement your own.

Btw, you weren't just told to stop stealing stuff, you were told to skip the icing and focus on the cake. Which you again aren't doing.

Calin Leafshade


FamousAdventurer77

Yes, icing is the best part of the cake really!
If you want to know the Bible's contents, just watch Lord of the Rings or listen to the last 8 Blind Guardian albums. It's pretty much the same thing.

Icey

Opps, fixed that.

But's that what I mean how would I code it?

Khris

We need a specific technical question here, as friggin' always. ::)

How do you code WHAT?
There are probably around twohundredseventyfour different screen transitions, so which one is it going to be?

Jesus H. Christ, it's not like you never coded anything, you KNOW that this question is much too broad.
I'm so angry right now, seriously.
I was going to tell you how to do the preparations you're almost certainly going to need for every type of transition, but F that. I'm done helping you.

Icey

uhh, Dude all I needed to know was if I needed some program like the one you guys use to make plug-ins. Sure I can make a screen transition with a little coding and if that's the way I gotta do it then I mean what else am I to do. :-\

Calin Leafshade

you dont need a plugin

just draw the transition to a full screen gui.

The maths required can be moderately complex though.

Icey

Ohh, sounds a bit more simpler then the way I was thinking.

Khris

Quote from: Studio E3 on Thu 09/06/2011 03:30:33uhh, Dude all I needed to know was if I needed some program like the one you guys use to make plug-ins.

Right, I've re-read your original post and that's exactly what you were asking, my bad.
No wait, that's not what you were asking at all.

And why would you ask if you "needed some program [...] to make plugins" when you're "Sure" that you just as well "can make a screen transition with a little coding"?
WHY EVEN ASK IF YOU KNOW HOW TO DO IT?

If you must lie, at least put some effort into it.

Icey

Don't you need Microsoft something to make plug-in's? The reason I asked is because I been seen the list with different transitions however I wan't to make a transition I could save it somehow and load it into another AGS game.

However even if the above is true and I could use a program to make a transition it wouldn't matter now. I rather just code one in AGS.

Crimson Wizard

#11
EDIT: erm, did not notice this thread is marked as "solved" already. Well, I'll leave my post here just in case someone will find it useful.
---------------------------------------------------------


Quote from: Studio E3 on Thu 09/06/2011 05:22:06
I wan't to make a transition I could save it somehow and load it into another AGS game.
You can code transition in a separate module (in AGS script) and copy that module to all the games you are making later.

BTW I made a custom transition once, it looks like colored stripes fill the screen one by one, then dissapear in same order. I can post my code as an example when I get home later today.

A while passed since I coded that so I may be mistaken in details, but in general you should:
1) Set "Instant" as your default room transition type.
2) Make a separate module (script header/source pair) for scripting convenience.
3) Define and write at least two functions there, one for "fade in", another for "fade out". I also think it should be assumed that these functions are run multiple times - every game loop until transition is finished, because otherwise AGS won't be able to update image on screen (well, someone will correct me if I am wrong). This also means you should save transition state and all related data between function calls (preferably in the same module).
4) There should be some kind of variable that determines current transition state (Not going / making fade-out / fade-out ended / making fade-in / fade-in ended, or something like that). As I said earlier, this variable should preferably be placed in that separate module, but should be also exported for use in other modules.
Also there possibly should be variables to save target room and coordinates where character should appear after transition. One of the solutions would be to call player.ChangeRoom() from the function that implements "fade-out".
5) In each room you need this transition to fade-out or fade-in set that variable so your transition module will know what to do.
Set transition state to "making fade-out" at the place in script where character should leave the room, and set target room and coordinates to whatever you need.
In "After fade in" room event set transtion state to "making fade-in".
6) In Global script's repeatedly_execute function place a check whether transtion state is "making fade-in" or "making fade out" and if it is, then call corresponding transition function from your module you wrote earlier.

Well, I know this explanation may be a bit clumsy, but as I said I am going to post my example here later. Or maybe someone else will do.


Quote from: Calin Leafshade on Thu 09/06/2011 03:37:52
just draw the transition to a full screen gui.
I've drawn mine using dynamic sprites iirc btw :)

Gilbert

While nobody actually cared, what I wrote here served as a form of screen transition, which was actually part of the silly tests that I conducted some time earlier.

Icey


SMF spam blocked by CleanTalk