Depth sorting - almost solved

For questions about using Classic.

Post » Sat Jan 30, 2010 1:31 pm

Here's my little Isometric attempt

[url:11ydc89g]http://dl.dropbox.com/u/1289341/IsoDemo.cap[/url:11ydc89g]

I've got some collisions going but they're not 100%

I stole your movement code :D So you can steal my collision code :wink:
Coincidently, everything else wasn't copied, just happened to be incredibly similar to yours, even down to the tinting
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Sat Jan 30, 2010 1:38 pm

Awesome work guys!
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Sat Jan 30, 2010 4:05 pm

http://dl.dropbox.com/u/1010927/isometric%20engine3.cap

platform movment!

i need to implement your wonderful depth sorting into my engine

also guys, remember if you want your stuff to move properly within the iso grid, you have to make movements across the Y axis 1/2 speed of the x axis movements and the trig gets complicated having to work on this flattened grid.

i have that and jumping working here, but it uses simple depth sorting.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Jan 30, 2010 5:16 pm

[quote="Arcticus":23nq99yc]In pixel art isometric though, instead of 0.53125, you would probably just use 0.5[/quote:23nq99yc]
in TRUE isometric images you would use 1, as isometric means all axis are equal, there's no "squashing" on any of them. Then again, most "isometric" art is not really isometric, as it does look a bit weird.
In my system I allow an angle, so this factor starts at 1 but it will be set to the cosine of a view angle (press Q and W), and objects get repositioned accordingly (so at 90 it's ISO, at 60 its 0.5). It seems to go weird below 45, but that probably depends on the source art.

Speaking of which, Deadeye, our stickmen shall do battle XD

wooo Construct going ISO!
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Sat Jan 30, 2010 8:02 pm

[quote="Arcticus":cvq8q9vt]Here's my little Isometric attempt

[url:cvq8q9vt]http://dl.dropbox.com/u/1289341/IsoDemo.cap[/url:cvq8q9vt]

I've got some collisions going but they're not 100%

I stole your movement code :D So you can steal my collision code :wink:
Coincidently, everything else wasn't copied, just happened to be incredibly similar to yours, even down to the tinting[/quote:cvq8q9vt]


I used your .cap to make jumping:

http://dl.dropbox.com/u/529356/isojumper.cap

It jumps! In isometric! I kinda cheated, it uses Platform behavior, but the platform player sprite is off the screen. The iso player sets it's height to the platform player's height, basically. And I used your collision code to set some blocker objects in the platform area to simulate the ceiling/floor.

A couple of problems:

1. I don't know why but the sorting is no longer working 100%. Maybe because I moved some events around, I don't know.

2. The player teleports down a floor instead of falling when you walk off an edge, this is because the platform behavior wants to "stick" to a moving platform, and the floor blocker is only moving a small 16px at a time, so the platform behavior thinks it's just a really fast moving platform. This could be fixed with a workaround.

3. Sometimes the player suddenly flies off the screen, I think this is because the platform player is somehow getting squished and glitching outside of it's walls. (Edit: Actually, I think I fixed this by making the walls thicker)



Edit:
Oops, either I didn't see the next page of the thread or it got longer while I was working on mine... I'm gonna try Quazi's .cap now...

Edit2: Tooooo Floooooaaaattyyyyyy :P. I like the 360 degree head movement though, very Excorsist.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Jan 30, 2010 9:01 pm

[quote="madster":vtjfvdp7][quote="Arcticus":vtjfvdp7]In pixel art isometric though, instead of 0.53125, you would probably just use 0.5[/quote:vtjfvdp7]
in TRUE isometric images you would use 1, as isometric means all axis are equal, there's no "squashing" on any of them. Then again, most "isometric" art is not really isometric, as it does look a bit weird.
In my system I allow an angle, so this factor starts at 1 but it will be set to the cosine of a view angle (press Q and W), and objects get repositioned accordingly (so at 90 it's ISO, at 60 its 0.5). It seems to go weird below 45, but that probably depends on the source art.

Speaking of which, Deadeye, our stickmen shall do battle XD

wooo Construct going ISO![/quote:vtjfvdp7]

mine allows 360 movement on the squashed grid, toward the mouse at the correct speed for any given angle, check it out
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Jan 30, 2010 9:20 pm

[quote="deadeye":22o3sdoo]1. I don't know why but the sorting is no longer working 100%. Maybe because I moved some events around, I don't know.[/quote:22o3sdoo]

The sorting seems to be working exactly how it normally does. The sorting code I came up with seems to have trouble when your player is sitting halfway between two blocks and when standing on the top corner of a box. I'm still not sure how to fix this.

These iso demos are all looking awesome everyone!
Any help on the sorting code would be greatly appreciated!
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Sun Mar 28, 2010 11:04 pm

Anything come of this, guys?
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Mon Mar 29, 2010 12:01 pm

With the help of a stranger on the internet, I've got the code to a point where its -almost- perfect sorting-wise, however, the loop is so long and convoluted that it slows the game down exponentially and i can't really have more than about 10 objects on the screen at once without any slow down.
And yes i've tried only updating the sorting only when something changes, it doesn't work very well with the current loop. So i'm taking a little break from it until i can think up something better.

I REALLY want a working iso engine :(
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Mon Mar 29, 2010 12:07 pm

What about using layers for different elevation levels?
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests