[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]

/agdg/ - Amateur Game Development General

AGDG - The Board
Name
Email
Subject
REC
STOP
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Oekaki
Show oekaki applet
(replaces files and can be used instead)
Options
dicesidesmodifier

Allowed file types:jpg, jpeg, gif, png, webp,webm, mp4, mov, swf, pdf
Max filesize is16 MB.
Max image dimensions are15000 x15000.
You may upload5 per post.


Welcome to AGDG, keep working on your game anon!
See also: /ideaguy/ | /vm/

File: 2ed101eb8d672e6⋯.jpg (42.25 KB,500x614,250:307,1506459351478.jpg)

98cca7 No.29538

Using Game Maker: Studio. The players X and Y coordinates can equal values with decimals. (Example x = 19.198213) Should I floor the coordinates to equal whole integers? This is only for tracking the players position, not for changing his coordinates manually.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

8b15f9 No.29628

This depends on what you're trying to accomplish. It's also partially about the limitations of the engine you're dealing with.

If you want to track the player's position to execute some sort of event, using floored coordinates will give you a 'radius' where the event takes place, where exact coordinates would mean that the place where the event occurs is very, very precise.

What are you trying to accomplish with tracking the player's position?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

838d5a No.30416

Yes, floor them.

If you need to do any calculations on the coordinates, pass the raw unfloored ones in...then floor the result afterwards.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



[Return][Go to top][Catalog][Nerve Center][Random][Post a Reply]
Delete Post [ ]
[]
[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]