Sign in to follow this  
Followers 3
inkasso

Looking for a programmers guide for building a Wherigo

17 posts in this topic

I've seen the Wherigo Builder and Urwigo. As I already develop software for Windows, they both are a real pain to me.

 

Is there any guide showing me, how to build cartridges from scratch by using a simple text editor? I think this would save me a lot of time and headaches.

 

Any help would be appreciated.

Thanks a lot!

 

inkasso

0

Share this post


Link to post

I've seen the Wherigo Builder and Urwigo. As I already develop software for Windows, they both are a real pain to me.

 

Is there any guide showing me, how to build cartridges from scratch by using a simple text editor? I think this would save me a lot of time and headaches.

 

Any help would be appreciated.

Thanks a lot!

 

inkasso

I have made a small Wherigo course step by step with tips and trix. Send me a mail with your mailadress and I will connect you to my dropbox where I have the 7 page course. I have 25 pupils in sweden which are connected to the swedish version. I have 6 Wherigo in operation, here is one http://www.geocaching.com/seek/cache_detai...6c-6ac244cfb42d

j-annie

0

Share this post


Link to post

j-annie tried to help me with a guide how to use the Wherigo builder.

 

I thank you for the attempt. But this is not an option. No Wherigo builder and no Urwigo. I just need a guide to LUA in connection with the limitations and dependencies for Wherigo cartridges. Then I'll code it using some text editor. This will be much faster and easier to me than any of those "click, drag and drop"-GUIs.

 

Any suggestions in this direction?

0

Share this post


Link to post

I thibk you're in for some evenings of reverse engineering. :mad:

0

Share this post


Link to post

Hi J-Annie

I am in the process of producing a Wherigo cache for an event on the 4/5th Dec 2010. I am having a few hiccups with tasks etc. Can you forward to me your course with tips and trix? It may be very helpful at the moment as time is running out for me.

Regards,

troo1@bigpond.com

Gil aka (troobloo)

0

Share this post


Link to post

j-annie tried to help me with a guide how to use the Wherigo builder.

 

I thank you for the attempt. But this is not an option. No Wherigo builder and no Urwigo. I just need a guide to LUA in connection with the limitations and dependencies for Wherigo cartridges. Then I'll code it using some text editor. This will be much faster and easier to me than any of those "click, drag and drop"-GUIs.

 

Any suggestions in this direction?

Find open source cartridges, download their code, and look at them. At the moment, there isn't a way to search for open source cartridges, so you'll just have to look at each cartridge listing until "Download source" appears at the bottom of the left column.

 

While I share your sentiment that coding can usually be faster than clicking around in the GUI, some of the more elementary things can be done faster in the GUI and with less errors, such as object creation. When I create a cartridge, I typically go back and forth between the Builder and the lua script file, depending upon what I want to do.

0

Share this post


Link to post

Finally some replys :rolleyes:

 

I know how to develop software. As I tried to "click" my first Wherigo, the first problems arose quite fast. Besides getting lost in dozens of screens in which there is no way in determining when the displayed part of the program will run (keyword: call stack) I learned very fast, that I would have no chance in recycling parts that would probably come in handy more often (keyword: functions, methods).

 

Another problem I already learned of is a bug in the Oregon Wherigo player which doesn't work with onClick-Events. Why is there no Text-based approach to Wherigo? I would expect this to be the first step - before any GUI-based approach would be provided.

0

Share this post


Link to post
Besides getting lost in dozens of screens in which there is no way in determining when the displayed part of the program will run (keyword: call stack)

There is no call stack, or at least, nothing that need to worry about or can do anything about. Everything is an event handler. The player does something, and an event handler runs. When I was studying computer science (1979-1981), a language called Simula came up quite a lot - it was all about cooperative multitasking/multithreading. It was hard for someone who had been brought up (since... 1975) on Fortran and Algol to understand, but it prepared me nicely for the first time I had to program a Macintosh. Lua is from the same family, and Wherigo builds on Lua's cooperative multitasking/multithreading capabilities, albeit without actually calling the yield routines from the cartridge code directly.

 

I learned very fast, that I would have no chance in recycling parts that would probably come in handy more often (keyword: functions, methods).

Yes, the Builder's "exact opposite of object-oriented" approach can result in doing a lot of things 10 times, with the obvious resultant problems of updating all 10 when something changes. My builder (Earwigo) doesn't have methods as such, although you can make Lua equivalents in the (syntax-checked!) Author Script window, but it does have recyclable (write once, use many times) functions and conditional expressions.

 

Why is there no Text-based approach to Wherigo? I would expect this to be the first step - before any GUI-based approach would be provided.

Only Groundspeak could answer that, and I'm not going to bet next month's paycheck on them doing so. I'm guessing that it's because, while you can program, and you know that whatever you're doing with all the clicking you're really writing code, and so do I, and so does Ranger Fox, and so do a couple of hundred other people, still, 99.9% of the people whom Groundspeak hopes will write a Wherigo cartridge, will never learn (or have any interest in learning) the syntax of Lua - indeed, if they thought that they had to, they would spend the hours required placing lame microcaches instead. That's why the GUI approach was provided. Indeed, one of the main things that people complain about here is that the GUI in the Builder is to hard to understand, for non-programmers.

0

Share this post


Link to post

There is no call stack, or at least, nothing that need to worry about or can do anything about. Everything is an event handler. The player does something, and an event handler runs. When I was studying computer science (1979-1981), a language called Simula came up quite a lot - it was all about cooperative multitasking/multithreading. It was hard for someone who had been brought up (since... 1975) on Fortran and Algol to understand, but it prepared me nicely for the first time I had to program a Macintosh. Lua is from the same family, and Wherigo builds on Lua's cooperative multitasking/multithreading capabilities, albeit without actually calling the yield routines from the cartridge code directly.

 

I just want an easy way of seeing, which part of the "code" will run in what order. This is why I mentioned the keyword "call stack". I am capable of multithreaded programming. Events don't scare me off :laughing:

 

Yes, the Builder's "exact opposite of object-oriented" approach can result in doing a lot of things 10 times, with the obvious resultant problems of updating all 10 when something changes. My builder (Earwigo) doesn't have methods as such, although you can make Lua equivalents in the (syntax-checked!) Author Script window, but it does have recyclable (write once, use many times) functions and conditional expressions.

Well that would be nice if there is at least somewhere a reference for the programming language (which should respect the limitation of all official Wherigo players).

 

Only Groundspeak could answer that, and I'm not going to bet next month's paycheck on them doing so. I'm guessing that it's because, while you can program, and you know that whatever you're doing with all the clicking you're really writing code, and so do I, and so does Ranger Fox, and so do a couple of hundred other people, still, 99.9% of the people whom Groundspeak hopes will write a Wherigo cartridge, will never learn (or have any interest in learning) the syntax of Lua - indeed, if they thought that they had to, they would spend the hours required placing lame microcaches instead. That's why the GUI approach was provided. Indeed, one of the main things that people complain about here is that the GUI in the Builder is to hard to understand, for non-programmers.

 

That was not what I wanted to propose. Every programming starts with code which is compiled oder interpreted. After this level is developed, a GUI is usually set on top for those who cannot write code by themselves. So there should be possible to write code instead of clicking GUI.

0

Share this post


Link to post
Well that would be nice if there is at least somewhere a reference for the programming language (which should respect the limitation of all official Wherigo players).

As far as I know there's no API guide to the Wherigo.xxx() functions and the data structures.

 

That was not what I wanted to propose. Every programming starts with code which is compiled oder interpreted. After this level is developed, a GUI is usually set on top for those who cannot write code by themselves. So there should be possible to write code instead of clicking GUI.

I understood what you wanted; I was just telling you that Groundspeak chose not to do it. :laughing: You'd have to ask them why not, but I'm guessing it's because they took one look at how hard it is for non-programmers to write Lua code and said "we need a GUI-based builder".

 

If Wherigo had really taken off, it would have been documented by now. It needs a little injection of energy to counteract all the entropy which has accumulated.

Edited by sTeamTraen
0

Share this post


Link to post

At the moment, there isn't a way to search for open source cartridges, so you'll just have to look at each cartridge listing until "Download source" appears at the bottom of the left column.

 

Advanced Search, set Search Type to 'Keyword Search', enter keyword 'source'.

Or go to http://www.Wherigo.com/search/results.aspx?&sname=source&stype=7

Unfortunately, this does not display all open source cartridges. At the very least, mine are missing.

 

Even if I kept a bookmark list on geocaching.com or off site, the list would not be comprehensive because cartridge authors can change their cartridges' source control settings at any time.

 

As I've said before, chalk up another thing I'd like to do if I had to keys to the kingdom.

0

Share this post


Link to post

It actually isn't to hard to figure out. The lack of a formal API means you have to do some reverse engineering as Ranger Fox suggests. You will soon discover that the Lua code consists of a chunk that defines the objects in your cartridge (including the cartridge object) and the event handlers that will be invoked when certain events occur. The Lua chunk is invoked when the cartridge is loaded. The code in the handlers is invoked when the event takes place.

 

The Lua Wherigo class defines the methods that are called to construct the objects in your cartridge: cartridge, zones, zone points, characters, items, commands, inputs, timers, etc.; and provides some methods to invoke the capabilities or the Player from your event handlers: display message box, display dialog, display user input dialog, play sounds, save cartridges, compute distances, etc.

 

The Wherigo builder wiki has most of the information. I don't know why this isn't more active. Surely the people who have built Builders or Players have discovered more about these items and could be adding to the wiki.

0

Share this post


Link to post

Also working on my Wherigo degree having fun debugging and looking a Lua code to add more functionality to my programs. It would be nice to see a finalized working version dedicated to Wherigo using Urwigo.

0

Share this post


Link to post

I came in today looking for more information about Wherigo inner workings and this topic is probably closest to what I was hoping for. But. In all this time nobody has documented the lua file format and structure? Must every new candidate-maker reinvent the wheel and learn (reverse engineer) everything from scratch?

> If Wherigo had really taken off...

How can it when we encounter anchors dragging us down, blockades at every corner, and a paucity of the most fundamental information? How on earth can we get past the starting line if somebody sticks their foot out and trips us up before we can hit our stride?

Don't misunderstand me. This is not a plea for sTeamTraen and/or Ranger Fox to make public everything they've gleaned from their efforts.

Rather, this is to point out that whatever Wherigo's progress has been to date, Groundspeak must surely recognize by now that it's not going to go away. As such, they should take a serious look at updating their builder software. Failing that, which is much more likely, they should release the lua specs as well as the API guide - to use the term used above - to the Wherigo.xxx() functions. I mean, holy moly guys, this isn't a matter of national security. It's just a file format and a few calls to help make our lives a bit easier.

And still... if you don't want to give this info to everybody - tho I don't see why not - then surely sTeamTraen and/or Ranger Fox and whoever made urwigo have earned their stripes. Hand it to them under a non-disclosure agreement and let them get on with their work.

One last word before I step down from my soap-box. This obstructionist policy accomplishes one thing only: it obstructs geocachers from playing the game. And when there's too many obstructions, people will just go play hide and seek with painted rocks.

I don't particularly need response or explanations. Seeing the lua specs would be answer enough for me. Without them, additional discussion is pretty futile.

Cheers,

 

0

Share this post


Link to post

Well, there's the Wherigo wiki you can update and there's this programming reference guide I found by searching on Google for thirty seconds.  (I'd sure like to import the reference guide to the wiki...)

I can't speak for everyone, but I suspect it's the same.  We didn't create a programming reference for the community because what references we created were just scribbled notes as we were creating our own projects, and we were focused upon that as a goal.  When I created Kit's linear Q&A kit, I started by creating a cartridge using Groundspeak's builder, then made sure Kit output the same thing.  In creating my arcade cartridges like Whack-A-Lackey, Battleship, Cacher Pursuit, and Tetris, I used Groundspeak's builder to output what objects I needed, then used my programming experience to poke around and try things out.  When I needed to reference lua syntax, I consulted the lua 5.1 reference manual.  All cartridges save Tetris are open source.  I will not open source Tetris because the player apps need to be improved, and I don't want people creating Tetris derivatives, expecting everything to work well in the player apps.  I've seen some documentation others created over the years, but it always seemed in pursuit of other projects.

In short, I don't have any notes on the Wherigo API, private or public.  Had I been able to work with Groundspeak to continue Wherigo's development, the Wherigo Foundation would have had to produce API documentation as a side effect of communicating with each other concerning the changes we were proposing and making to the API.  And I did request from Groundspeak the API documentation they provided to Garmin during that collaboration, but I was told it was confidential (and they'd have to look for it).  Even if I had a partnership with Groundspeak, I and the group I'd create (the Wherigo Foundation) could not expect support.

I believe whatever obstructionist policy you are observing is more of a symptom than an intentional cause.  I believe it's due to everyone working on their own projects: they find things out for themselves, learn, and then create what they set out to create.  If you don't find convenient documentation, it's just because no one decided to make that their project.  Then again, I might not know of documentation beyond a web search.  I can't keep up with everything.

 

Anyway, this isn't supposed to be in defense of anything.  I'm sharing my thoughts and point of view.  Do you feel it worthwhile for someone to spend time absorbing that reference guide link into the Wherigo wiki?  Would it be sufficient just to link to that page from my signature line?  What additional presentation would help for the documentation?  Who would take the responsibility of maintaining it?  Would you like to volunteer to help with something?

2

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 3