Loss of behavior after sprite placement...

For questions about using Classic.

Post » Fri Jan 27, 2012 8:46 pm

I have included an example cap of what Im trying to describe. Whenever I create a level by placing sprites randomly the player sprite loses its platform behavior.
In fact I have another level that creates a flat 2d overhead map area in a similar way and the player loses its 8 direction movement, or grid, or any other behavior, after the level is generated through a function.
In the example cap youll notice the player can move across the solid bar for example, but after the world is generated it does not.

Example Cap
B
2
S
1
G
1
Posts: 20
Reputation: 640

Post » Fri Jan 27, 2012 8:49 pm

Oh and if anyone can tell me how to get the water to 'settle' in a more evenly fashion Id be very happy!
B
2
S
1
G
1
Posts: 20
Reputation: 640

Post » Sat Jan 28, 2012 3:48 pm

I'm a beginner, and , how did you create a level by placing sprites randomly?
B
8
S
1
G
1
Posts: 68
Reputation: 792

Post » Wed Feb 01, 2012 8:20 pm

It's just the button. Look:
http://dl.dropbox.com/u/26932498/platform1_edit.cap

I changed it to "press f to create world".
Found it out, while disabled everything but the button .

Could you make a small tutorial, how you managed to use the noise plugin and how it works? I would like to know, how to spawn the sprites in that way(in groups and gold spawns only in stone etc.)

Thank you :)
B
24
S
9
G
2
Posts: 294
Reputation: 3,160

Post » Thu Feb 02, 2012 9:12 pm

Thanks zyblade! Not sure why the button does that but that is the reason.

I will make a more in depth tutorial soon on how to place tiles using the 'noise' plugin or, in this case, I used the old 'perlin' plugin. The method works with either. Though Im still learning myself. First I need to figure out some things.
But in short, the level is filled with noise based a random seed. Every seed is a unique noise pattern for the layout. This single seeded number can be used as part of a save system if one wanted. Then you'll notice that in this example the dimensions of the tiles to be placed are determined by the variables 'x' and 'y' in the loop, forming a grid. The tiles are only 8 x 8 pixels therefore we multiply the indices of the 'x' and 'y' loop by 8 so they tile evenly. Finally the noise value on those indices return a value between -1 and 1 and are used to determine whatever you want. In this case, its the type of stone within the level. For this example I made the more rare stone use small value ranges toward the 1 range. The animation frame of the tiles are set based on those values. However, you could place separate sprites instead of a single sprite with different animation frames as I did.
What I'm trying to figure out now is how to get the water to settle so that its even and not stacked up unrealistically, for the platform level example. Also how to do so if a block is 'mined' or removed below it. I'm not having much luck.
B
2
S
1
G
1
Posts: 20
Reputation: 640

Post » Thu Feb 02, 2012 9:47 pm

Can't find the thread right now, but someone(I think it was r0j0hound) made a good example. I uploaded it into my dropbox. Here's the link:
water_settlezyblade2012-02-02 21:48:00
B
24
S
9
G
2
Posts: 294
Reputation: 3,160


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests