TeineWolf wrote:When I get some time, I will try to figure out an example of what I am about to describe. Figured out the basics, but lack the skills to make the graphics to test it. Seen it in flash games, so when I find it. I'll recreate it HTML/Java.
When there's a scene where the hero, get's to kiss the prize. Usually you see a nice close up of the prizes cheeks, or lips, or neck, etc. In those cases, With a little manual tweaking. Could that image be placed in something conceptually like a <TABLE></TABLE>. Giving the table one cell, <TR><TD></TD></TR> an transparent animated gif. That runs once, as is just the see-through shadow of the hero, moving in to get his kiss. I've seen examples using HTML-CSS/Java, that look right. But without the animation aspect, being the overlaying image.
Basically overlaying one image over the other. Now I put it on paper, or screen. Could the graphic being used, be the animation it's self? Once you got the beauty shot rendered, animate it the overlay at than time. Then port the animation from the 3D software, to an animated gif. Doesn't have to be broadcast quality on the FPS, just enough to add a new neat effect.
Not sure I fully understand your question. So apologies if what I say isn't related...
I know the 'kiss' scenes you mean, and obviously the thread title with 'HTML', so, we're playing a browser-based non-flash game. The player is reading his current page. The player clicks on something... now, are you trying to make a kiss animation play while remaining on the current page, or claiming you go to your new page, have a kiss, and then stay on that page with a non-kiss graphic, or something completely different? I'm assuming you're trying to do the 2nd.
The first problem I'll mention is single-pass animation and the web have inherent problems to begin with. Yes, they should work perfectly fine. The truth of the matter, however, is that lag and loading and other such things can actually cause the full animation to be played as it's being initially rendered (which means the player never sees it at all as only the last frame ever is fully shown). Only suggestions I have here are: hope the file is small enough and computers fast enough that this problem doesn't manifest, or put in a long delay on the first frame of the animation to increase the odds that everything is ready when it runs.
The second issue, it sounds like you want the kiss image to run its course and then
vanish, so that another image in the exact same spot is seen through the first. While I'd say the positioning is doable, it will add some complexity to your page layout and you are likely to get different results from each different browser as to whether or not the vanish part works at all (not to mention if either image is supposed to be clickable, you could run into issues). What I'd consider the easiest fix to the whole thing, generate an animated gif for every scene the kiss is possible. Take whatever picture you wanted to have show through be your last frame. You only have 1 image on your page and you don't need to do anything special in the HTML. Depending on how many times you want to use the exact same kiss animation, it's a little more image work and increases your game's file size a little, but means the code base stays simple.