JSlither icon indicating copy to clipboard operation
JSlither copied to clipboard

Move the snake

Open nightwolf93 opened this issue 9 years ago • 24 comments

Next step the movement ? :) I have found the G packet, but i don't know how to use correctly do u have any idea ?

nightwolf93 avatar Apr 14 '16 19:04 nightwolf93

hello how can i learn my port

eralpcicekdagi avatar Apr 14 '16 22:04 eralpcicekdagi

@eralpcicekdagi default port is 8080

@nightwolf93 i think i will have the movement done tomorrow :) It should be make with packet "e"

circa94 avatar Apr 14 '16 22:04 circa94

The "e" ? Is for the the direction right ? With the "g" i can move my snake but it's slow xD

nightwolf93 avatar Apr 14 '16 22:04 nightwolf93

is new update work?

eralpcicekdagi avatar Apr 15 '16 15:04 eralpcicekdagi

No. But now data is sendig correctly. We need to do a lot of more math...

circa94 avatar Apr 15 '16 15:04 circa94

anyone find out smth new?

circa94 avatar Apr 18 '16 14:04 circa94

i think i know why you cannot move you are actually always out the circle of the map

GrumpyOet avatar Apr 18 '16 15:04 GrumpyOet

@GrumpyOet no, you are into the circle, the mini-map is just buggy. You can install this script and you can see your X and Y axis.

iioel avatar Apr 18 '16 16:04 iioel

this is also a good point. we should find out, how we can display the snake correctly on the minimap

circa94 avatar Apr 19 '16 07:04 circa94

var incX = ((float)Math.Cos((Math.PI / 180) * this.MySnake.CurrentAngle)); var incY = ((float)Math.Sin((Math.PI / 180) * this.MySnake.CurrentAngle));

That for calculate the good increase vector for snake direction (You need to convert you angle to radian like this)

nightwolf93 avatar Apr 19 '16 18:04 nightwolf93

I just found this out at the moment. Now I read your comment ^^ Could save me hours if a had read this earlier. Damn

Kogs avatar Apr 19 '16 19:04 Kogs

Read your github notification haaha :+1: Btw you have found how to set the direction of the snake ?

nightwolf93 avatar Apr 19 '16 19:04 nightwolf93

not really. I had the Problems with the movement (wich is working now but not perfect at all). The next Thing i want to try is the minimap. Because theres something wrong too

Kogs avatar Apr 19 '16 19:04 Kogs

My minimap work i think image

nightwolf93 avatar Apr 19 '16 20:04 nightwolf93

IDK. oh your movements looks good :D I only see a moving head in our server

Kogs avatar Apr 19 '16 20:04 Kogs

I think we have the same, just i have put some part in my snake haha

nightwolf93 avatar Apr 19 '16 20:04 nightwolf93

Yes i added some parts and now i see the tail

Kogs avatar Apr 19 '16 21:04 Kogs

Also when u send the update position of the snake, the position is incorrect for u too ? is not the same of the new snake packet ?

nightwolf93 avatar Apr 19 '16 21:04 nightwolf93

We have some problems with the position. On 2 clients the position of the snakes are not the same. Maybe only visual idk. Also the Rotation of the snake is missing. So the snake is head banging the hole time and the tail follows not correctly.

Kogs avatar Apr 20 '16 11:04 Kogs

Okay we need some more informations for understand how its work

nightwolf93 avatar Apr 20 '16 13:04 nightwolf93

@nightwolf93 did you found something out?

Kogs avatar Apr 21 '16 13:04 Kogs

Yeah, how to set the speed of the snake correctly. But nothing more i didn't have the time :/

nightwolf93 avatar Apr 21 '16 13:04 nightwolf93

The movement is still very buggy and it says that my snake spawned outside the map. It also says my score on the leaderboards 23k but the score in the bottom left is 150

RowanHarley avatar Apr 22 '16 20:04 RowanHarley

we know that. The readme of this repo also says that we are still in development.

Kogs avatar Apr 23 '16 13:04 Kogs