How many positions are there in a 1x1 spacetile?

Read tips and guides about teeworlds-related subjects (mapping, compiling, ..).
Index
Posts: 1133
Joined: Mon May 05, 2014 7:30 pm
Clan: Eagle

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

Post 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
User avatar
Aoe
Posts: 739
Joined: Thu May 29, 2014 10:54 pm
Location: Denmark
Player profile: http://ddnet.tw/players/Aoe/
Mapper profile: http://ddnet.tw/mappers/Aoe/
Clan: Infamous
YouTube: user/ElKlammoElTorso

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

Post 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?
Frr
Posts: 121
Joined: Sat Dec 12, 2015 9:57 am
Player profile: https://ddnet.tw/players/Frr-32--58-3/

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

Post by Frr »

Really interesting question.

<3 to topic starter.
Cloudly
Posts: 25
Joined: Mon Aug 03, 2015 3:52 pm
Clan: Infamous

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

Post 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.
Im 'corneum
Posts: 1052
Joined: Thu Oct 30, 2014 4:58 pm
Clan: ☭birming

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

Post by Im 'corneum »

Cloudly i move only 3 pixels because i am already standing in the first position, the ground/wall.
reply to this post or your mom will die in her sleep tonight
User avatar
timakro
Posts: 414
Joined: Mon May 05, 2014 6:05 pm
Location: Germany
Player profile: http://ddnet.tw/players/timakro/
Mapper profile: http://ddnet.tw/mappers/timakro/
Clan: unique

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

Post by timakro »

Aoe is right, would be interesting to know whats true ^^
Im 'corneum
Posts: 1052
Joined: Thu Oct 30, 2014 4:58 pm
Clan: ☭birming

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

Post 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
reply to this post or your mom will die in her sleep tonight
User avatar
timakro
Posts: 414
Joined: Mon May 05, 2014 6:05 pm
Location: Germany
Player profile: http://ddnet.tw/players/timakro/
Mapper profile: http://ddnet.tw/mappers/timakro/
Clan: unique

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

Post 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
Cloudly
Posts: 25
Joined: Mon Aug 03, 2015 3:52 pm
Clan: Infamous

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

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests