Nifflas' Support Forum

Level Editing Support => Knytt Stories Level Editing Support => Topic started by: LPChip on October 31, 2009, 12:08:48

Title: It is possible to create animations of juni moving without giving control to her
Post by: LPChip on October 31, 2009, 12:08:48
I was wondering about new stuff that you can do with Knytt Stories, and I came up with something interesting.

You can create predefined animations in knytt stories. For instance, you can make an elevator that juni can ride, or a moving platform, or other things you can imagine. You can also use this technique to create a nice animated cut-scene that the player has to watch and can't skip.

There is a limitation though, during the animation, the player will not be able to move, so you cannot make a platform that moves, and make the player able to jump off the platform at a given moment, unless you program that in your animation as well.

requirements
* You must know how to make custom objects of any size.
* Your level must have shifts.

Principle
The idea is to use a custom object to play an animation of whatever you want to happen. Juni has to be drawn into the animation aswell, so if you are in the room, you'll see 2 juni's.
Next, we'll be taking advantage of wallswimming. If you wallswim and you don't move, you will slowly move up. See here, a timer! :) Now of course, the player can move making the timer unreliable. In order to fix this, we can place a sticky object at the place where Juni will be teleported to inside the wall. Due to the sticky object, the player will start to rise slowly. Place a shift there, and you have a guaranteed delay for a shift. Now, of course you'll see juni twice at the screen. In order to combat that, we can place a custom object over juni to mask it with the background. Result, juni will be seen in the animation and after the second shift is triggered, juni gets to move again.

Making the level and incorporate the idea
At a certain place, you want to place a shift. This shift will warp juni to an identical screen. (so you have to make a copy of the screen where you want to have the animation)

Ensure that there's a solid tile on layer 3 at the place where Juni will spawn, and at the one above that tile too. Then put 2 Sticky objects in these tiles, and also include a shift in the top one.

It will look like this:

[1] <- contains shift and sticky and tile on layer 3.
[3] <- optional, contains sticky and tile on layer 3.
[2] <- contains sticky and tile on layer 3. Juni also will be teleported there.

If necessary you can put tile 3 in there too, but is not required. If you do so, the time of the animation will be significantly longer. And ofcource 3 can be done many times too.

Thirdly, the shape of the shift also has influence of the timing. Experiment with that shape to get the right timing.

Put one or several custom objects over the 2 or 3 tiles and ensure its set on layer 6 or 7 (in front of juni).

Set the shift to go to the earlier screen, but different location, or if you want, an identical copy as the first one, but with different things (like removing the old shift)

Lastly, Measure how long it takes to run the animation, and create a custom object with an animation that runs exactly as long as your timer gives you. Longer is not bad, but the last frames will not be seen.

Known issues
before and after the animation, you will see 2 small pauses because there are shifts involved, and thus a new screen has to load. This can look bad when played from an external device, like a usb stick. This means, that you should be carefull and not overdo the animations because the player will notice them. Besides, the player can't move during the animations, so its never a good idea to restrict the player that often.

I'm curious about one thing though: what do you guys think of this idea? :)

download example:
With special thanks to EgoMassive for creating an example level.
download AutomationTechnique.knytt.bin (http://knyttlevels.com/levels/egomassive-AutomationTechnique.knytt.bin)
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Razzorman on October 31, 2009, 12:19:42
Well, to be honest I had already thought of it. I was going to implement it into a level, but I lost interest.
Its a great idea though. I'd definitely want to play a level that uses this cleverly. :)
On a side note, you can also use this to create short animated cut scenes without Juni in, to show what is happening in other parts of the world, or even full screen animated painting-like thingamajigs.
Title: Re: It is possible to create animations of juni moving without giving control to
Post by: Evil on October 31, 2009, 15:41:56
to show what is happening in other parts of the world, or even full screen animated painting-like thingamajigs.

wasnt there a level that did that?

the unicorn flying down the earth :)
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Dataflashsabot on October 31, 2009, 15:51:47
This (http://nifflas.ni2.se/forum/index.php?topic=1695)? :)
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: AA on October 31, 2009, 16:25:33
Well, to be honest I had already thought of it. I was going to implement it into a level, but I lost interest.

Me too!  :^^:

My plan for Temp IV was to make the player press left, right, down or jump in order to trigger a movement animation (run left, right, climb down or up) done with custom objects; it would have looked a bit like a graphical adventure game. Despite the level being as short as the others, it was still a pain to do, so I'm giving up for now.

Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Pick Yer Poison on October 31, 2009, 19:05:35
I've actually used this in my level Darkness (http://nifflas.ni2.se/forum/index.php?topic=1377.0), although I mostly used it as a timer. I had a false image of Juni showing up where she should have been so she didn't vanish, while the real Juni was hidden behind black COs on layer 8. If I recall correctly, I had no default-style cutscenes in that one, which is a format I plan to follow in any levels I make from now on. :3

Don't forget that if you want to make the timing even more precise, you can always have Juni falling instead of wallswimming. Or both, if you make use of shifts.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Salmoneous on October 31, 2009, 19:57:08
I'm curious about one thing though: what do you guys think of this idea? :)

Awesome! You must make a level including this now!
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Pumpkinbot on November 01, 2009, 07:47:35
The (abandoned) level Sputnik kinda used an idea similar to this when the spaceship malfunctioned.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: googoogjoob on November 01, 2009, 15:31:01
The (abandoned) level Sputnik kinda used an idea similar to this when the spaceship malfunctioned.

...Sputzna.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Purple Pineapple on November 01, 2009, 18:33:01
This (http://nifflas.ni2.se/forum/index.php?topic=1695)? :)
Exactly what I was thinking.

You can also use this technique to create a nice animated cut-scene that the player has to watch and can't skip.
Alternately, you could place shift (non-touch) along the path of the wallswim that the user can press down on to skip.

The (abandoned) level Sputnik kinda used an idea similar to this when the spaceship malfunctioned.

...Sputzna.
Sacrilege.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: inky84 on November 07, 2009, 11:59:48
I was going to use a similar aspect in an arcade style fighting game I abandoned, where there would be a "Juni" walking around via custom animations, with the real juni hidden in a corner. This could allow manual gravity, and of course, manual AI To defeat.. The closest prototype was an unfinished "cheese cutting" game. Seriously. These things sound like good ideas until you try them. It really does get tedious.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Looki on November 07, 2009, 17:15:50
I actually planned objects for my KS mod that would make you gain/lose control and make Juni automatically move in a direction or jump when colliding, but since there's KSA by BloxMaster I never felt like working on another mod. Maybe he could add it?
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: JC Grim the 'crete reaper on November 08, 2009, 18:26:59
I personally like the idea, and had already planned on using it before. You gave a nice description though, and it does the idea justice.
 
My cutscenes for BSoaKFF are in a similar fashion, but they're so unique in comparison that they'll still be fresh, and awe-spiring.

I actually planned objects for my KS mod that would make you gain/lose control and make Juni automatically move in a direction or jump when colliding, but since there's KSA by BloxMaster I never felt like working on another mod. Maybe he could add it?

I think he should, why don't you bring it up with Bloxmaster and see what his opinion is?
Title: Re: It is possible to create animations of juni moving without giving control to
Post by: Pick Yer Poison on November 08, 2009, 20:02:57
BloxMaster has already stated that he's stopped working on KSA. (http://nifflas.ni2.se/forum/index.php?topic=761.msg19173#msg19173) The current version doesn't support anything like this, and there's probably not going to be another version. :/
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: BloxMaster on November 13, 2009, 17:14:04
I have a lot features still planned for KSA, and I don't see why something like this couldn't be done. However PickYerPoison is correct, I have stopped KSA for now. I may try again to work on KSA if there is enough support for it. Having said that, I feel really bad that KSA has stopped others from making their own mods. Looki is far more talented than I in the coding department. I guess what I am trying to say, is there is a possibility of me working on KSA, but in the meantime I don't want people to not work on their own mods because of KSA. Anyway, that was a bit of a rant, and a bit offtopic, but I guess it needed to be said somewhere.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Purple Pineapple on November 14, 2009, 01:25:17
I feel really bad that KSA has stopped others from making their own mods.
Has not! I just can't re-open my source code because of that stupid sliderbar.mfx.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Looki on November 14, 2009, 03:17:49
What's the problem, Purple Pineapple...?

BloxMaster, I don't think I'm better than you. Plus, I just thought that too many mods at the same time would be..meh ;)
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Purple Pineapple on November 14, 2009, 04:21:41
What's the problem, Purple Pineapple...?
Sorry. I'm just rather upset at the moment.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Salmoneous on November 14, 2009, 15:21:10
I feel really bad that KSA has stopped others from making their own mods.

Feeling of accomplishment.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Pick Yer Poison on November 14, 2009, 21:36:31
I feel really bad that KSA has stopped others from making their own mods.

Feeling of accomplishment.
...what? That doesn't even make any sense...
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: LPChip on November 15, 2009, 00:18:23
Feeling of accomplishment.
...what? That doesn't even make any sense...

It does actually. If you do something that good, others are overshadowed by it. This is a feeling of accomplishment.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Emeraldfire7 on November 15, 2009, 16:22:28
I dont see why someone doesn't just add to KSA.... with was it bloxmaster's? permission
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Exp HP on November 15, 2009, 18:37:45
I think that's because it would complicate things to have two people independently working on the same mod at the same time.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: BloxMaster on November 19, 2009, 20:51:06
Unfortunately it isn't as simple as handing over the source, and I'll tell you why: The source is nasty, that is, what I added is not commented, on top of that is the fact that while my code works, I really doubt it's up to nifflas' code, which means it's very ugly to look at. Things aren't commented, sorted, or even have proper naming, which means even I barely know what I wrote. This is the main reason I stopped working on it. Now I know someone is going to be saying 'well I don't care if it isn't perfect'. Well sadly the only way to release a new version of KSA is to remake it from the KS source, because MMF2 decided at some point to corrupt some objects, so they are replaced by working objects, but that clearly still messes up everything. That's why I tried remaking KSA a while back from the original source, but I haven't finished and I officially am not working on it anymore. I no longer have the motivation to work on KSA anymore, and the sources I have are simply too messed up in some form to simply give out. So while I really appreciate the comments about adding it to KSA, it won't happen. You should, however, note that just because KSA is dead, doesn't mean I have stopped making things. I have several projects in the works now, and they are going well. I guess what I mean, is I am simply too embarrassed to just give it out and also too frustrated with KSA to do it myself. Remember, though, just because it won't be added to KSA doesn't mean that no one would add it to KS. I myself would love this type of feature, and it isn't out of the question for me to add it to KS. ;)
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: DustinCartwright on December 07, 2009, 21:06:22
The animation would be saved as a .png and named "Object1" in the Bank 255 folder? Or am I doing it incorrectly
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: AA on December 07, 2009, 22:41:22
The animation would be saved as a .png and named "Object1" in the Bank 255 folder? Or am I doing it incorrectly

No, since it's a Custom Object you need to put the .png file in a "Custom Objects" subfolder of your level (any name is fine). If you've never used COs before, please read the CO manual (http://nifflas.ni2.se/forum/index.php?topic=31.0) first.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: DustinCartwright on December 08, 2009, 16:07:07
I'm very new to this program and forum, thank you for the patience  :crazy:
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: egomassive on January 07, 2010, 16:54:33
Getting back to the original subject.

I tested LPChip's method for hiding Juni and using her wall-swimming as a timer. The player can still throw the timer off by jumping or climbing. The obvious solution is to add no-jump and no-climb objects, but now we've run out of layers. I suggest taking the player's climb power-up away when shifting into the timer. Then give it back when shifting out of the timer. One further consideration must be taken though. Does the player already have the climb power-up? If not the timer could inadvertently give it away. The solution, flag test for the climb power up and have duplicate screens. One toggles the climb power-up. One does not.

Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: Purple Pineapple on January 08, 2010, 02:15:15
Way to make everything way more complicated than it needs to be. :P Why would you even need two objects on the same square?
Title: Re: It is possible to create animations of juni moving without giving control
Post by: LPChip on January 08, 2010, 10:05:35
If you run out of places for your objects to control the player, you can always make a CO that is large enough to hide Juni but doesn't has to be in that tile. Example:
Code: [Select]
[ ][ ][1]
[ ][c][3][x]
[ ][ ][2]
Juni is spawn in 2, the co is in c and is 72x72 pixels positioned on layer 7. Ofcource, you can also put it on location x. Depends on your layout etc. Additionally, you can make the left side of the animation entirely transparent so it only goes over the place where Juni is moving.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: egomassive on January 09, 2010, 02:45:25
I went ahead and made a demo of the idea. I tried to keep it as simple as possible for those who want to see and learn.
egomassive - AutomationTechnique (http://knyttlevels.com/levels/egomassive-AutomationTechnique.knytt.bin)
Yes. I have too much free time.
Title: Re: It is possible to create animations of juni moving without giving control to her
Post by: LPChip on January 09, 2010, 14:02:36
Very nice! :)

I've added the example level to the first post.