+NotAusCacher Posted March 3, 2008 Posted March 3, 2008 I plan to exclude armchair-cacher from ending my cartridge and finding the real final geocache by checking his altitude: Player.ObjectLocation.altitude:GetValue("m") == 0 If its zero, I assume the player ist at home using his simulator and he wont get the cartridge=completed and the final coordinates. This works well with my akumo PocketPC. Is this safe? Are there any devices which do not provide correct altitude? It will be frustrating for real outside cachers if they are not able to complete because their GPSr does not provide an altitude. Has someone tested this hack on other PocketPCs or on a Garmin Colorado? Quote
Ranger Fox Posted March 3, 2008 Posted March 3, 2008 I tested an old (two year old) Bluetooth GPSr I had and it provided the altitude. It was some Dell-branded one that came with my Axim. The Colorado does provide the altitude. I have a Colorado (that's gathering dust because it's not suitable for geocaching: not as accurate and the GUI requires more "clicks") and tested with it. Groundspeak mentioned there was another way to check via a test of the player application variable, but no more details have been provided. Quote
kvhollis Posted March 6, 2008 Posted March 6, 2008 I plan to exclude armchair-cacher from ending my cartridge and finding the real final geocache by checking his altitude: Player.ObjectLocation.altitude:GetValue("m") == 0 If its zero, I assume the player ist at home using his simulator and he wont get the cartridge=completed and the final coordinates. This works well with my akumo PocketPC. Is this safe? Are there any devices which do not provide correct altitude? It will be frustrating for real outside cachers if they are not able to complete because their GPSr does not provide an altitude. Has someone tested this hack on other PocketPCs or on a Garmin Colorado? I am now trying to defeat armchair caching. Have you successfully tried this code? Does it work? Thanks. Quote
Ranger Fox Posted March 6, 2008 Posted March 6, 2008 I found in another thread you could also check the accuracy of the GPSr, which might actually be a better solution. All GPSrs should compute accuracy, but I do not know if all compute altitude. The code: local accuracy = Player.PositionAccuracy:GetValue('ft') The thread: http://forums.Groundspeak.com/GC/index.php?showtopic=187100 Quote
+kazuma Posted March 6, 2008 Posted March 6, 2008 I am now trying to defeat armchair caching. Have you successfully tried this code? Does it work? I've just submitted a cartridge with that sort of protection in it. It allows you to "play" up to the end, before asking the final question. I'll be able to tell if I ever receive any complain about the game not working. Kazuma, geocaching-italia Quote
+davidloew Posted March 6, 2008 Posted March 6, 2008 I am now trying to defeat armchair caching. Have you successfully tried this code? Does it work? I've just submitted a cartridge with that sort of protection in it. It allows you to "play" up to the end, before asking the final question. I'll be able to tell if I ever receive any complain about the game not working. Kazuma, geocaching-italia Not sure if Altitude is the most reliable way. In the emulator, the alititude is always 0. But, it is possible on the devices that altitude could always be zero (that would be bad and wouldn't say much for the device, but, I suppose it's possible). David. Quote
+kazuma Posted March 6, 2008 Posted March 6, 2008 Not sure if Altitude is the most reliable way. In the emulator, the alititude is always 0. But, it is possible on the devices that altitude could always be zero (that would be bad and wouldn't say much for the device, but, I suppose it's possible). So Jeremy's note on the thread reported by RangerFox. I'll change my function and I'll update my cart Thanks. Kazuma, geocaching-italia Quote
bradvoy Posted March 7, 2008 Posted March 7, 2008 I couldn't care less whether someone wants to play my cartridge via the emulator. I think it would be boring to do so, but if someone thinks that's fun, more power to them. I want to test the altitude as part of the logic of the game itself. I want to make certain items visible only when the user is above a certain altitude. But I can't figure out how to do this using the Player.ObjectLocation.altitude:GetValue("m") functionality. If I try to include this expression in an if statement, the Builder can't parse it. Is this something that can only be done outside the builder? Or is there a way to do it that will still let me work on my cartridge with the builder? Quote
Ranger Fox Posted March 7, 2008 Posted March 7, 2008 I couldn't care less whether someone wants to play my cartridge via the emulator. I think it would be boring to do so, but if someone thinks that's fun, more power to them. I want to test the altitude as part of the logic of the game itself. I want to make certain items visible only when the user is above a certain altitude. But I can't figure out how to do this using the Player.ObjectLocation.altitude:GetValue("m") functionality. If I try to include this expression in an if statement, the Builder can't parse it. Is this something that can only be done outside the builder? Or is there a way to do it that will still let me work on my cartridge with the builder? Yes, I don't think the builder will understand this code. You'll have to do this outside the builder. If you modify the cartridge within the builder, you will need to check the code to make sure it didn't mess with it. This is why I strongly suggest this "protection" be added last, right before the final build. Quote
Ranger Fox Posted March 7, 2008 Posted March 7, 2008 Heads up, people! The reply I made in post #4 in this topic might not be all too accurate. According to davidloew in his post in the Signal Strength topic, posted below for reference, the accuracy within the emulator may not always be zero or one. For now it is, but perhaps not in the future. Just a note: the accuracy in the emulator right now is always 1 and the altitude is always 0. This may change in the future as we try to more accurately emulate real-world gps. But, seriously, David, isn't there some other property we can check that tells the script a string representation of the player version or environment running the cartridge? Wouldn't the emulator application provide something specific to itself? I thought I remember seeing something to that effect in an early post, I couldn't find it. If that's the case, I feel that's what we have been looking for all along. Quote
+davidloew Posted March 7, 2008 Posted March 7, 2008 Heads up, people! The reply I made in post #4 in this topic might not be all too accurate. According to davidloew in his post in the Signal Strength topic, posted below for reference, the accuracy within the emulator may not always be zero or one. For now it is, but perhaps not in the future. Just a note: the accuracy in the emulator right now is always 1 and the altitude is always 0. This may change in the future as we try to more accurately emulate real-world gps. But, seriously, David, isn't there some other property we can check that tells the script a string representation of the player version or environment running the cartridge? Wouldn't the emulator application provide something specific to itself? I thought I remember seeing something to that effect in an early post, I couldn't find it. If that's the case, I feel that's what we have been looking for all along. Sorry, I didn't mean to stir the pot. I agree, we need a way to tell the engine about the environment that is running. That way, the engine can have a variable that can be used by cartridge authors to tell whether or not the player is running on a device or on a desktop. I'll put it in as a feature request. David. Quote
+frigschneck Posted March 7, 2008 Posted March 7, 2008 Sorry, I didn't mean to stir the pot. I agree, we need a way to tell the engine about the environment that is running. That way, the engine can have a variable that can be used by cartridge authors to tell whether or not the player is running on a device or on a desktop. I'll put it in as a feature request. It's not only that - on the Colorado, you can also play a cartridge in GPS demo mode - just turn off the GPS, and you will have a button in the player reading "Go". So there should be some flag telling generally whether one is in "simulation mode" or "real mode". Quote
+benh57 Posted March 7, 2008 Posted March 7, 2008 It's not only that - on the Colorado, you can also play a cartridge in GPS demo mode - just turn off the GPS, and you will have a button in the player reading "Go". So there should be some flag telling generally whether one is in "simulation mode" or "real mode". You could also use fully faked GPS input to a real PocketPC emulator, such as with my technique (though i'm using a real 60CSX to input real data into it, GPSGate can simulate whatever you want: http://forums.Groundspeak.com/GC/index.php...p;#entry3356659 The microsoft pocketPC emulator has images to simulate most any pocketpc, and i'm not sure if running applications can even find out that they aren't on a real pocketpc. They certainly can't detect what is generating the GPS data, it's just coming over the COM ports. Therefore, the best way to prevent cheating is to ask some question that can only be answered on site. (and encrypt your answers in the data file) Quote
kvhollis Posted March 7, 2008 Posted March 7, 2008 Therefore, the best way to prevent cheating is to ask some question that can only be answered on site. (and encrypt your answers in the data file) Any sample code that can be used to encrypt answers in the data file? Quote
+frigschneck Posted March 7, 2008 Posted March 7, 2008 Any sample code that can be used to encrypt answers in the data file? There is a thread discussing this topic: Using Hex as Temporary Encryption Quote
+kazuma Posted March 9, 2008 Posted March 9, 2008 Hi guys, It seems that the altitude check, that worked well on my Colorado, didn't work wit the player installed on an hp ipaq. A friend of mine tried that device on my cartridge on that device and when he got to the final point... the cartridge acted like he was using the emultaor. Kazuma, geocaching-italia Quote
Ranger Fox Posted March 10, 2008 Posted March 10, 2008 I wonder if his device did not report altitude? Can you make a test version of the cartridge and give it to him? Instead of the altitude check, run the check for the GPSr's accuracy. If the accuracy is greater than a meter (three feet), the cartridge is not being run in the emulator (which is supposed to have an accuracy of one or zero). local accuracy = Player.PositionAccuracy:GetValue('ft') Therefore, the meta code would go: if accuracy <= 3 then you can't run this else you can run this end Quote
+kazuma Posted March 10, 2008 Posted March 10, 2008 I wonder if his device did not report altitude? Can you make a test version of the cartridge and give it to him? Instead of the altitude check, run the check for the GPSr's accuracy. If the accuracy is greater than a meter (three feet), the cartridge is not being run in the emulator (which is supposed to have an accuracy of one or zero). I was thinking of developing a few lines of code cartridge and give it to him and post it here too. This will prompt the result on 3 checks: 1) the accuracy 2) the altitude 3) the deviceId. I think that the last one probably could be the best solution. I have created a very simple cartridge that gather those 3 infos and writes them in a dialog. The Emulator should return "Desktop"... maybe that could be an easier way to check if the player is using a "real" device or not. Any thought? Kazuma, geocaching-italia Quote
+Jaz666 Posted March 10, 2008 Posted March 10, 2008 (edited) kazuma, this is what I get using your test cartridge. Emulator: Altitude=0 Accuracy=0 DeviceID=Desktop PPC with GPS Turned off: Altitude=0 Accuracy=0 DeviceID=00047821003819513800-0050BF3F5173 PPC with GPS Turned on and working (tested with other carts) Altitude=0 Accuracy=0 DeviceID=as above EDIT: So it looks like my PDA setup is an incompatible one with this test. However I can put on the spacesuit in the tutorial cart. Edited March 10, 2008 by Jaz666 Quote
+kazuma Posted March 10, 2008 Posted March 10, 2008 (edited) As a reference, here is the code that sets and retrieves values: -- Cartridge Variables -- Altitude = 999999 DeviceID = "not set" Accuracy = 999999 cartDeviceProtectionTest.ZVariables = {Altitude = 999999, DeviceID = "not set", Accuracy = 999999} buildervar = {} buildervar.Altitude = {} buildervar.Altitude.Id ="13eb5c03-d9f2-441a-8f68-d08dfb801d55" buildervar.Altitude.Name = "Altitude" buildervar.Altitude.Type = "Number" buildervar.Altitude.Data=[[999999]] buildervar.Altitude.Description=[[]] buildervar.DeviceID = {} buildervar.DeviceID.Id ="2ed323a2-5ce8-4a73-8c10-bbe01de9cdaa" buildervar.DeviceID.Name = "DeviceID" buildervar.DeviceID.Type = "String" buildervar.DeviceID.Data=[[NOT SET]] buildervar.DeviceID.Description=[[]] buildervar.Accuracy = {} buildervar.Accuracy.Id ="0c4b009a-9a15-465f-9230-38ee23bc4241" buildervar.Accuracy.Name = "Accuracy" buildervar.Accuracy.Type = "Number" buildervar.Accuracy.Data=[[999999]] buildervar.Accuracy.Description=[[]] function cartDeviceProtectionTest:OnStart() Altitude = Player.ObjectLocation.altitude:GetValue("ft") Accuracy = Player.PositionAccuracy:GetValue("ft") DeviceID = Env.DeviceID ... I have also tried (but getting the same results) by using function cartDeviceProtectionTest:OnStart() Altitude = Player.ObjectLocation.altitude:GetValue('ft') Accuracy = Player.PositionAccuracy:GetValue('ft') DeviceID = Env.DeviceID ... EDIT: EDIT: So it looks like my PDA setup is an incompatible one with this test. However I can put on the spacesuit in the tutorial cart. I had to by a bigger one, the one in the tutorail wasn't XXXL Regards, Kazuma, geocaching-italia Edited March 10, 2008 by kazuma Quote
Tydirium Posted April 2, 2008 Posted April 2, 2008 Hey I been playing around with this Env.DeviceID system variable. I don't have a Colorado, but when I do this it shows up as described above; On the emulator it shows as "Desktop" and on my PPC is shows up as a large alphanumeric string. Will Env.DeviceID always show "Desktop" when running in the emulator? If that's the case, then it would be easy to do a quick check. I'd like to use this in my next cartridge, but I would first want some official word on this variable before I go relying on making a check for it to return "Desktop". My plan would be to check this variable and if it set to "Desktop" then warn the cacher that they can play the game on the emulator, but that they will not be presented with the coordinates for the final cache. Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.