Page 2 of 2

Re: How many positions are there in a 1x1 spacetile?

Posted: Fri Jan 27, 2017 4:17 pm
by Index
Well, I never knew that I want to know these random facts.
But it's awesome, thanks for this tutorial!))
I linked this in the Link List, added headline in your post and also highlighted timakro's answer in your first post .__.
Might actually x-post this to /r/mildlyinteresting and /r/TodayILearned

Re: How many positions are there in a 1x1 spacetile?

Posted: Wed Feb 08, 2017 10:37 pm
by Aoe
28x28
Image
29x29
Image


If a tee is 28x28, it should be able to move 5 pixels in between 2 blocks?

but if its 29x29 , its able to be in 4 places, it would make sense to what im corneum found out about.

So how big is a tee really? is it 28x28, 29x29 or something else?

Re: How many positions are there in a 1x1 spacetile?

Posted: Thu Feb 09, 2017 12:10 am
by Frr
Really interesting question.

<3 to topic starter.

Re: How many positions are there in a 1x1 spacetile?

Posted: Thu Feb 09, 2017 8:42 am
by Cloudly
timakro wrote:

Code: Select all

	//character's size
	static const int ms_PhysSize = 28;
Character size is 28

Code: Select all

int CCollision::GetPureMapIndex(float x, float y)
{
	int Nx = clamp(round_to_int(x)/32, 0, m_Width-1);
	int Ny = clamp(round_to_int(y)/32, 0, m_Height-1);
	...
}
Tile size is 32


32-28=4
32-28=4 but the 4 should be the pixels the tee can move then. How does he only move 3 pixels in the video?
Something went wrong there.

Re: How many positions are there in a 1x1 spacetile?

Posted: Thu Feb 09, 2017 9:06 am
by Im 'corneum
Cloudly i move only 3 pixels because i am already standing in the first position, the ground/wall.

Re: How many positions are there in a 1x1 spacetile?

Posted: Thu Feb 09, 2017 4:19 pm
by timakro
Aoe is right, would be interesting to know whats true ^^

Re: How many positions are there in a 1x1 spacetile?

Posted: Thu Feb 09, 2017 4:24 pm
by Im 'corneum
so there are 3 things we have to be aware of:
1. the stoppers could have a bigger Area-of-effect (Aoe ;D) than one block
2. the hook-unhooks could be smaller than one block
3. teesize is hard to find out because we dont know what tile is 1 block big, also tees are wobbly. :D

Re: How many positions are there in a 1x1 spacetile?

Posted: Thu Feb 09, 2017 4:41 pm
by timakro
Your right, the real size of a tee is 29x29! This piece of code is used for collision detection, in vanilla also for the flag for example, it gets passed 28x28 as tee size but makes the object 1 bigger than we would intuitively expect. https://github.com/ddnet/ddnet/blob/609 ... #L329-L385

Re: How many positions are there in a 1x1 spacetile?

Posted: Thu Feb 09, 2017 11:32 pm
by Cloudly
Im 'corneum wrote:Cloudly i move only 3 pixels because i am already standing in the first position, the ground/wall.
That is literally what i said. :D
you can move 3 pixels.. but with a tee being 28x28 you should be able to move 4 pixels.