Generalized Teleport Animation

Contribute art for mainline Wesnoth.

Moderator: Forum Moderators

Forum rules
Before posting critique in this forum, you must read the following thread:
Post Reply
Loci
Posts: 40
Joined: October 28th, 2008, 10:49 pm

Generalized Teleport Animation

Post by Loci »

While working on "The Eastern Invasion" campaign, I generalized the silver mage teleport animation to work for most standard-size units. I wouldn't really classify my work as "art", but I didn't see a more appropriate forum.
Example teleport animation (please excuse the "jerkiness"; it's difficult to get the Wesnoth engine to take consistently-timed screenshots.)
Example teleport animation (please excuse the "jerkiness"; it's difficult to get the Wesnoth engine to take consistently-timed screenshots.)
Gen_teleport.gif (22.19 KiB) Viewed 6076 times
While unit-specific teleport animations can easily beat a generic animation, I still consider this a step up from the "fade-out / fade-in" effect (which is used for a number of different transitions and doesn't really convey the sense of "teleportation").

Anyway, I have attached the necessary images and code below if this modification is deemed worthy of inclusion.
Attachments
Example.cfg
Example scenario invocation
(660 Bytes) Downloaded 416 times
teleport.cfg
Teleport animation definitions (suggested path: combine with data/core/macros/teleport-utils.cfg )
(6.56 KiB) Downloaded 412 times
teleport-masks.zip
Teleport animation mask files (suggested path: data/core/images/masks/ )
(6.68 KiB) Downloaded 415 times
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Generalized Teleport Animation

Post by Dugi »

Excellent job man, now everybody can have teleport animations without having to draw them, that is particularly useful if you want to place somewhere an object that adds the teleport ability and can be used by any unit.
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: Generalized Teleport Animation

Post by Boucman »

sounds good, but I'd need an OK from one of our artistic guys before I commit this...
Fight key loggers: write some perl using vim
User avatar
Jetrel
Posts: 7242
Joined: February 23rd, 2004, 3:36 am
Location: Midwest US

Re: Generalized Teleport Animation

Post by Jetrel »

OK.

:lol2:
Play Frogatto & Friends - a finished, open-source adventure game!
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: Generalized Teleport Animation

Post by Boucman »

noted, I'll look at it asap
Fight key loggers: write some perl using vim
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: Generalized Teleport Animation

Post by Boucman »

and commited.

congratulation, great use or our graphic engine


could you please document these macros at the relevent place in the wiki (and post here once you're done)

note that this patch doesn't change the default teleport animation provided as a fallback by C++ it only provide the macros to override them individually for each unit. I am not sure if we want to do that or not. I don't think adding it to the c++ side would be simple... i'd rather have it added to individual units...
Fight key loggers: write some perl using vim
Loci
Posts: 40
Joined: October 28th, 2008, 10:49 pm

Re: Generalized Teleport Animation

Post by Loci »

Boucman wrote: could you please document these macros at the relevent place in the wiki (and post here once you're done)
The appropriate reference page (http://www.wesnoth.org/macro-reference.xhtml) is auto-generated from the contents of the macro files. I modified my macros to include documentation strings that should cause the reference page to display the correct information once it is regenerated.
teleport.cfg
Updated macros with documentation strings
(7.59 KiB) Downloaded 409 times
Boucman wrote: note that this patch doesn't change the default teleport animation provided as a fallback by C++ it only provide the macros to override them individually for each unit. I am not sure if we want to do that or not. I don't think adding it to the c++ side would be simple... i'd rather have it added to individual units...
I don't think it is necessary to supply a "default" teleport animation for units that can't teleport normally. These macros support custom unit creation, custom object creation, and temporary animation assignment for custom scenario use--basically all the situations where some random unit needs a teleport animation. If it were possible to define a global default teleport animation it might be worth the effort, but applying this animation individually to each unit seems like a lot of time spent for very little gain.
User avatar
homunculus
Posts: 537
Joined: July 21st, 2010, 9:47 pm

Re: Generalized Teleport Animation

Post by homunculus »

does the unit fade out during the animation?
i don't remember silver mage fading during animation, am i wrong?
campaign ruthless in your nearest 1.11 add-on server
some wesnoth-related drawings
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: Generalized Teleport Animation

Post by Boucman »

silver mages have their own teleport animation, they don't use the default fade-in fade-out

and the update to the documentation has been added, thx a lot for your work
Fight key loggers: write some perl using vim
User avatar
homunculus
Posts: 537
Joined: July 21st, 2010, 9:47 pm

Re: Generalized Teleport Animation

Post by homunculus »

Boucman wrote:silver mages have their own teleport animation, they don't use the default fade-in fade-out[...]
i meant the animation gif in the first post, the human seems to fade out in addition to disappearing from lower right.
could be an artifact of indexing while creating the gif, but the effect is somewhat prominent.
is there a general fade-out in addition to the silver-mage-like teleport in this macro?
campaign ruthless in your nearest 1.11 add-on server
some wesnoth-related drawings
Loci
Posts: 40
Joined: October 28th, 2008, 10:49 pm

Re: Generalized Teleport Animation

Post by Loci »

homunculus wrote:i meant the animation gif in the first post, the human seems to fade out in addition to disappearing from lower right.
could be an artifact of indexing while creating the gif, but the effect is somewhat prominent.
is there a general fade-out in addition to the silver-mage-like teleport in this macro?
I noticed the effect you mentioned, and my best guess is that it is the result of my frantic clicking and button-mashing to capture enough screenshots to build the gif. I suspect that I got in an extra "click" and the gui applied a "darken" mask to the unit (such as is used when showing possible unit movements, etc.). When I saw it, I went back and ran through several teleports in game just to convince myself that the darkening was not caused by the animation. (It would be really nice if the game engine had a "take a series of equally-timed screenshots" option to facilitate creating animated gifs.) That said, there should be a little "fade" around the edge of the mask (to avoid a very sharp boundary), but that should mostly be hidden by the sparkles.
Post Reply