Smooth Transition from Topdown to Platformer

For questions about using Classic.

Post » Sat Jul 23, 2011 5:48 am

Or it might be that he's using Noise 2.0 and Lucid is using the original Perlin Noise plugin in this example.

Lucid that is awesome. I have no idea how it works though as I haven't had the time to play with it yet. I'm going to mess with it tonight, but that's exactly what I'm looking for.
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Sat Jul 23, 2011 6:55 am

Actually, since its noise across a single axis you could just use normalrandom().
You would have to write it to an array, and you would probably get way more peaks, and valleys, but ehh.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sat Jul 23, 2011 8:53 am

just wanted to run a few ideas by you arsonide. first, as I said in the pm, it doesn't have to be perlin noise, it'll work with any set of numbers you can refer to by position, even an array as newt suggested.
so if you were planning to use gridtree, and tunnel into greater detail there's no reason this can't be adapted to that. When I have a little time, if you need me to, I can try to put this into function object form, cuz it's kindof a pain fiddling around in that formula, and also what you said about how distorted the texture gets in the distortion

but anyway. what you said about the mask might not work, because the texture would have to wrap in a circle. depending on how urgent this is, cuz I'm really busy lately, but I can help you get a workable method to reliably wrap a tileable texture around the planet in a smooth looking way. I've been working alot with distorting textures around curves and into different shapes lately.   which brings me to my other idea, if you wanted, it could even be made to look like the planet surface was becoming more spherical as it became more circular, so your texture would actually bulge forward and make it look like a 3d planet, and flatten to a more 2d look as it unrolled into the sidescroller view.

anyway, gotta get to work. see ya, glad you liked it!!! It was an interesting challenge.lucid2011-07-23 08:56:53
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sat Jul 23, 2011 10:38 am

Given the time I could probably figure out the rotation - I got something working a bit ago but it was rotating around 0,0 instead of the correct origin of the object. I'm in the middle of a work week as well though so I haven't had much time to putz with it.

The example Davioware posted here could probably be adapted to allow the planet to be collidable. From space it wouldn't need a collision mask, when it unwraps, after the transition is complete, the mask would be generated.

As far as art goes - I have no idea where to even begin with that. Like, fundamentally how would that even work. Libnoise (Noise 2.0) has support for spherical and cylindrical noise. It's built in, Noise 2.0 just doesn't have access to it. Cylindrical is just noise that tiles on one edge rather than two. Spherical is...complicated...to say the least. I figured those two mappings wouldn't be necessary in a 2D engine, but if they would help, let me know and I'll activate them ASAP. I'm not sure if either one of those things would help, though. If the art can't be solved, I'm willing to scale back the graphics to just solid colors and go for a retro type of style, but actual noise would be awesome. In fact, I'm not even sure if noise would work, as the noise color would have to line up with the elevations on the outside, and be solid in the interior. (White peaks, etc.) Maybe it should be done algorithmically rather than with noise, as you suggested.

This was honestly just a crazy idea I had brewing in my head for a while. I didn't think it would actually go anywhere! It's crazy. Imagine my universe populated with these things along with procedural content. It'd be like a ton of Terrarias in one program. I will continue throwing myself at your math and attempting to decipher it - I got a few things down in the little time I had to mess with it tonight, but now is time for sleep and then work. I appreciate the help, and any future help.
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Sat Jul 23, 2011 1:04 pm

Hey arsonide. Sorry for the brief answer, but I'm pretending to work as I type this.
I think it would have to be triangular or conical. Imagine an upside down pyramid. The top doesn't tile with anything, the left and right sides have to wrap. Of course, depending on how the texture thing works, this would mean that when it unrolls, the vairation would decrease as you looked lower on the screen, which isn't too bad, considering you're probably not going to have the entire texure show up down that far. I know we've discussed realtime noise generation speed before, but forgot. If its possible on the plug side, I could figure out this end of making it interpolate between triangular and rectangular versions of the same noise, with the single bottom point expanding into the bottom edge of the rectangle
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sat Jul 23, 2011 4:49 pm

With a canvas for collision detection you would paste the distortmap into the canvas, and get perpixel collisions, but you probably don't want collisions for the mountains at the platform level. That means you would need to use a second distortmap, but that could actually help you out with the texture.... unless you really want to go from a z on the planet to a y on the platform. In which case the texture will be a nightmare.
As to the angle thing, to make things easier you can go beyond 50-64 columns since its only 2 rows. Something that divided into 360 even would be better... even 360.
That brings up another thing to think about. Do you want the platform level to be scrollable?
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Sat Jul 23, 2011 8:53 pm

It would be nice if it was scrollable, as the planet could be more of a realistic size with more space for exploration, but since this is on the same layout as the rest of the solar system that may pose problems. I'm still kind of thinking through everything.

Perhaps rather than moving the player, I move the terrain under the player? Then I only have to keep one block on the screen for the terrain and distort that according to the noise at the player's current "position".
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Sat Jul 23, 2011 9:24 pm

Well if you were to set the columns to 360, you could set the width of the layout to 3600, or 36000 even just to make things simple.
There's really no need to worry about the vram if you tile a texture, but your planet texture really wont tile well to platform visually.
In that case you would probably want to generate overlaying textures for different levels of noise IE more distortmaps.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests