Trouble with pseudo Z axis

For questions about using Classic.

Post » Wed Oct 08, 2008 1:37 pm

Sorry, i know it isn't really forum ettiquette to post four times in a row, but i still really need help with this :(
So far the best results i've got have been with:

For each Blue ordered by Blue.Y + Blue.Value('ZHeightBottom') ascending

which gets the X,Y layering working great, as long as i don't stand on anything :P
if there is any way of combining that above code with this code:

For each Blue ordered by Blue.Value('ZHeightBottom') ascending

which gets the 'Z' layering working great

Because both effects are what i want, but i want them at the same time, for now i only know how to apply them separately
i'm desparate! this is like the last (maybe second last...) bug for me to iron out in my engine so i can start on concept, art and story
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Wed Oct 08, 2008 2:50 pm

Every time I see this thread bumped it makes me sad because I want your game to work, and it just doesn't. Then I open the .cap and struggle with it for a little while and tear my hair out and it all ends up nowhere.

I think it might just be impossible. I've come up with a few solutions that I was absolutely sure should be working, but they just didn't, and the whole thing just makes no sense to me. :(

I hope someone is able to help.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Oct 08, 2008 2:51 pm

Just loop every blue by

Blue.Y + Blue('ZHeightBottom') * 2

And bring to front. That works perfectly.I'm just looking over your code because something is up with collisions

Edit: Arg that has problems when you jump on large objects...okay let me think this over

Edit: Okay I think theres a bug in the collisions causing me to walk through walls...looking into it

Edit: Very confused...you use lots of objects like motion detectors and stuff...I dont understand why...and when the player jumps the detectors seem to stay on the ground. Your method of disabling physics with the bodies is correct, and my method of z order is correct, but theres something wrong elsewhere
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Thu Oct 09, 2008 1:03 pm

Just trying to read this thread hurts my brain so bad... I would be of no help at all I don't think, especially if Deadeye and Davo can't figure it out. :S

I feel bad for you though, since the idea sounds wicked... good luck though bro.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Sat Oct 11, 2008 9:45 am

Dave, I dunno how but you seem to have fixed my problem :) with the exception of jumping in front of the tower i made in it and jumping when behind one of the big boxes, it acts a little funny...
The collision thing, as far as i'm aware, is when the player overlaps the obstacle just as the player's bottom variable falls below the obstacles top variable, which shouldn't be possible in theory as the collisions are reset if that happens...
Also a similar thing happens with disabling the collisions, when the player is pushing against a wall and tries to jump over it, he stands on top of it but cannot go any further than the edge, as though collisions are still active, if you get a run up however that problem doesn't exist
I was going to make a little loop that pushes the player out of the colliders when he shouldn't be there, but i found with that loop, when pushing against an object from the LEFT ONLY, the player constantly gets pushed out and twitches
I also made the detector things stay on the ground because the collision objects aka, 'footprints' of the obstacles are always going to be on the ground

I'll post a more up to date cap right now, i've cleaned a little of the code up and got rid of a few useless detectors.
Here:
[url:3hulfajv]http://www.mediafire.com/?eymiwbyml2y[/url:3hulfajv]

Thanks for the help everyone! we're slowly getting there :D
Soon i can start the real work....
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Sat Oct 11, 2008 11:29 am

Awesome, you finally got it working :D

I played around with it a little, it seems to be pretty solid, other than the tower glitch you mentioned. Just one thing though, now that the level is more complicated it's harder to discern where the blocks actually are. Maybe you could do some different lighting on them to help readability? Something like this maybe:



Just a thought. Orthographic views can be kind of confusing sometimes.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Oct 11, 2008 12:21 pm

Yeah those boxes are just old sprites i made for something else, i just threw them in for something to use, and the player is just a placeholder as well, once i get a character made in lightwave/blender/truespace (whichever i decide) i'll render animations and walk cycles in ALL 64 DAM DIRECTIONS which will take years to get working in construct (hence my animator bar suggestions a while ago ;) )

Anyways yeah, these are all placeholder type sprites and the only two glitches i can find in the Z layering are jumping in front of the tower and jumping when behind the big box
I don't really know how to fix those ones..... :(
Any suggestions from the almighty devs?

Also, deadeye, what are you doing with the lighting there exactly? it does look pretty cool, i was thinking of eventually making just some generic semitransparent shadow objects that i could put in different places like walls and floors to give more depth and realism to the scenes
dynamic lighting had occured to me too but i dunno how well it would go down as it's not really a top-down/side-on type view
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Sat Oct 11, 2008 1:08 pm

Eh, it was just a mockup I photoshopped really quick. Some white rectangles on the front face set to overlay and like 40ish percent layer transparency, just to differentiate the front faces from the top faces.

Also, THAT'S A LOTTA SPRITES :shock:
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Oct 11, 2008 2:06 pm

i tryed adding a simple shadow caster, it works pretty well, cept for the floating box

all you have to do is add shadow caster to the red "base" squares and then create a light on the "shadow" layer which always postions to the player
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Mon Oct 13, 2008 2:01 am

yeah that looks ok, not really the look i'm going for though, in any case i'm gonna leave the lighting and sprites till i get this layering problem 100% fixed, right now i'd say it's at about 90%
the '* 2' certainly helped out a bit although i'm not entirely sure how.

So if anyone has any more ideas i would gladly welcome them?
Am i even doing this the best way it could be done?
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests