egomassive's Knytt Stories Plus mod

  • 1097 Replies
  • 404209 Views
*

Offline Purple Ink

  • 392
  • 39
    • View Profile
    • My lore forum
Re: egomassive's Knytt Stories Plus mod
« Reply #450 on: February 18, 2013, 13:57:40 »
Just tested a little bit. Made a screen completely covered with a waterfall object, a screen completely covered with the air current object, and a screen covered with both. The waterfall only screen had no lag. The screen with the air currents may have had a very very small amount of lag when loading. It was difficult to tell even after checking multiple times. The screen covered in both suffered some lag. It was enough that I could blink normally in the time it took to load. Not sure if this will help with anything but I figured I would share.

Edit: I also played DETM to the screen covered in fliers but there was no lag for that screen either.
« Last Edit: February 18, 2013, 14:03:29 by Purple Ink »

*

Offline egomassive

  • 1850
  • 250
    • View Profile
    • egomassive games
Re: egomassive's Knytt Stories Plus mod
« Reply #451 on: February 18, 2013, 18:00:09 »
GrayFace discovered that destroying lots of objects causes slowdown at screen change. If there was a giant waterfall on adjacent screens, the transition between them would be the worst case. I was having difficulties delaying object destruction, so I dropped the idea. This is probably where I should start speeding things up.

I could make a hybrid of the two rendering styles where if you exceed a set number of objects during the first pass it will wait until the second pass to finish rendering. The problem with this concept is the objects that flash most noticeably are often placed on layer 7 which is the last layer rendered. e.g. water blocks.

*

Offline sergiocornaga

  • 1285
  • 131
    • View Profile
    • Sergio's Games
Re: egomassive's Knytt Stories Plus mod
« Reply #452 on: February 19, 2013, 02:18:35 »
Oh, another thing I noticed that could possibly be fixed is that when you install a new level and then directly go to play it from that screen, it still loads all installed levels before pulling up the new level's info screen (for me this is a pretty big delay, haha). The search bar also appears during the load.

*

Offline egomassive

  • 1850
  • 250
    • View Profile
    • egomassive games
Re: egomassive's Knytt Stories Plus mod
« Reply #453 on: February 20, 2013, 05:33:37 »
The info screen menu is part of the level selection menu. I'd have to write a separate initialization function, and then still be able to run the normal initialization function if you users click the "back" button. ... Or, I could change the "back" button so it returns you to the install screen. ... I may do this. No promises.

Edit: So, I've built a version where old objects are destroyed slowly after screen changes. It still isn't as fast as double-pass rendering (and it never will be,) but I think there might be a slight improvement over the current official version. It's hard to tell really. You can test it out yourself if you want. Don't expect this version to be as bug free as the official.


Edit: Also, I've been reminded about the object flash that still occurs with CO's. Thus far I've considered that unfixable because the inner-workings of COs are hidden from me. I'll make an attempt to fix it just to be sure.
« Last Edit: February 21, 2013, 14:01:41 by egomassive »

*

Offline plural

  • 186
  • 102
  • twice shy
    • View Profile
Re: egomassive's Knytt Stories Plus mod
« Reply #454 on: February 21, 2013, 23:10:53 »
Oh, I for some reason had too much hope in my eyes and misread what you had been doing. I have now gotten my hopes down and back to where they were before, you don't really need to worry about what I misread.

But I guess to contribute, possibly: the single pass render fixes most of the tick problems because for most foreground COs I also use a copy of whatever it is in the tileset or gradient. I don't remember the single-pass render being available when I started the level but it stops the 6/7 CO tick on like 50% of cases when moving from screen to screen or at the very least makes it much, much less noticeable. Specifically, it seems to be at its worst when it's a shift on touch to a new screen. In fact if you execute the shift it almost never happens at all. I don't know if this is related or not but in the vanilla KS if there are many COs on screen say I made a handrail one block big and put like ten of them on screen the vanilla will load them only after showing a little red dot in their place for the first time (taking place of their complete absence if they weren't already drawn on the layers or gradient below 6/7?) Anyway, that doesn't ever happen on KS+ which is nice.

It's really nice of you just to look into it though but I don't expect anything. I'm sorry if I put you out with my less-than-casual understanding of what's being said in this thread.

*

Offline egomassive

  • 1850
  • 250
    • View Profile
    • egomassive games
Re: egomassive's Knytt Stories Plus mod
« Reply #455 on: February 22, 2013, 01:54:38 »
It's really nice of you just to look into it though but I don't expect anything. I'm sorry if I put you out with my less-than-casual understanding of what's being said in this thread.
I've been working on this for so long that I don't notice some of the flaws anymore. Fresh perspectives are needed sometimes. There isn't any difference in the way layers 6/7 operate compared to 4/5. After making objects on 4/5, Juni is moved to the top of the object stack, then 6/7 are made. Since 6/7 are made last they probably update last, therefore the flaws are more noticeable.

If I ever make my own game/editor combo, I think I'll be doing some pre-rendering in the background. That wouldn't work for KS because of shifts and warps. I could pre-render the adjacent screens only to have the player teleported/warped/flag-warped somewhere else.

I'd like to restate that there's a test version using latent object deletion available in my last post. If parties interested in speedier screen changes could try it out, I'd appreciate your feedback.

*

Offline Headgrinder

  • 901
  • 35
  • Smart Steel Polisher
    • View Profile
    • www.matthewepperson.wordpress.com
Re: egomassive's Knytt Stories Plus mod
« Reply #456 on: February 22, 2013, 12:54:45 »
I've got a small request and a idea.

1st, I almost always play ks+ in zoom mode, which right now meas I have to reclick the zoom button every time I play.  Is there anyway the setting for that could be saved?

2nd, I was thinking of an object mainly used in the back ground (oh... that might not work now that I think of it... objects being in the foreground and all) that uses something like an animation png, but which displays the frames not according to a time frame but according to where on the screen Juni is.  There could be a horizontal and a vertical object for this, and I suppose even one that does both.  This way, you could make at the least statues that look at Juni, or even characters which change their position as Juni approaches, but you could conceivably even make backgrounds that scroll just a bit to give greater depth. 

I thought of it when I was trying to find the most realistic way to have Juni run through a dark corridor into small lighted areas.  If there was a shadow in the foreground to darken everything except the light, then a slightly background object that was lighter and it moved with the character, that would make a really cool effect.  Anyhow...  Just an idea.  *shrug*

*

Offline plural

  • 186
  • 102
  • twice shy
    • View Profile
Re: egomassive's Knytt Stories Plus mod
« Reply #457 on: February 22, 2013, 22:31:43 »
I'd like to restate that there's a test version using latent object deletion available in my last post. If parties interested in speedier screen changes could try it out, I'd appreciate your feedback.
I tried it out and it seemed faster for some screen changes but then hitched up really bad on one screen change with a moderate amount of custom objects and objects in general but other screens with a similar amount weren't reproducing this effect to me. I went from two screens of moderate to low amounts of objects/custom objects to a screen of moderate to large amount of custom objects when the hitching happened. I would guess that in most people's levels unless they were using tons of water/waterfall blocks this is unlikely to happen but I can't say for sure.

Overall it felt slightly faster but not fast enough for me to have noticed if I didn't know I was using that version, I only would've noticed the hitching moment on the one screen change. I'm not really interested in a faster screen change I just thought I'd test it out so that may have colored my opinion on whether or not it's truly that much faster.
2nd, I was thinking of an object mainly used in the back ground (oh... that might not work now that I think of it... objects being in the foreground and all) that uses something like an animation png, but which displays the frames not according to a time frame but according to where on the screen Juni is.  There could be a horizontal and a vertical object for this, and I suppose even one that does both.  This way, you could make at the least statues that look at Juni, or even characters which change their position as Juni approaches, but you could conceivably even make backgrounds that scroll just a bit to give greater depth.  

I thought of it when I was trying to find the most realistic way to have Juni run through a dark corridor into small lighted areas.  If there was a shadow in the foreground to darken everything except the light, then a slightly background object that was lighter and it moved with the character, that would make a really cool effect.  Anyhow...  Just an idea.  *shrug*
Ha, I was thinking about something like that a few days ago. I thought it would be cool to have a projector with a large shadow as Juni runs by it. I settled on the idea of having it hang from the ceiling, 2d from left to right (as if you're looking in on a classroom from its side and you can't see the projection, just the light sending it to the wall/etc), and only have the "shadow" take effect as a shift on touch if you jump up in front of the projector and go away with another shift on touch as you go back down. It doesn't really accomplish the effect of movement but it at least allows the player to think that there's some lighting effect, no matter how primitive.

If ego could get something like that to work you could use it for reflections in mirrors, glass and water as well and theoretically, my long coveted parallax scrolling. It sounds a bit far-fetched though. I just thought it was funny that we were probably thinking about the same type of Knytt Stories thing at nearly the same time.
« Last Edit: February 22, 2013, 22:33:25 by plural »

*

Offline willxinc

  • 49
  • 7
  • Will 'XCS'
    • View Profile
    • Self Hosted Site (On Rarely)
Re: egomassive's Knytt Stories Plus mod
« Reply #458 on: February 23, 2013, 04:08:05 »
To add onto what the previous 2 people are saying, it'd probably be nice to have a few more objects that do basic motions (follow Juni only horizontally, vertically etc, move in a direction and warp screen etc.) and then use the custom object mechanism you added to create replacements, resulting in a lot more possibilities with custom objects.

*

Offline egomassive

  • 1850
  • 250
    • View Profile
    • egomassive games
Re: egomassive's Knytt Stories Plus mod
« Reply #459 on: February 23, 2013, 05:40:22 »
@ Willxinc: There are objects that follow Juni, 4:1 and 4:2. How are these not adequate? I don't know what you mean by "warp screen". It would be nice to have objects that run from her though.

@ Headgrinder: Your idea for objects that change based on Juni's location is an intriguing one. As I understand it, I'm afraid the execution will be difficult. I'm thinking the number of frames of animation would be huge. Say the character is followed by the head of a statue as they walk from left to right. How many frames would you need for this to be smooth? 25 tiles by 4 frames per tile may be minimally sufficient. 100 frames is a daunting number for custom graphics makers. I think the effective simplicity of objects like 3:14 is fine for the sprite size. I suppose there could be a vertical version.

I could totally do parallax backgrounds. It's a simple concept; put the background image on another layer* and if it's wider than the screen scroll it. The reason I haven't added it is because the foreground doesn't scroll. Parallax scrolling is only effective when the foreground is scrolling faster than the background. To have the back move faster than the front would look surreal, like the background was actually moving rather than our perspective of it.

*engine layer, not editor layer.

I have tired to make a darkening effect that allows for sources of light. Everything I've come up with so far has been too much of a burden on performance, or looked terrible. You can get really effective dark areas by overlaying tiles, but this doesn't allow for a bright spot around the character.
« Last Edit: February 23, 2013, 05:44:55 by egomassive »

*

Offline sergiocornaga

  • 1285
  • 131
    • View Profile
    • Sergio's Games
Re: egomassive's Knytt Stories Plus mod
« Reply #460 on: February 23, 2013, 11:01:03 »
Parallax scrolling is only effective when the foreground is scrolling faster than the background. To have the back move faster than the front would look surreal, like the background was actually moving rather than our perspective of it.

I agree... I'm a little baffled by the parallax requests. Super Crate Box is the one game I know that combines a static camera with parallax backgrounds, and it doesn't look especially good,

I have tired to make a darkening effect that allows for sources of light. Everything I've come up with so far has been too much of a burden on performance, or looked terrible. You can get really effective dark areas by overlaying tiles, but this doesn't allow for a bright spot around the character.

Would it be possible to allow the use of a 600x240 custom object that's a darkened version of the room (or just black, or translucent black) and to generate a circle (perhaps make a variety of styles and sizes available) around Juni that displays what's underneath? Like an alpha mask, or something? Or is that too intensive, or impossible? I think this would be the most versatile method.

*

Offline plural

  • 186
  • 102
  • twice shy
    • View Profile
Re: egomassive's Knytt Stories Plus mod
« Reply #461 on: February 23, 2013, 11:57:05 »
Maybe I'm misunderstanding what parallax scrolling is, but anyway I wasn't really suggesting or requesting it as a feature I was just talking. Just something I'd like to be able to do. I assume parralax scrolling is different background layers moving at different speeds based on the players movement.

I was thinking about using it in specific cases, not for every screen. Like areas transitioning to another with the movement being overally exaggerated. The "real" play area wouldn't include this but say you're walking and suddenly the desert area goes into something that's a transition screen to another area. So in that area it appears as if you're moving a lot more than in any previous area because the background moves along with you and then when you are in the next "real" area it again appears without parallax. And a warp heading the other direction to reverse the parallax to go the other way so that two different parallax background screens would comprise a sort of transitional screen like when you take the elevators in 2d metroid games. I don't know if I'm explaining this correctly, it's been a long night... but again, not an actual request. I was just speaking extemporaneously in response to Headgrinder. Please ignore me.

*

Offline Purple Ink

  • 392
  • 39
    • View Profile
    • My lore forum
Re: egomassive's Knytt Stories Plus mod
« Reply #462 on: February 23, 2013, 21:00:22 »
So this has nothing to do with the current discussion but with screen tinting. There's no documentation for it (that I could find). I checked it out in the feature demonstration but it wasn't very clear. I had do some trial and error to figure it out. Can you add documentation for it in the KS+ instructions, ego?

For anyone that doesn't already know: it works the same way as other custom colour things (like custom fades or custom colour nature effects).

An example for a grey screen tint:

[x1000y1000]
Tint=10066329

This will tint x1000y1000 and all adjacent screens. Which means it will tint every screen in the level because it tints any screen adjacent to a tinted screen. Unless you set Tint=0 to any adjacent screens you don't want tinted. Took me a little to figure that part out even after looking at the feature demonstration.

*

Offline willxinc

  • 49
  • 7
  • Will 'XCS'
    • View Profile
    • Self Hosted Site (On Rarely)
Re: egomassive's Knytt Stories Plus mod
« Reply #463 on: February 23, 2013, 22:42:48 »
Ah, didn't actually see those objects, good to know ego.
Anyways when I say warp, I mean it goes left or right, similar to object 2:31 but doesn't just disappear till the entire sprite is off-screen (currently using those as clouds and it's really distracting when half of a cloud disappears and re-appears on the other side of the room).

Another note, what about an object that is exactly where juni is, (no follow speed, it's just instantly there)?

*

Offline sergiocornaga

  • 1285
  • 131
    • View Profile
    • Sergio's Games
Re: egomassive's Knytt Stories Plus mod
« Reply #464 on: February 24, 2013, 05:48:55 »
This will tint x1000y1000 and all adjacent screens. Which means it will tint every screen in the level because it tints any screen adjacent to a tinted screen. Unless you set Tint=0 to any adjacent screens you don't want tinted. Took me a little to figure that part out even after looking at the feature demonstration.

Rather than "adjacent screens", perhaps it applies a tint to the whole game until it's told to tint otherwise? It could be unintentional as well...