How to use sprite distortion?

For questions about using Classic.

Post » Tue Sep 09, 2008 5:56 pm

I'm trying to make something like a rope, but I can't get it to work.

What I want is almost exactly what drasa did is this example: download/file.php?id=171

...except with fewer columns, because stuff like ropes don't need that many. Each attempt I make doesn't get anywhere. Also, if I set the distort map size on a sprite with different amounts of columns and rows (like 3 columns and 1 row) then the sprite gets mangled even without doing anything else.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Tue Sep 09, 2008 7:58 pm

i believe that uses quadratic functions? theres an article somewhere on the forums
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Tue Sep 09, 2008 8:54 pm

Does this example help?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Tue Sep 09, 2008 8:56 pm

I'll try make a working example now that Dave has posted an example how to use the distortions... I had already done it if I wasn't so busy, the university is really stressing me :(
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Tue Sep 09, 2008 10:35 pm

I looked at the example, but it doesn't help much. :( That example uses a 16x16 grid, which doesn't showcase the 3x1 grid issue I mentioned earlier, and doesn't show how to do the spline as defined by sprite 'point' placement (the red dots in Drasa's example). Really, the math is above what I know how to do, too. :(

Drasa, no sweat - uni's obviously more important! No hurry either, I really appreciate that you're going to make it at all! :)
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Wed Sep 10, 2008 9:04 am

Heres something i put together. Also I think your right, somewhere in the code i must have mixed up columns and rows...i'll look into it
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Wed Sep 10, 2008 1:38 pm

Just a quick question regarding sprite distortion.

I've noticed that getting up around 5000 rows/columns (in total) causes Construct to crash.

For example, 22 objects @ 16x16 (5632 total) will cause construct to crash, similarly, 82 objects @ 8x8 (5488 total) will also cause it to crash.

I guess my question would be, is it intended for that to be the case? Or should we be expecting a higher amount in future?

I ask this question because I've been working on an engine to support perspective-correct textured polygons (currently 100% working, sans a Z Buffer). The problem is, each poly currently uses 8x8 (less causes notable distortion in the textures), which means a total of 81 objects before Construct crashes, which is sadly going to be nowhere near enough even for N64 or Playstation 1 era graphics (which is all I'm really aiming for).


EDIT: To clarify, I mainly wish to know if this "cap" of sorts, of 5000 rows/columns, is intended, or if it is a bug. That way, depending on your response, I can either halt my progress, or continue under the assumption that it will be fixed at a later date. Cheers. :)
B
2
S
2
G
5
Posts: 108
Reputation: 1,866

Post » Wed Sep 10, 2008 2:17 pm

no cap intended, its a bug...dunno why its happenning but its a bug and it will be fixed or i'm not australian!
B
4
S
2
G
5
Posts: 641
Reputation: 3,011


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests