Tag Info

Hot answers tagged

10

You can use an IP geolocation service to obtain an approximate location from where the user is connecting. Compare this with the GPS data received and you can weed out some extreme cases (players connecting though proxy, etc). You can even calculate distances between user logins and if they are too high (say, the location moved 1000 kms between two login ...


10

There is nothing on the client side which can not be faked, everything somebody has physical access to can be manipulated. The IP contains routing information and thus hints on the location. But the player just needs a proxy and whoops... the IP hints at a completely different location than the player actually is. Trust your players, don't give them a ...


9

You could use OpenStreetMap data. It is liberally licensed. In particular, their wiki says: 3c. If I make something with OSM data, do I now have to apply your license to my whole work? No. For example, if you have written a game or published an artistic map which includes OSM data, only the data is covered by the license. This is called a ...


5

I recommend Natural Earth Data as a source of public domain cultural and physical GIS data with global coverage. Vector data sets include landmasses, countries, populated places etc, while raster base layers are available with optional details like land elevation, climate, waterways and submarine elevation. This data is intended for use with GIS software, ...


3

The best way to location a game device with WiFi would be using an API like Skyhook Wireless's: http://www.skyhookwireless.com/ Skyhook have their own database that maps WiFi SSID and MAC Address to a specific GPS (lat-lon) location. This is different and a lot more accurate than IP address location. Skyhook's system can be accurate to 5-50m in urban ...


3

You are trying to fire an arrow from point a(player) to b(mouse position) in 2d space? you can simply do the following formula to get the direction. (rather than degree) v1 = ( Player.x, Player.y ); v2 = ( Mouse.x, Mouse.y ); dir = v2 - v1; dir.normalize(); arrow.xy += dir * speed; hope this helps you achive what you want.


3

You cannot truly verify this information any more than you can truly verify any information created by an external source. So what you want is theoretically impossible. But you can probably make it a bit harder to fake. For example, on Android phones you have various location providers, such as locating a user by the nearby cellphone masts, Wi-Fi position ...


3

This " answer " is to add some visual information to the answers already given. 2: We first create a vector ( 2D in this case with component x and y ) by taking the difference from both positions ( mouse - player ). 3: We then Normalize it to create a so called " unit vector ". Which means to bring the length of our vector to 1. This is done by ...


1

The ratio of the horizontal to the vertical component of the vector is proportional to the ratio of the horizontal and vertical difference in position. The proportion factor is the speed divide by the direct distance (calculated by the pythagorean theorem). distance.x = target.x - start.x; distance.y = target.y - start.y; distance_direct = ...


1

This is handled by what some networking APIs call "ghosting". When a player's position changes it marks a flag (boolean or bit) dirty, and periodically (every 300-500ms or so) the networking system will grab all information that has been marked dirty and send it to every player that is in range of the player whose information is dirty. Additionally, whenever ...


1

You mentioned in your original post that particle positions are already in world position, and I'll assume that CollisionRectangle is also in world position. If that's true, then why afterMoveRect = Camera.ScreenToWorld(afterMoveRect);? Collision detection doesn't need the screen coordinates of anything, so if it does, you would be better served to refactor ...



Only top voted, non community-wiki answers of a minimum length are eligible