i want to control snek with mouse. For this reason i must change some int to float.
Where can i do?
Snake game with mouse control
-
- Posts: 52
- Joined: April 15th, 2017, 10:48 am
Snake game with mouse control
- Attachments
-
- UYG 15.rar
- (9.72 MiB) Downloaded 133 times
Re: Snake game with mouse control
I don't quite understand what problem you're having.
But you could prob just typecast to int for the mouse position.
like
Int x = int(wnd.mouse.GetPosX());
But you could prob just typecast to int for the mouse position.
like
Int x = int(wnd.mouse.GetPosX());
Re: Snake game with mouse control
I think he wants to convert from int to floatYumtard wrote:I don't quite understand what problem you're having.
But you could prob just typecast to int for the mouse position.
like
Int x = int(wnd.mouse.GetPosX());
Not sure why you would want to convert the mouse coords into float in the first place... Just use the int output from GetPosX(). Snek is not really a 'floaty' game to begin with.
Chili
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Snake game with mouse control
I think he wants to modify it so it makes smooth movement, like slither.io.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com