Another request on distort maps

New releases and general discussions.

Post » Fri Nov 20, 2009 11:47 pm

Currently when you scale a sprite it also scales the distort map, or mesh associated with it. That's expected. In fact this allows you to create tiled maps to any scale. The problem is it also scales the z height. So my question is would it be possible to have the option for z heights not to scale with the sprite?
In this example:
[url:1pkaegu8]http://dl.dropbox.com/u/666516/shump1.exe[/url:1pkaegu8]
The sprite with the z heights is only 64x64 pixels, but is scaled to the layout width of 3000x 3000.
The maximum z height of the unscaled sprite is only 3, but as you can see when it's scaled those z heights go up as well.

Also note the collision detection is affected(somewhat) by the scaled z heights.

edit: also note the ram on this is about 0.3 megs, with no slow down except for the start of it where it gets mapped.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sat Nov 21, 2009 8:00 am

Hmm, how do you set those Z heights? Perhaps you could sneak a down-scaling algorithm there... reduce height by the factor of 3000/64 (or something like that).

Then again, I may have no idea what I am talking about.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sat Nov 21, 2009 10:19 am

Actually...

Yeah that does work. Silly me I didn't even think you could use decimals.
Ok yeah that's a reasonable solution, especially given what they would probably have to do to change it.
Thanks!
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Tue Nov 24, 2009 3:16 pm

OMg I had no idea that kinda stuff could be made Oo me wants to learn how to do shit like that :D especially if you could make shadows react to landscape
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Tue Nov 24, 2009 5:52 pm

[quote="Sagal":18roe806]OMg I had no idea that kinda stuff could be made Oo me wants to learn how to do s**t like that :D especially if you could make shadows react to landscape[/quote:18roe806]

Not sure what you mean. I mean you can do some bumpmapping, but something like the shadow caster behavior would probably be out of the question. All though you could fake some shadows with a color filter. In fact you kind of have to if the terrain is all one texture.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Tue Nov 24, 2009 8:45 pm

I just mean that didn't know you can do so cool terrain in Construct ^^

And with shadows stuff I mean is it possible to have seperate shadow (similar to dropshadow) but as its own sprite so it could react to hills on terrain etc.. Though it sounds almost impossible...
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Thu Nov 26, 2009 2:15 pm

why dont you just scale the map manually with x,y distortion of all the points at startup? you only need the script run once, and then z heights will be nice and normal.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Thu Nov 26, 2009 4:13 pm

You mean set the initial z lower based on how large the map will be scaled?
Yeah I could do that, but the problem is I'm also using the original z heights to create a collision mask.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Fri Nov 27, 2009 12:02 am

well from what i understand the size of the sprite will alter z heights based on the scale.

i dont know what youre doing to scale, i assume width and height on the sprite which you load a distort map onto, well why dont you scale things manually by "stretching" the points x and y to a bigger size instead of using "scaling"
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests