Jump to content

Cacher Pursuit - A Wherigo Cartridge


Ranger Fox

Recommended Posts

I put together a cartridge last night called "Cacher Pursuit". It's a cartridge based on the Trivial Pursuit game (you answer a question for a category and collect a pie wedge for that category; collecting all pie wedges win). I'm making it in such a way so it's easy to change around and use in other areas around the world. Unlike Whack-A-Lackey and Battleship, it will not be a Play Anywhere cartridge; you'll have to position your zones. The cartridge can support as many zones and categories as you want. The questions can be a combination of open-ended and multiple choice. It supports multiple correct answers (for plural, abbreviations, or common misspellings). You can give it an upper limit of retries for each category or the player can exhaust the category's question bank before a game over is reached. If you have an idea for another feature or would like to submit artwork, please let me know. I think this will be a fun game for everyone.

 

For the first month or two, the cartridge will be closed source while I watch log entries for any issues. Once I'm happy with the code and its performance, I'll release it as open source, complete with instructions, so everyone can make a Cacher Pursuit cartridge in their area. You can modify the question bank however you like. I even intend on adding it as a kit to Wherigo\\kit, though it won't be as easily editable in a builder application. If you make a cartridge based off this, please provide attribution and let me know when the listing is published so I can enjoy the log entries with you.

 

That leads me to the purpose of this post. As the cartridge will later be open source, I thought it would be fun to ask the community to suggest some trivia questions. A cartridge developed by all of us. The questions need to be related to geocaching or Wherigo, should be short, and have short answers. Challenging questions are very welcome. Multiple choice questions should have at most four answers, preferably three. I'll pick from the questions submitted and add them to the cartridge, giving credit on the question. Let's have some fun with this!

Link to comment

I put together a cartridge last night called "Cacher Pursuit". It's a cartridge based on the Trivial Pursuit game (you answer a question for a category and collect a pie wedge for that category; collecting all pie wedges win). I'm making it in such a way so it's easy to change around and use in other areas around the world. Unlike Whack-A-Lackey and Battleship, it will not be a Play Anywhere cartridge; you'll have to position your zones. The cartridge can support as many zones and categories as you want. The questions can be a combination of open-ended and multiple choice. It supports multiple correct answers (for plural, abbreviations, or common misspellings). You can give it an upper limit of retries for each category or the player can exhaust the category's question bank before a game over is reached. If you have an idea for another feature or would like to submit artwork, please let me know. I think this will be a fun game for everyone.

 

For the first month or two, the cartridge will be closed source while I watch log entries for any issues. Once I'm happy with the code and its performance, I'll release it as open source, complete with instructions, so everyone can make a Cacher Pursuit cartridge in their area. You can modify the question bank however you like. I even intend on adding it as a kit to Wherigo\\kit, though it won't be as easily editable in a builder application. If you make a cartridge based off this, please provide attribution and let me know when the listing is published so I can enjoy the log entries with you.

 

That leads me to the purpose of this post. As the cartridge will later be open source, I thought it would be fun to ask the community to suggest some trivia questions. A cartridge developed by all of us. The questions need to be related to geocaching or Wherigo, should be short, and have short answers. Challenging questions are very welcome. Multiple choice questions should have at most four answers, preferably three. I'll pick from the questions submitted and add them to the cartridge, giving credit on the question. Let's have some fun with this!

Sounds to be a fun new idea!When do you have it up and running? For me it would be nice to have it web based as the Wherigo kit which I have used for my latest 10 caches.In the Wherigo kit there are some questin function but it does not work so good as you can try until you get a proper answere. I think that the present Wherigo kit could be updated with this idea of a cacher pursiut function with limited number of trials j-annie (sweden)

Link to comment

It'll take me a little while to update Kit. I have to do my tests by having a cartridge out in the wild and watch it for a little while to make sure there aren't any problems. While that's going on, I can start modifying Kit. I had hoped to keep Kit 100% compatible with the other builder applications. However, I can do some really neat stuff if I go away from that.

 

These next two months are very demanding upon my time. I'll see what I can do about adding a kit for Cacher Pursuit as I get time. It'll be easier to add than the other two kits because recursion was a nightmare. Cacher Pursuit doesn't have any recursion.

 

I'm a little disappointed no one has helped me with any trivia questions, both on here and Facebook. Anyway, I'll upload some preview shots here so I can get some feedback. I might also upload it to the Wherigo Foundation site because it now has functionality where I can let the public play the cartridge in the Webwigo emulator.

Link to comment

I thought it would be fun to ask the community to suggest some trivia questions. A cartridge developed by all of us. The questions need to be related to geocaching or Wherigo ...

 

Not sure how the situation is in the US but here in Germany a basic beginner cartridge would help a lot. If you want to do this mark the cache clearly as a beginner introduction cache/WIG (experienced cachers might feel offended otherwise).

 

You found a cache. You are now allowed to ...

- Remove max. one item

- Exchange items

- Look at the items

- Take the pencil/pen

 

Select the rule for trading items from a cache?

- There is no rule

- You have to put something back in

- Swap items and put larger valued items back in the cache

 

You want to take a coin from the cache. What might cause a problem?

- Coins are not allowed in caches

- Nothing special with coins

- It might be a Geocoin that is no trade item

- I have to leave it in the cache if I don't know about Geocoins

 

You plan to place your first cache. How far does it have to be from another physical cache location?

- 50m (150 ft)

- 161m (500 Ft)

- 500m (1500 ft)

 

What should you consider before placing a cache:

- The distance to neighbor caches

- Am I showing a nice location to the community

- Is it interesting/funny to read my cache description

- Can I create/use a special container

 

Are you allowed to dig a hole for your cache?

 

Which cache type is TYPICALLY the hardest to hide well

- Nano

- Micro

- Regular

 

Can you hide a cache close to railroad tracks?

Link to comment

It'll take me a little while to update Kit. I have to do my tests by having a cartridge out in the wild and watch it for a little while to make sure there aren't any problems. While that's going on, I can start modifying Kit. I had hoped to keep Kit 100% compatible with the other builder applications. However, I can do some really neat stuff if I go away from that.

 

These next two months are very demanding upon my time. I'll see what I can do about adding a kit for Cacher Pursuit as I get time. It'll be easier to add than the other two kits because recursion was a nightmare. Cacher Pursuit doesn't have any recursion.

 

I'm a little disappointed no one has helped me with any trivia questions, both on here and Facebook. Anyway, I'll upload some preview shots here so I can get some feedback. I might also upload it to the Wherigo Foundation site because it now has functionality where I can let the public play the cartridge in the Webwigo emulator.

You could leave the old Wherigo kit as it is for the users that now use it and make a copy were you add the trivial pursuit functions and introduce it as an extended version on the same startpage. I think it should be a great version for teaching kids history. Just make a 10 step walk around in a historic place and have questions here and there which starts with a selection question and if right you could go deeper and deeper in the questions and collect points based on how fast you reach the next step on the tour. In historic places there are often signs with fact that could cover the essential answeres. You will learn more if you stay and studie on the place in the historic perspective.

Link to comment

There are currently two Cacher Pursuit cartridges published:

Greensboro, North Carolina

Yerington, Nevada

 

You can preview part of the cartridge through Webwigo by going to the Wherigo Foundation site for WGKV. It only has two zones available, but you can replay the cartridge a few times to see different questions for those two categories.

 

A lot of this is custom code because I wanted to be efficient. I'll now need to wait to see if those playing the cartridge in the field experience any issues. Once I'm happy with how the cartridge operates, I'll release it as open source, then work on making a kit for it after October. I'm debating whether to modify Wherigo\\kit enough so everyone can contribute to and search a shared bank of questions.

 

I think a lot of people will be interested in having one of these cartridges in their area.

Link to comment

Here are some things I learned about the iPhone app during my development of this cartridge. Please note the issues mentioned should be resolved in the app's next release. My purpose for talking about them here is to share the knowledge.

 

First, the app crashed when I visited any zone. This was because I attempted to clear an input's .Choices by setting it to nil.

 

Once I got that resolved, I noticed the first multiple choice choices would be retained on subsequent questions (i.e. if A,B,C were the first multiple choice answers and the next answers were D,E,F, the app would retain A,B,C as .Choices to the input). I worked around this by detecting an iPhone and showing the answers as 1,2,3 within the question and 1,2,3 within the .Choices. This is not optimal as some questions had four choices. Had I more time to test things, I may have opted to use a MessageBox with multiple buttons, but I didn't know if all player apps would tolerate more than two buttons (I was under pressure to fix the cartridge in such a way it would work for every app, so didn't have time to experiment).

 

I'm still not certain what I'd like to do regarding line breaks. I think some apps like the HTML line break tag while others prefer the non-breaking character used by Groundspeak's builder. (Lacking any official specification documentation, I tend to use what I see in Groundspeak's official builder as the spec.)

 

The moral of the story is this: being innovative is fun with Wherigo, but if you're going to do something different from most cartridges, just be sure to have your cartridge tested in all player apps as there can still be inconsistencies. The great news is if you do find issues with a player app, the app developers are wonderful people and would love to hear from you (including compliments).

 

I will wait until the iPhone app is updated. After that, I'll revert to the original code, give it some time for people to play, then release it as open source with attribution. After that, hopefully in December, I'll see about making a kit for Wherigo\\kit.

Link to comment

This sounds like a very exciting project! Is there anything new? It would be really nice to have the source code behind it to make such a cartridge and cache possible here in Norway. :grin:

 

EDIT: I see that it has already been published at the website of Wherigo Foundation. Thank you!

Edited by eirikub
Link to comment

Allowing the source code to be downloaded from the WF site was an oversight on my part. I have corrected that by toggling to closed source.

 

In order to make the two cartridges I did, I had to modify the code to get around an issue with the iOS app. spstanley has been notified of the issue and already has a fix in his upcoming release (the UI also looks a whole lot better). Due to having to implement this workaround for the iOS app, I did not intend to release the source code for Cacher Pursuit yet. While you can use the source code you downloaded, I do not intend to support that version if issues arise. If you do create a cartridge from what you downloaded, let me know. I love reading the logs from people who complete cartridges I've had a hand in making. Reading fun logs makes it all worthwhile.

 

Anyway, when the iOS app's update comes out, I'll wait a few weeks for players to pick up on the new version, then make changes to the source code, test it again, and release it as open source.

Link to comment

Allowing the source code to be downloaded from the WF site was an oversight on my part. I have corrected that by toggling to closed source.

 

In order to make the two cartridges I did, I had to modify the code to get around an issue with the iOS app. spstanley has been notified of the issue and already has a fix in his upcoming release (the UI also looks a whole lot better). Due to having to implement this workaround for the iOS app, I did not intend to release the source code for Cacher Pursuit yet. While you can use the source code you downloaded, I do not intend to support that version if issues arise. If you do create a cartridge from what you downloaded, let me know. I love reading the logs from people who complete cartridges I've had a hand in making. Reading fun logs makes it all worthwhile.

 

Anyway, when the iOS app's update comes out, I'll wait a few weeks for players to pick up on the new version, then make changes to the source code, test it again, and release it as open source.

 

I like it -- tried out both versions in webwigo. Gives me ideas for similar caches. Can't wait to see the source code to see how you handle the array of questions.

Link to comment

I wouldn't mind if you sent them to me via an email. I'll add them to the two official cartridges.

 

I need to remember that, now that the iPhone app has been updated, I need to revert the iPhone-specific changes I made to the cartridge. I've had the iPhone app's beta on my phone for so long I couldn't tell if it was updated or not. Let's see if I can get this done this evening.

 

The best way to get me to do something is to poke me once a week unless I say I'm actively working on it.

Link to comment

I have finished updating the Cacher Pursuit code. I had commented the code properly, so I knew where all my iOS-specific code was.

 

You can download either my Yerington, Nevada or Greensboro, North Carolina version. They have slightly different questions in their question banks.

 

Cacher Pursuit Primer

Would you like to create your own version of this cartridge? Here's a nice guide. First, download the GWZ, change the file extension to ZIP, and uncompress the files. You'll see one file that starts with "Cacher Pursuit". This is the lua (code) file.

 

Adding Zones - The cartridge comes with six zones. If you don't want six, you can add or remove as you see fit. You can use your favorite builder application, but I do not suggest you use the zone name obfuscation Urwigo provides. This is because you will need to know the zone names later on, and it's a pain to deal with obfuscated names. Anyway, each zone also needs a separate media image for its pie wedge. Make sure you remember that media name as well. If you want to associate a media (picture) with your zone as well, feel free to do so. Finally, FullPie is the name of the zone that has the geocache. You can call it what you want, but you'll have to apply the zone name change to the author script yourself (it's as easy as find-replace).

 

Localizing game messages - Open the lua file in notepad. Search for the text "by Ranger Fox". This will get you to the right area. It's around line number 359 in the original file, if you just want to press Ctrl+G and put the line number in. A few instructions are seen there.

 

Look for the "Messages shown to the user" section, which is right below my comments. You can see text set to some of the variables:

StartGameMessage = [[Welcome to Cacher Pursuit!  This game is reminiscent of Trivial Pursuit, but with a geocaching theme.  (etc.) ]]
StartGameMedia = zmediaEmpty
GameCompleteMessage = [[You found all wedges!  Treat yourself to some pie--or just go to the cache!]]
GameCompleteMedia = zmediaFull
GameOverMedia = zmediaGameOver
AttemptsRemainingText = [[Attempts Remaining: {0}]]
WedgesEarnedText = [[Wedges Earned: {0}]]
DemoModeZoneCount = 2	--To allow the cartridge to be played completely, just set this number to a number more than the total number of question categories (zones) you have.
DemoModeMessage = [[Thank you for playing this cartridge in demo mode.  You now know what to expect when you play it in the field.  Please do so.]]

 

That first one, StartGameMessage tells you this is the message that will display when someone starts the game. Put whatever text you want in there. Likewise, GameCompleteMessage will show when the player successfully completes the game. Further down, you will see {0} in some messages. This is where a number will be inserted, so remember to keep {0} somewhere within your own message (or just leave those messages alone).

 

The Question Bank - This is the major part of the cartridge. Search for the text function Init() in the author script. The question bank is created within this function. There's a lot of documentation of what everything means. Please read that.

 

Question Group

    qgroup = { Zone = zoneCachingTerms, Category = "Caching Terms", Questions = {}, MaxAttempts = 3, Complete = not zoneCachingTerms.Active, WedgeMedia=zmediaWedge1, SuccessMessage = "Great!  You earned a pie wedge!", IncorrectMessage = "That's incorrect.  Try another question.", GameOverMessage = "Guess you need to get out a dictionary.  Game Over." }
   table.insert(allQuestionGroups, qgroup)

A question group is created and assigned to the qgroup variable, which is then inserted into the allQuestionGroups list. I am using the qgroup variable name only because it's convenient shorthand when I begin adding questions. Yes, that could be optimized, but I chose to optimize for legibility. So, anyway, a question group contains all possible questions that can be asked when a player enters one zone. You have one question group per zone (per pie wedge). The question group keeps track of what zone it's for, the category's name, the questions themselves, the maximum number of attempts a player can make before seeing a game over screen, whether the question group is complete (answered successfully), the pie wedge media to show when awarding the wedge, the message to show if the player answers a question successfully, the message to show if the player answers a question incorrectly, and the message to show if the player gets a game over on this group. All items are required. Now, go back to that part where I said, "whether the question group is complete" (the code is Complete = not zoneCachingTerms.Active). I wrote it that way because I wanted players to be able to save and resume the cartridge. By definition, all inactive zones are marked as complete when the cartridge begins. Please keep that in mind.

 

The Questions

    table.insert(qgroup.Questions, { Type = "OA", IsAsked = false, Question = "What is the name of the oldest geocache in Kansas?", Answers = { "Mingo", "GC30" } })
   table.insert(qgroup.Questions, { Type = "MC", IsAsked = false, Question = "Which is the newest geocache type?", Options = { "Multi", "CITO", "Mystery" }, Answers = { "CITO" } })

Above are two questions being inserted into a question group. The first one is an "OA" type question, meaning "open-ended". The second one is "MC" for "multiple choice". You define your question type by using either "MC" or "OA". The next part, IsAsked, makes sure the question is asked only one time during a playthrough (this is not retained if the player saves and resumes the game). You should always set this to false unless you want to remove a question from play, but still retain the question in the code. The next part, Question, is what the player will be asked. If you are using a multiple choice question, you will have to define Options, which is a list of multiple choice answers for the cartridge to display. If you use more than three, keep in mind people using a Garmin Wherigo Player might not be savvy enough to know they can scroll to see additional answers (but if you want to be devious, that's up to you). The final item, Answers, is case-insensitive and needs a little additional explaining. For open-ended questions, it's possible someone playing your game might either not know how to spell something or might come up with an alternate, but correct, answer. As you can see in my example, I am accepting both the cache name and GC code for my open-ended question. You don't need to do this for multiple choice, of course, but it still has to be in the curly braces that denote you are using a list.

 

Zone Entry or Proximity - There's one last thing to note. Search for "lambda" (line 524 in the Greensboro cartridge). On the next line, I am setting all zone proximity/enter events. Within these cartridges, I have chosen to use OnProximity so there will not be an issue with the Garmin Wherigo Player having to zero out for OnEnter. If you would like to use OnEnter, you can change it here. This section of code was done as a shortcut to having to define the zones' events individually.

 

Miscellaneous

If you have any questions, please post them to this thread in the forum. I check it before I check email. I will fully support any issues with the code I wrote. I will also help you with your adaptation, but issues with my own code will take priority. Also, please be kind and patient. I am providing this cartridge to everyone free of charge and everything I do concerning Wherigo is volunteer, not compulsory. I want to help, so please be patient with me. Other community members can feel free to help answer questions. I certainly don't mind the assistance!

 

Finally, one last thing. The cartridge is provided to the community so long as any adaptations attribute me as the cartridge's original author. Consider it a thank you for the work I put into making it.

Link to comment

Where can we download the GWZ file? I don't see it available at either of the links you provided, unless I am missing something.

 

The .gwz file is the zipped package that contains the source code and media. Just go to one of the Wherigos and look for the "download source" link (in the left column at the Wherigo.com site).

 

Ranger Fox: Thanks for the code. I have my own idea for subject matter. Should I be successful in the project development, I will give you the credit you justly deserve and send a link.

Link to comment

 

The Questions

    table.insert(qgroup.Questions, { Type = "OA", IsAsked = false, Question = "What is the name of the oldest geocache in Kansas?", Answers = { "Mingo", "GC30" } })
   table.insert(qgroup.Questions, { Type = "MC", IsAsked = false, Question = "Which is the newest geocache type?", Options = { "Multi", "CITO", "Mystery" }, Answers = { "CITO" } })

Above are two questions being inserted into a question group. The first one is an "OA" type question, meaning "open-ended". The second one is "MC" for "multiple choice". You define your question type by using either "MC" or "OA". The next part, IsAsked, makes sure the question is asked only one time during a playthrough (this is not retained if the player saves and resumes the game). You should always set this to false unless you want to remove a question from play, but still retain the question in the code. The next part, Question, is what the player will be asked. If you are using a multiple choice question, you will have to define Options, which is a list of multiple choice answers for the cartridge to display. If you use more than three, keep in mind people using a Garmin Wherigo Player might not be savvy enough to know they can scroll to see additional answers (but if you want to be devious, that's up to you). The final item, Answers, is case-insensitive and needs a little additional explaining. For open-ended questions, it's possible someone playing your game might either not know how to spell something or might come up with an alternate, but correct, answer. As you can see in my example, I am accepting both the cache name and GC code for my open-ended question. You don't need to do this for multiple choice, of course, but it still has to be in the curly braces that denote you are using a list.

 

 

A quick question on syntax. I note in your questions in the source that some questions are enclosed in [[ . . . ]] while most are just quoted text " . . . ". Upon closer examination it seems that the questions in brackets contain internally quoted text. Any other significance or ramifications to these difference?

Link to comment

Any time I was going to use double quotes or line returns, I switched over to using square brackets. I did that because I didn't want people who read the source to have to worry about escaping quotes with a backslash. In the question bank section especially, I prioritized clean, succinct, easy to read code over anything else. In retrospect, I probably should have paid closer attention to consistency.

 

By the way, if anyone else has ideas for another arcade-type cartridge in the vein of Whack-A-Lackey, Battleship, and Cacher Pursuit, I've always been open to suggestions. If it seems like a fun idea, I'll write it.

Link to comment

 

Miscellaneous

If you have any questions, please post them to this thread in the forum. I check it before I check email. I will fully support any issues with the code I wrote. I will also help you with your adaptation, but issues with my own code will take priority. Also, please be kind and patient. I am providing this cartridge to everyone free of charge and everything I do concerning Wherigo is volunteer, not compulsory. I want to help, so please be patient with me. Other community members can feel free to help answer questions. I certainly don't mind the assistance!

 

 

Got my first chance to run the cartridge in the field on my iPhone app (Groundspeak version 340). For the most part it worked, but I had some issues with some of the questions. It seemed to happen mostly when I had missed a previous question. If the next question (another zone/category) was be a "fill in the blank" then, instead of allowing a typed input it would display the multiple choice options from the previous question, or, if the current question was a multiple choice, the choices from the previous question would be displayed. This also happened on the WhereYouGo app on an Android I was running in parallel, however, it turned out to be too cold to try and run both at the same time, so I turned off the Android.

 

The first time I ran it, I ended up dying due to the above issues. After it gave me the Failure message, it threw a LUA error -- I don't remember exactly the error message, but it said something like it could not point to "nil". The second time I ran it, the issues cropped up again, but I managed to get enough pie pieces to finish the game.

 

Next time I test I will take a few screen shots to assist in troubleshooting. Any other suggestions for testing like turning on logging? Not sure I know how to do that outside of Urwigo.

 

Thanks again for the opportunity to use this cartridge.

Link to comment
Got my first chance to run the cartridge in the field on my iPhone app (Groundspeak version 340). For the most part it worked, but I had some issues with some of the questions. It seemed to happen mostly when I had missed a previous question. If the next question (another zone/category) was be a "fill in the blank" then, instead of allowing a typed input it would display the multiple choice options from the previous question, or, if the current question was a multiple choice, the choices from the previous question would be displayed. This also happened on the WhereYouGo app on an Android I was running in parallel, however, it turned out to be too cold to try and run both at the same time, so I turned off the Android.

Can you reproduce this on the emulator? I have not had a chance to play it in the field after I removed the iOS-specific code. It's also possible your question's type is wrong. The accepted types are case-sensitive and are "OA" or "MC", with multiple choice being the default if it can't understand which type you chose. I'll admit in retrospect it was a dumb thing for me to make it default to multiple choice if it couldn't understand the type you gave it. (I have updated the source code to change this around.) Perhaps it should have thrown an error or something.

 

The first time I ran it, I ended up dying due to the above issues. After it gave me the Failure message, it threw a LUA error -- I don't remember exactly the error message, but it said something like it could not point to "nil". The second time I ran it, the issues cropped up again, but I managed to get enough pie pieces to finish the game.

This makes me wonder if the game over message was left out of the question group when it was defined. It could have been the media, but I think it's the message.

 

 

If you'd like to send me the block of code you're using to define your questions, I'm pretty sure I might see the issue there.

 

Alternatively, let me go over each part of defining a question again, just in case.

    qgroup = { Zone = zoneGeocachers, ID = 3, Category = "Geocachers", Questions = {}, MaxAttempts = 99, Complete = not zoneGeocachers.Active, WedgeMedia=zmediaWedge3, SuccessMessage = "All right!  Looks like you know some names!  You got a pie wedge!", IncorrectMessage = "Not quite.  See if you can answer another question.", GameOverMessage = "You might need to drag out a Who's Who before trying again.  Game Over." }

 

For the question group, qgroup, you have the following items. You don't need to add the ones that I say aren't used. They're left in the code because I was considering using them for something at the time I created the cartridge.

  • Zone - The zone object with which you're associating this question group.
  • ID - Not used. You can leave this off and it won't hurt anything.
  • Category - Not used. This was to be the category's name. I would suggest you continue using it because I can see a future version of the cartridge would name the zone for the category name you provide here.
  • Questions - In this section, it is always {} because it defines a table we will use to store the category's questions.
  • MaxAttempts - The maximum number of attempts a person can make to get a right answer in this category. It's game over if MaxAttempts is reached OR all the questions have been asked, whichever comes first. In my cartridge, I have it set to 99, which means the player has to fail all questions in a category to get a game over message. I'm very lenient because so very few people in my area play Wherigo.
  • Complete - This is always set to "not <zone name>.Active". So if your zone is "zoneGeocachers", it will be not zoneGeocachers.Active. This is important so people can save the game and pick up where they left off. If you were to set this to false, the player must answer all questions again when the cartridge is resumed.
  • WedgeMedia - This is so you can show a picture of a pie wedge. When the player is awarded the pie wedge, this media is used. I think you can set it to nil if you want, but I haven't tested that.
  • SuccessMessage - When the player gets a question right for this category, this is the message he or she will see. It's accompanied by the WedgeMedia picture.
  • IncorrectMessage - When the player gets a question wrong for this category, this is the message he or she will see. It is not accompanied by a media.
  • GameOverMessage - When the player has exhausted all questions for this group or MaxAttempts is reached, this message will be shown instead of IncorrectMessage. It is accompanied by zmediaGameOver, defined as GameOverMedia in the section I set aside for customization. In retrospect, I should have given you an option to set a specific media per question group. If you download the cartridge after I made this forum reply, you will see I implemented GameOverMedia.

 

 

For the individual questions, here are two examples:

table.insert(qgroup.Questions, { Type = "MC", IsAsked = false, Question = "Who was the number one geocacher in the world around 2006?", Options = { "Team Alamo", "Bobcam", "CCCooperAgency" }, Answers = {"CCCooperAgency"} })
table.insert(qgroup.Questions, { Type = "OA", IsAsked = false, Question = "What is the name of the oldest geocache in Kansas?", Answers = { "Mingo", "GC30" } })

  • Type - This is the type of question to ask. The accepted case-sensitive values are "MC" or "OA". "MC" means "multiple-choice" and "OA" means "open answer" (that's a mistake on my part because I believe the right thing to do is use "OE" for "open-ended"). The version of the cartridge anyone downloaded before I made this reply will default to multiple-choice if it cannot understand the question type you are using.
  • IsAsked - This is always false unless you don't want to use a particular question. This tells the code if that question has been asked.
  • Question - The text for the question. This is whatever you want to ask the player.
  • Options - If you are asking a multiple-choice question, these are the possible answers. They are encased in squiggly braces because that's how you tell the code something is a list.
  • Answers - This is a list of acceptable answers, again encased in squiggly braces. The answers are case-insensitive. I acknowledge there might be more than one answer to a question, you might want to accept some common misspellings for leniency, or it's possible the player might use an abbreviation or spell out a word. Whatever the case, you can accept more than one correct answer.

 

(I added the question about CCCooperAgency because I miss her being in the game. She was a wonderful lady and played geocaching when it was hard to find a lot of caches. I have had the honor of meeting her several times, caching with her a few, and even staying over at her house for a few days while we cached together in her area. She was a wonderful person to have hold the #1 spot, really good for PR. I've actually been able to cache with a few of the higher-ups in geocaching over the years, which has been fun, but of them all, I have the most respect for her. I'm not that far down in the rankings, either, currently #16 in the world. Oh, the stories I can tell and places I've been! Anyway, I just wanted to stay I miss her.)

Link to comment
Got my first chance to run the cartridge in the field on my iPhone app (Groundspeak version 340). For the most part it worked, but I had some issues with some of the questions. It seemed to happen mostly when I had missed a previous question. If the next question (another zone/category) was be a "fill in the blank" then, instead of allowing a typed input it would display the multiple choice options from the previous question, or, if the current question was a multiple choice, the choices from the previous question would be displayed. This also happened on the WhereYouGo app on an Android I was running in parallel, however, it turned out to be too cold to try and run both at the same time, so I turned off the Android.

Can you reproduce this on the emulator? I have not had a chance to play it in the field after I removed the iOS-specific code. It's also possible your question's type is wrong. The accepted types are case-sensitive and are "OA" or "MC", with multiple choice being the default if it can't understand which type you chose. I'll admit in retrospect it was a dumb thing for me to make it default to multiple choice if it couldn't understand the type you gave it. (I have updated the source code to change this around.) Perhaps it should have thrown an error or something.

 

The first time I ran it, I ended up dying due to the above issues. After it gave me the Failure message, it threw a LUA error -- I don't remember exactly the error message, but it said something like it could not point to "nil". The second time I ran it, the issues cropped up again, but I managed to get enough pie pieces to finish the game.

This makes me wonder if the game over message was left out of the question group when it was defined. It could have been the media, but I think it's the message.

 

 

If you'd like to send me the block of code you're using to define your questions, I'm pretty sure I might see the issue there.

 

 

My first thought was that the type was wrong -- maybe I hosed it up when I was working on it -- but I verified that they seemed to be correct. I am using most of the questions from your code -- I added a few which would make sense for local cachers and deleted some that were specific for North Carolina. The problem, IIRC, were all with questions that I did not change. I did not edit anything other than the questions themselves and the options/answers. It seemed to be something like a buffer not being cleared, since the incorrect options were from a previously asked question. I ran the cartridge on the webwigo emulator several times without errors although I could not get to the end of the game due to your demo mode checks.

 

I am attaching the entire questions section of the code. Thanks for any suggestions.

Link to comment

I downloaded the source the other day to snoop around. I've created many cartridges but never really caught on the custom code side of Wherigos. This cartridge gave me a nice understanding of how it works.. even though I have background in software development, I originally did not find the concept very intuitive so never put much effort into it (or maybe I am just getting lazy in my old age). Now knowing how easy it is, what I can accomplish has changed dramatically. Thanks for all of the work you, this forum, and the foundation have done for us.

Link to comment

I updated all public versions of the cartridge. This fixes the game over screen and an issue involving switching between question types on some player apps.

 

If you have a previous version of the code, here's what to do to update what you have. First, open the cartridge's lua file in a text editor, such as notepad.

 

Search for the following text: "zinputQuestion.Choices = nil" (it only appears once). You will see it begins with two dashes ("--"). Remove those two dashes.

 

Next, search for the text "GameOver(zone)". That line begins with "function" and is intended until the word "end" about a dozen lines later. Replace all that with this (just copy and paste):

function GameOver(zone)
   local qgroup = FindQuestion(zone)
   if qgroup ~= nil then
       Wherigo.MessageBox{Text=qgroup.GameOverMessage,Media=qgroup.GameOverMedia,}
   end

   for x=1, #QuestionBank do
       QuestionBank[x].Zone.Active = false
   end

   CurrentQuestionGroup = nil
end

 

IMPORTANT: If you have an even older version of the cartridge where you don't assign a picture to each question group's game over screen, you'll need to adjust one of the lines above. Where it says "Media=qgroup.GameOverMedia", change that to "Media=GameOverMedia".

 

That's it. You're updated. If you have any other difficulties, please let me know.

Link to comment

I downloaded the source the other day to snoop around. I've created many cartridges but never really caught on the custom code side of Wherigos. This cartridge gave me a nice understanding of how it works.. even though I have background in software development, I originally did not find the concept very intuitive so never put much effort into it (or maybe I am just getting lazy in my old age). Now knowing how easy it is, what I can accomplish has changed dramatically. Thanks for all of the work you, this forum, and the foundation have done for us.

I really appreciate that, bflentje. I showed one of my coworkers this on Thursday.

 

When you get the Minnesota one published, let me know the GC code so I can read the logs along with you. There are very few people in my area who play Wherigo, so I don't see many logs on anything I put out. If it's not a traditional cache, it's largely ignored by all but the major players.

Link to comment

I updated all public versions of the cartridge. This fixes the game over screen and an issue involving switching between question types on some player apps.

 

If you have a previous version of the code, here's what to do to update what you have. First, open the cartridge's lua file in a text editor, such as notepad.

 

Search for the following text: "zinputQuestion.Choices = nil" (it only appears once). You will see it begins with two dashes ("--"). Remove those two dashes.

 

Next, search for the text "GameOver(zone)". That line begins with "function" and is intended until the word "end" about a dozen lines later. Replace all that with this (just copy and paste):

function GameOver(zone)
   local qgroup = FindQuestion(zone)
   if qgroup ~= nil then
       Wherigo.MessageBox{Text=qgroup.GameOverMessage,Media=qgroup.GameOverMedia,}
   end

   for x=1, #QuestionBank do
       QuestionBank[x].Zone.Active = false
   end

   CurrentQuestionGroup = nil
end

 

IMPORTANT: If you have an even older version of the cartridge where you don't assign a picture to each question group's game over screen, you'll need to adjust one of the lines above. Where it says "Media=qgroup.GameOverMedia", change that to "Media=GameOverMedia".

 

That's it. You're updated. If you have any other difficulties, please let me know.

 

Thanks for the update. iPhone app seems happy now. Cache has been submitted for review. Will send you a link when it is published.

Link to comment

Hey RangerFox I'm interested in doing a VA version (Northern VA area) of Cacher Pursuit. It looks like a really fun Wherigo!

 

I have not used an author script before in the Earwigo builder, but I assume that I can make the changes to the questions, save and it should run as it should? Or are there additional steps necessary? I have tinkered with installing various author scripts in Earwigo in the past, it never seems to work in my hands...then again, I'm not a programmer. :)

Link to comment

If you don't rename the zones or cartridge, you might not run into a few finicky problems. I don't remember the exact details of Earwigo's obfuscation implementation, so I'd caution against using that to protect the cartridge. I have my own protection in the cartridge, which I outlined above, mentioning the demo mode where people using an emulator can only view a couple questions (the number is user-defined).

 

Just follow the instructions I laid out and you should be fine. Either way, I'm here to help. If you break it, I can fix it. Also, if I have some free time, I could probably implement the questions for you, if you'd like. I have a couple other things lined up this week, but I might be able to get that done as well. Of course, it's better to ask you to make an honest effort first, as we all learn best by doing.

 

(I should really set aside some time to implement this in Wherigo\\kit... I'm just not looking forward to the thirty or forty hours it's going to cost me.)

Link to comment

I don't remember the exact details of Earwigo's obfuscation implementation

 

Appears to just be a bit-swap algorithm.

I'll be more specific, then. I know it's a bit swap and I know how the bit swap works and some limitations as I attempted to implement the same in Wherigo\\kit. I succeeded for the English character set, but could not guarantee it would work 100% with other character sets--almost can't be good enough--so ended up pulling it.

 

What I meant was I didn't know if Earwigo would also obfuscate object and cartridge names in the same fashion as Urwigo. If that was the case, a few places where the cartridge object and the final zone were referenced would have to be updated to whatever obfuscated variable name is assigned to them. To be more specific, the object names aren't actually obfuscated. It seems as if they're assigned just random upper and lower case characters. As for Cacher Pursuit, there's a spot to provide an object reference to the final zone, but I don't remember if I provided one for the cartridge as I would have done so only in a recent update.

 

As CWillyPngn wasn't a programmer, I didn't want to get into specifics as I felt doing so would have detracted from my reply. I try to communicate at whatever level would most the most sense to the recipient. I am happy, though, there are some people who would encourage me to be a little more specific or share additional knowledge when I might be unaware. That's good. Very good.

Link to comment

I don't remember the exact details of Earwigo's obfuscation implementation

 

Appears to just be a bit-swap algorithm.

I'll be more specific, then. I know it's a bit swap and I know how the bit swap works and some limitations as I attempted to implement the same in Wherigo\\kit. I succeeded for the English character set, but could not guarantee it would work 100% with other character sets--almost can't be good enough--so ended up pulling it.

 

What I meant was I didn't know if Earwigo would also obfuscate object and cartridge names in the same fashion as Urwigo. If that was the case, a few places where the cartridge object and the final zone were referenced would have to be updated to whatever obfuscated variable name is assigned to them. To be more specific, the object names aren't actually obfuscated. It seems as if they're assigned just random upper and lower case characters. As for Cacher Pursuit, there's a spot to provide an object reference to the final zone, but I don't remember if I provided one for the cartridge as I would have done so only in a recent update.

 

As CWillyPngn wasn't a programmer, I didn't want to get into specifics as I felt doing so would have detracted from my reply. I try to communicate at whatever level would most the most sense to the recipient. I am happy, though, there are some people who would encourage me to be a little more specific or share additional knowledge when I might be unaware. That's good. Very good.

 

Sorry, that was not meant as a challenge. You've helped me tremendously and would never think to violate that. It was just a passing comment.

Link to comment

If you don't rename the zones or cartridge, you might not run into a few finicky problems. I don't remember the exact details of Earwigo's obfuscation implementation, so I'd caution against using that to protect the cartridge. I have my own protection in the cartridge, which I outlined above, mentioning the demo mode where people using an emulator can only view a couple questions (the number is user-defined).

 

Just follow the instructions I laid out and you should be fine. Either way, I'm here to help. If you break it, I can fix it. Also, if I have some free time, I could probably implement the questions for you, if you'd like. I have a couple other things lined up this week, but I might be able to get that done as well. Of course, it's better to ask you to make an honest effort first, as we all learn best by doing.

 

(I should really set aside some time to implement this in Wherigo\\kit... I'm just not looking forward to the thirty or forty hours it's going to cost me.)

 

Thanks RangerFox. I'll keep that in mind not to tinker beyond the instructions that you laid out for me in the source code. I would like to give it a shot and see how it turns out. It looks very straightforward and hopefully I will learn a thing or two about coding. :) I still have to generate some questions mostly geared around the geocaching theme that you have already implemented. I would love to make one wedge specific to the State or to the local geocaching community. I will let you know how it turns out.

Link to comment

Just submitted my first use of the Open-Source Wherigo cartridge. "Hasta la vista, baby." You guessed it, Terminator Trivia. Does replacing the Poster media with my own violate the Creative Commons agreement?

 

Cache listing image..

55a1b25d-eddd-4fbf-8e0f-f8310d8eb0c4.jpg

Edited by bflentje
Link to comment

Just submitted my first use of the Open-Source Wherigo cartridge. "Hasta la vista, baby." You guessed it, Terminator Trivia. Does replacing the Poster media with my own violate the Creative Commons agreement?

 

Cache listing image..

55a1b25d-eddd-4fbf-8e0f-f8310d8eb0c4.jpg

Nah, replacing the poster doesn't. I'm not upset.

 

And if you don't want a cartridge released initially as open source, you could open source it later, after the locals have had their run with it.

 

Time for me to watch for logs! My first two cartridges for Cacher Pursuit won't get anything interesting. The one I placed in the desert will get a lot of copy and paste logs, denoting everyone's run and not anything about their experience with the cartridge. The one I placed closer to home won't get a lot of logs because hardly anyone plays Wherigo around me, making me the anomaly. My reward for putting something out is reading the logs. I've made some rather epic logs, too, for caches I liked or where a whole lot happened.

 

Once you saw what I was doing with the cartridge, I hope it was fairly easy to change it around to what you wanted? That was my intent. Was there anything missing regarding personalizing your own version that you'd like to have seen? (Just some self-improvement questions. You can only improve so much without feedback.)

 

 

Edit: The thought of causalities from a cartridge of mine gives me an evil grin.

Edited by Ranger Fox
Just to be silly
Link to comment

Just submitted my first use of the Open-Source Wherigo cartridge. "Hasta la vista, baby." You guessed it, Terminator Trivia. Does replacing the Poster media with my own violate the Creative Commons agreement?

 

Cache listing image..

55a1b25d-eddd-4fbf-8e0f-f8310d8eb0c4.jpg

Nah, replacing the poster doesn't. I'm not upset.

 

And if you don't want a cartridge released initially as open source, you could open source it later, after the locals have had their run with it.

 

Time for me to watch for logs! My first two cartridges for Cacher Pursuit won't get anything interesting. The one I placed in the desert will get a lot of copy and paste logs, denoting everyone's run and not anything about their experience with the cartridge. The one I placed closer to home won't get a lot of logs because hardly anyone plays Wherigo around me, making me the anomaly. My reward for putting something out is reading the logs. I've made some rather epic logs, too, for caches I liked or where a whole lot happened.

 

Once you saw what I was doing with the cartridge, I hope it was fairly easy to change it around to what you wanted? That was my intent. Was there anything missing regarding personalizing your own version that you'd like to have seen? (Just some self-improvement questions. You can only improve so much without feedback.)

 

 

Edit: The thought of causalities from a cartridge of mine gives me an evil grin.

 

You're work was wonderful and which made it amazingly easy to work with. My biggest obstacle was only myself, having not paid attention to the few places where you access object names after I'd renamed some zones. Debugging eliminates that problem. I will keep playing with the code base and offer up ideas and suggestions as I plan a couple of others. But I have to say that you really covered a lot of the important ideas up front. One potential issue is getting the zones to fire. At least in the emulator, I found that I had to wander around the zone a bit before they would fire. I have not had time to see how you coded the event and for all I know, it could be a function of the emulator itself.

 

ONE THING I could see, that would benefit someone with plans to do more than a few, make the zone names generic so that every new version they don't have to be updated. A variable in the code could hold a description you want to add to the zone during runtime.

Link to comment
One potential issue is getting the zones to fire. At least in the emulator, I found that I had to wander around the zone a bit before they would fire. I have not had time to see how you coded the event and for all I know, it could be a function of the emulator itself.
The zones are using OnProximity, which has that effect in the emulator. I used OnProximity over OnEnter to retain Garmin compatibility because, for Garmins, OnEnter usually means zeroing out--and that's just plain ridiculous.

 

ONE THING I could see, that would benefit someone with plans to do more than a few, make the zone names generic so that every new version they don't have to be updated. A variable in the code could hold a description you want to add to the zone during runtime.
That's an idea. I could do that over the weekend. That's a lot easier to implement than the other thing I needed to get done: add this as a cartridge type to Wherigo\\kit. (I'm balking at that because I've been feeling lazy for a while, which really is just because I've been doing too much at both work and other projects.)
Link to comment

Hi Ranger Fox, nice work and great that you share this with us.

 

First of all: I made a local adaptation that will be published on geocaching.com KK3M1 : Archimedes' Pursuit (GC6ECM1) on Monday, Oct 10 (the review has been done but it waits to be published together with the rest of the series for the event http://coord.info/GC6AABZ of next Saturday). The questions relate to the Greek theme of the event and are on Greek islands, philosophers, gods, history, science and food. The adaptation was a breeze thanks to your fine documentation. Great work especially because I had a tight schedule to deliver a new cartridge for the event. Again, thanks a lot!

 

Secondly, I think I found two glitches in your current version (I started from the source cacher_pursuit_-_y.gwz).

 

The first is just a minor one. I noticed when testing it again and again, it always asks the questions in the same order (if you also do everything in the same order). I think that is because you did not seed the random function. I suggest you could insert a math.randomseed(os.time()) after the Init() call in cartArchimedesPursuit:OnStart()

 

The second is a true bug. I noticed that you could get the same question again after failing it. Especially combined with the previous glitch this gives you the same questions when stress tested (repeating the same order and mistakes again and again) even though you are setting the CurrentQuestion.IsAsked = true in the AskQuestion() function.

The bug sits in the same AskQuestion() function in the previous line: CurrentQuestion = qgroup.Questions[x]

 

This must be: CurrentQuestion = qgroup.Questions[unaskedQuestions[x]]

 

You collect in the table unaskedQuestions every index of unasked questions of qgroup but you only used the number of indexes to generate a random number, but then use that random number directly as an index in the qgroup.Questions table instead of using the index number collected in the unaskedQuestions table...

 

I changed those two in my version and it works fine. Could you confirm me observations or point to something I overlooked?

Link to comment

I ran out of time tonight to look at this and implement your suggestions. For some reason, I usually forget to seed the RNG. As for the unasked question array, I think you're right about that mistake.

 

Once I address something asked to me via email, I'll begin working on this. I should be getting my free time back shortly.

Link to comment

Okay.

 

This is my current list:

  • Someone can't edit a log on the WF site. Due immediately.
  • Find 250 additional miles of roads in the desert. Finalize plans. Due Wednesday evening, one week before the run.
  • Private item. Due Wednesday evening.
  • Update the Cacher Pursuit master code. Due by end of week.

 

I thought I finished the first one yesterday, but the fix didn't work. I can't reproduce it with any of my accounts, so I think this is going to take a while.

Link to comment

Hi

 

I wanted to made some changes to the awesome cartridge - just add an image for each question ... should be easy enough I thought; unfortunately I'm stuck: could you please advise on how to change the code to implement this feature.

 

Thanks a lot.

Link to comment

I updated the cartridge's source code so each question can accept a media object or nil. I also fixed a bug where a previously-asked question could be asked a second time (it would also heavily weight towards the first questions instead of the last).

 

You can download either the Greensboro, NC or the Yerington, NV version. I keep both updated. As the Wherigo site did not post my version change in the release notes, I added a note for the cartridges and caches to say what changed.

 

Enjoy, thilo.lu. I remember you were also interested in my Battleship cartridge. Hope you've been well, have been having fun, and have a few more stories to tell.

Link to comment

I updated the cartridge's source code so each question can accept a media object or nil. I also fixed a bug where a previously-asked question could be asked a second time (it would also heavily weight towards the first questions instead of the last).

 

You can download either the Greensboro, NC or the Yerington, NV version. I keep both updated. As the Wherigo site did not post my version change in the release notes, I added a note for the cartridges and caches to say what changed.

 

Enjoy, thilo.lu. I remember you were also interested in my Battleship cartridge. Hope you've been well, have been having fun, and have a few more stories to tell.

Hey Ranger Fox. This sounds like a very cool Wherigo idea. I'd love to put one out in my area.

Link to comment
Hey Ranger Fox. This sounds like a very cool Wherigo idea. I'd love to put one out in my area.

Feel free. Let me know the GC when you do so I can enjoy reading the logs as well.

 

One of the other ideas I had and made a cartridge for was Tetris. Unfortunately, the player apps aren't ready for something like that. Some of the apps will croak when the 200+ zones are created, some show only a pin on the map for a zone instead of showing the zone's shape (this makes playing the game more of a challenge), and some don't update their map at all until you click out and revisit the map. The good news is Groundspeak's emulator and Webwigo can play it. If you're wondering about the 200+ zones, I had a decision to make: move zones every time a tetromino is moved in the well or make the game board into a giant LED screen, toggling zones on and off like LEDs to make the tetromino appear to fall. I chose the latter because I believed once the zones were set up, toggling their active states would perform better.

Link to comment
Hey Ranger Fox. This sounds like a very cool Wherigo idea. I'd love to put one out in my area.

Feel free. Let me know the GC when you do so I can enjoy reading the logs as well.

 

One of the other ideas I had and made a cartridge for was Tetris. Unfortunately, the player apps aren't ready for something like that. Some of the apps will croak when the 200+ zones are created, some show only a pin on the map for a zone instead of showing the zone's shape (this makes playing the game more of a challenge), and some don't update their map at all until you click out and revisit the map. The good news is Groundspeak's emulator and Webwigo can play it. If you're wondering about the 200+ zones, I had a decision to make: move zones every time a tetromino is moved in the well or make the game board into a giant LED screen, toggling zones on and off like LEDs to make the tetromino appear to fall. I chose the latter because I believed once the zones were set up, toggling their active states would perform better.

I've got it. Thanks. I will have to wait awhile to work on this though. My laptop crapped out recently and I had to buy a new one.

Edited by Sherminator18
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...