Sign in to follow this  
Followers 1
inkasso

Looking for a programmers guide for building a Wherigo

14 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

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 1