sprite draw distance

For questions about using Classic.

Post » Thu Sep 06, 2012 7:28 am

Is there a way to increase the draw distance of sprites?

I've been working on a 3d terrain mesh. It's pretty spiffy, but distorted sprites stop getting drawn as soon as there actual location go's off screen.

B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Thu Sep 06, 2012 8:46 am

Objects are only drawn if their bounding box is on the screen, and the bounding box is always at a ZElevation of zero.

You ca design your game so that the ZElevation of objects (and distort points) never go lower than 0, just shift them higher. You can also increase the project property "eye distance" if they are getting clipped by being close.
B
79
S
24
G
55
Posts: 4,755
Reputation: 41,273

Post » Thu Sep 06, 2012 5:16 pm

well.. its not actually "3D". I'm not using the z 3d distortion of the sprite, so the view distance does nothing, I'm just distorting the .y of a point



Is there a way to increase the screen size of drawing objects, but not the actual resolution.

In construct it self, or even in python?

OR can I edit the bounding box of a sprite, but not there actual height/width?Bartosh2012-09-06 17:28:35
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Thu Sep 06, 2012 8:36 pm

I got it backward, keep the ZElevation and Z distort less than 0 so that the object is mostly contained in it's bounding box. Another approach would be to always position the object at the middle of the screen and use "absolute displacement".

[quote]Is there a way to increase the screen size of drawing objects, but not the actual resolution.

In construct it self, or even in python?

OR can I edit the bounding box of a sprite, but not there actual height/width?[/quote]
No, you can only design around it.
B
79
S
24
G
55
Posts: 4,755
Reputation: 41,273

Post » Fri Sep 07, 2012 3:38 pm

I think kinda what your thinking along the lines of center then absolute displacement could work.

I'm going to try making the sprite 2 or 3 times its size, then relatively displace the sprite to half its size, since displace doesn't actually change the size or position of an objects bounding box this should work.

In terms of were there actually placed, they would be overlapping each-other significantly.
but all my terrain collision will be based off of an array, so It shouldn't matter.

I'll let you know what happens.Bartosh2012-09-07 15:39:08
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Fri Sep 07, 2012 3:52 pm

works like a charm, thanks so much for your help.
B
6
S
2
G
5
Posts: 249
Reputation: 2,323


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests