Jump to content

davidloew

+Premium Members
  • Posts

    169
  • Joined

  • Last visited

Posts posted by davidloew

  1. Might as well delete everything in "Program Files/Groundspeak/Wherigo" just in case as well.

     

    %100 backward compatible

    <Snicker> That wasn't intentional, was it?

    its

    a) dark and rainy here and it supposed to be June?

    :D not enough coffee

    c) ok, it's intentional...

  2. What is the deal with this? I understand they are still saying this is all a work in progress and such but why is it that it seems with almost each upgrade to the builder the cartridges built in the previous version no longer work and you need to go back to an older builder. I hate to have different builders on different machines just so I can continuing working on some of the new things but need a machine ready to make changes to the old ones. I think one thing for future builds is to work on his issue. Just my opinion.

     

    In regards to a site with old versions here is a link I found on one of Ranger Fox's posts on another thread.

     

    http://www.devfolio.com/geocaching/Wherigo/archive/

    The latest builder on the web site is and should be %100 backward compatible. Sometimes, when installing the builder it doesn't replace the ZonesEngine.dll and this causes the errors I've been seeing with others. The latest install on the Wherigo web site is what we call a release version (the executable and dll's are all "release" versions of the codebase). So, I would suggest a complete uninstall of the builder via the Control Panel, remove programs and then an install of the builder from the web site.

     

    David

  3. I had some issues with tasks not becoming active on a Colorado, where it worked fine on the Emulator - so I thought why not try the latest builder seeing that there was a new release.

     

    Well with that I cannot read anny of my previous cartridges and even the demo cartridges like the Zoo do not load. The error message is:

     

    Error Reading Cartridge.

    System.MissingMethodException: method not found: 'System.Collections.ArrayList ZonesFramework.Zobne.get_ZCommands()'

     

    Where can I still get a copy of the previous version of the builder?

     

    Olaf

    Olaf,

    Could you send me your cartridge? I haven't heard of this happening with the latest release so I'll test this with your cart. Try uninstalling the builder on your machine and reinstalling the latest version on the Wherigo web site.

     

    David

  4. I uninstalled the old builder and installed the new version per the directions. I created a simple cartridge just like one I had working, but added the exit / save / navigate command to see what it looks like on the Colorado.

     

    I got an error when I tried to publish the cartridge to my computer, so I decided to exit the builder and reboot the PC to make sure everything was reloaded properly. After reboot, I tried to open the cartridge and got an error. Haven't tried it with any known working cartridges yet, and I did not jot down the errors as I was just goofing around killing some time the other night.

     

    Will take another shot at it tonight and try to post the error messages -- if I recall correctly they weren't the same ones others have reported with the new builder.

    The Exit/Save/Navigate isn't implemented yet on the Colorado so if a cart has this command, it will cause the colorado to error out.

     

    David

  5. I'm referencing the following: https://buy.garmin.com/shop/store/downloads...5&pID=11022

     

    According to Garmin's site, they haven't released an update for the Colorado in almost two months. Regardless of what features Groundspeak puts into the player, they're unusable if Garmin doesn't provide an update.

     

    Unless there's something I'm missing and an alternate download site for player updates? Even the WebUpdater application doesn't provide anything further I can install (aside from language packages).

    you are correct, this is not yet supported on the colordo and wont be supported on ppc

  6. I have the same problem with ZonesEngine.dll. It will load on version 04/16 but anything later causes an exception.

     

    This obviously is not backwards compatible, and I spent weeks on my cartridge. I'm not inclined to start over again.

    What operating system do you have? XP or Vista? If it's xp, what service pack do you have installed?

     

    David

    XP V 2.09 (Service Pack 2).

     

    I will try it on my vista machine this evening too.

    There has been mentioned before that SP3 was a problem as well. I can't seem to duplicate this and I have only heard a few people that have the problem.

    http://forums.Groundspeak.com/GC/index.php...zonesengine.dll

     

    Also, make sure you've removed all previous versions of the builder if there are any. Check the control panel, remove programs and see if any older versions of the builder are installed. remove all of them via the control panel and the install the new release.

     

    David

  7. I have the same problem with ZonesEngine.dll. It will load on version 04/16 but anything later causes an exception.

     

    This obviously is not backwards compatible, and I spent weeks on my cartridge. I'm not inclined to start over again.

    What operating system do you have? XP or Vista? If it's xp, what service pack do you have installed?

     

    David

  8. I just found a Builder bug.

    If you change the name of a character, item, timer etc., i.e. add or remove a letter in their 'name' field, then Click on Close ('X'), the altered name is saved.

    The change is visible in the list if you click on the category button on the left.

    Thanks for pointing this out. Right now, the builder is not coded to "undo" changes (you'll see that there is no cancel button either).

     

    David

  9. I was testing the answer I was going to provide someone in the forum and I came across an interesting bug in the builder.

     

    I had my personal cartridge open. It has a huge number of author functions. I closed it in the builder and created a new cartridge. After I saved the new cartridge, I noticed it also saved my author functions with the new cartridge's code. I doubt this should happen.

     

    Can anyone else reproduce this?

     

    I'm using the 4-16 release.

    I've logged this as a bug.

     

    David

  10. What's the property accessor to get the Distance object's distance?

     

    I have tried the following:

    Distance.DistanceRange

    Distance.DistanceRangeU

    Distance.Distance

    Distance.Range

    Distance.Dist

    Distance.Units

    Distance.Value

     

    I thought I could get the units by the following:

    Distance.DistanceRangeUOM

    However, I get an error if I try to print it in a MessageBox.

     

    I know I'm working with a valid distance object because I can print it out using print(Distance), with "Distance" in all examples meaning my Distance object's variable name.

    There's a Get accessor on the Distance Object. So:

     

    local d = Wherigo.VectorToPoint(Player.ObjectLocation, zoneGroundspeak.Points[1])

    print(d("m"))

    print(d("ft"))

    print(d("mi"))

    print(d("km"))

     

    Output (Reverse order)

     

    0.11446612302836

    0.071125951336915

    375.54502362974

    114.46612302836

     

    David

  11. Is there a library function I can call to measure the distance between two points? I know I can get the Player's ObjectLocation, so would like to use that as one point and find the distance between that and another zone's point.

    There is a library function to do this. It's called Wherigo.VectorToPoint(zonePoint1, zonePoint2). It returns a distance and bearing objects. Here's what I tested in the emulator:

     

    =Wherigo.VectorToPoint(Player.ObjectLocation, zoneGroundspeak.Points[1])

    >>Distance(114.46612302836, 'm') 324.01455693943 <--- distance, bearing

     

    The two parms are zonepoints:

     

    ZonePoint(47.615414035258, -122.34195828438, Distance(0, 'm'))

    ZonePoint(47.614582, -122.341062, Distance(0, 'm'))

     

    Here's an example of finding the distance then creating a new point from that distance and bearing using a point from the zone.

     

    local d,b = Wherigo.VectorToPoint(Player.ObjectLocation, zoneGroundspeak.Points[1])

    print(d)

    print(B)

    local newPoint = Wherigo.TranslatePoint(Player.ObjectLocation, d, B)

    print(newPoint)

     

    Output (in reverse order):

    >>ZonePoint(47.615414035261, -122.34195828439, Distance(0, 'm'))

    >>324.01455693943

    >>Distance(114.46612302836, 'm')

     

    TranslatePoint uses Distance and Bearing: newpoint = TranslatePoint(pointToUse, distance, bearing)

     

    David

  12. Regarding the Colorado, it seems it still does not support GIF images. I tried using some in a cartridge I'm developing, but had to convert the images when I saw they weren't showing during my field test. I'm not certain if the builder's compiler stripped them out or if the Colorado just didn't show them. Either way has the same effect, really.

     

    If you wanted to show an animated GIF, I wonder if you could use timers to time dialogs so they would appear in quick succession, each showing a frame of the image? I wonder if the device could handle such an operation without memory problems?

    The Colorado only supports JPEG's. The linker that creates the gwc file strips out the non supported graphics/sound for the target device (in this case, strips out everything but jpg's). A timer could be used to animate an image, but, it probably won't play very well due to the fact that the change image action would need to be executed every n seconds.

     

    David.

  13. The ID is used for the builder. But, if everything is in the author scripting section then it doesn't matter. Does the cartridge open in the builder at all?

    The builder opens the cartridge and plays nicely with everything. In fact, I can add things through the builder, save the lua file, and open it in notepad to move what the builder wrote to the author section if I need to modify it further. I've been having a lot of success with that method. I like the hand-coding method as it's easier to do wild stuff.

     

    I have not needed to add anything for the ID attribute. Even without adding an ID, the player application will pick up on my new zones and store their state with the saved game. However, the array (I think they call it a "table" in lua) that keeps the object references is not stored with the saved game. If I wanted to store it, I guess I could add it to the list of builder variables. However...

     

    I'm concerned, though, because the builder might not understand array objects and, therefore, the code that saves the cartridge's state might not save the array properly. To get around this, I suppose I could always recreate the array based on object names (they're all zones beginning with the same name) when the cartridge is run again. If I don't do that and the user saves and opens the cartridge repeatedly, I'll end up with 20 or more inactive zones.

     

    Though I have the cartridge more or less in a complete state, there's a lot of cleaning up and niceties to build. By the way, is there a way to nullify or unload an object, such as a zone?

     

    Edit:

    By the way, did you know that I can't use the apostrophe in my comments? The builder doesn't like that and will refuse to open the cartridge code until I remove the offending apostrophe.

    You can set an object to nil in lua and that essentially deletes it:

     

    Nil is a type with a single value, nil, whose main property is to be different from any other value. As we have seen, a global variable has a nil value by default, before a first assignment, and you can assign nil to a global variable to delete it. Lua uses nil as a kind of non-value, to represent the absence of a useful value.

     

    The comment issue is a lua thing. The first thing that happens when the builder opens a cart is a lua "dofile". This validates the lua file as a valid lua object (parses it with the lua dofile command). If that works, then the builder manually parses the function statements. So, an apostrophe in a comment hoses the dofile.

     

    David.

  14. Could it have something to do with the fact that the 4/18 build was the first I'd ever installed?

    It shouldn't be a problem. Any version of the builder that is posted should be backward compatible. After all, what good is an install if it doesn't support all of the features before it. Net result, the 4/18 install should be the only and last install for everyone.

     

    David.

  15. Hi David

     

    The file size and date seems to be ok. I have installed the previous version and it works 100%. I can understand the frustration trying to duplicate the error without success. If you can do that you can put the issue to bed. If there is any thing I can do on my side to assist, specific system configurations that might lead to the issue, etc just let me know.

     

    Ivan

    if the file size and date are the same, then you have the correct ZonesEngine.dll. I haven't had any mass feedback that the 4/18 version is corrupt. Maybe there is something about your system settings. Usually, a dll not found error could be something about the file attributes etc.

     

    David.

  16. Here's another article, white paper, etc. for everyone to enjoy!

     

    Summary and Key Points:

    -- The Colorado needs the line to require math

    -- Stick the line in the author functions section to avoid the Builder removing it

     

    ====================================================================

     

    Some of you may have noticed this, others not so.

     

    The lua math library brings us many fun abilities: absolute values, cosines, tangent computations, degrees, exponents, powers, normalization... Huh? Why, yes, I am reading from a list in some documentation. Check it out yourself: http://lua-users.org/wiki/MathLibraryTutorial

     

    One of our favorite uses of the math library, though, is its ability to generate random numbers. It's an easy method call, too:

    local x = math.random(1,10)

     

    As you can see, I can easily choose a number from one to ten. Moreover, I can create fun little variances in everything I write. For those interested, I'm working on a Whack-A-Mole game. Why? Kicks and giggles, mostly, but also because it's a lot of hand coding and gets me deeper into the code side. Using random, I have have zones or items pop up wherever I want, vary the duration of my timers, add a little surprise to scoring, have things occur at different parts of the cartridge, etc. Basically, if you're looking to give a little spice to your cartridge, I'd recommend adding something unpredictable. Heck, you can even create a question bank for your areas so that players are given one of many questions to answer. That way it's not the same experience all the time. Replay value, if you will.

     

    Sound good? Have I justified the value of random? I hope so.

     

    The random function is included in the lua math library. To reference it in your cartridge, we're familiar with changing the top of our script code to look like the following:

    require "Wherigo"
    require "math"

     

    However, when programming, compiling, and testing your cartridge in the emulator, we see we have no need to add that line at the top of our script file. Even without it, the cartridge runs perfectly.

     

    Well, not so perfectly, actually. I shot over my GWC file to the Colorado and ran through my game control section to test all the good stuff I programmed. However, the cartridge crashed when generating the zones. I didn't know how to pinpoint it. Did the Colorado's player not have a function call? Did it not support a specific feature? What gives? So I downloaded the beta software and installed that only to see the same result.

     

    I looked at the Wherigo master log on the Colorado (\Wherigo\Logs, if I remember correctly) and saw the following entry:

    Wed May 7 22:28:05 2008 WARN [Engine]: UserInputCommand(): Lua method call failed. ...top/Geocaching/Wherigo/Whack-A-Mole/Whack-A-Mole.enc:677: attempt to index global 'math' (a nil value)

     

    In short, the Colorado needs the math reference. I made the same mistake when I published my other cartridge. I didn't add the math requirement because it all worked out in the emulator without it. Sure, I tested it in the field, but I did one dumb thing: I compiled it in the Builder between testing it and publishing it to Wherigo.com.

     

    The builder has two funny quirks that are bad together: it will only spit out code it likes unless it's in the author functions section and it will implicitly save the code before compiling. Because of this, it will remove the math reference from the top and you'll be embarrassed when someone comes back and asks you why, after spending all that time playing the cartridge, it crashes at a certain spot and s/he can't even resume from a save point.

     

    To prevent the Builder from removing the line, stick it at the very top of your author functions section. The Builder will not touch or remove the line from this section. If anything else above the line uses math, you may have to move it to the author functions section as well. Though I have yet to confirm this fully, I believe you could actually move all Builder-generated functions to the author function section and the cartridge will work without a problem.

     

    ====================================================================

     

    I hope some of you have found this post informative or at least entertaining to read and easy to follow. If you have comments, views, suggestions for other posts, or ways I can improve how I write this type of post, please feel free to share them. If you don't draw any value from such a post, that's okay as well.

     

    Once I get that cartridge out of the way, I'll consider writing more about how I coded the cartridge. It's my hope that explaining some of the things I have learned will help others to create more creative, high quality cartridges for everyone to enjoy.

     

    Just a note: I don't have inside information and I'm learning just like everyone else. So, no, I don't have all the answers and don't pretend to, but I'll share what I have.

    Great article. Thanks. It's funny that the emulator "doesn't" require math since it's the exact same code as the pocket pc only that it runs in a window on the desktop. I believe that math is required for the PPC player as well.

     

    David.

  17. I forgot to mention. You don't have to use the "new" keyword to instantiate new instances of Wherigo library objects. I guess that's how constructors go for the Wherigo library. Well, at least for timer and zone objects, that is.

     

    You also don't need the ID keyword to make it work. I wonder if adding an ID will allow the object state to saved when the user saves the cartridge?

    The ID is used for the builder. But, if everything is in the author scripting section then it doesn't matter. Does the cartridge open in the builder at all?

     

    David

  18. I have been trying to create a timer object from scratch. After the object is created, I store it in a global table. The OnStart event fires, but the OnTick event does not. The following is a code snippet. The table "timers" is instantiated (globally) outside the function I populate the table. The function in which this resides is called by an action from the player and is not executed when the cartridge loads.

     

    		for x=1,numTimers do
    	local t = Wherigo.ZTimer{
    		Name = "Timer " .. x,
    		Description = "Timer " .. x,
    		Visible = true,
    		Duration = math.random(minTimerSeconds,maxTimerSeconds),
    		Type = "Countdown",
    	}
    
    	t.OnTick = function()
    		--TimerTickEvent(t, x)
    		Wherigo.MessageBox{Text="Timer ticked",}
    	end
    
    	t.OnStart = function()
    		Wherigo.MessageBox{Text="Timer started",}
    	end
    
    	table.insert(timers, t)
    end
    
    for x=1,numTimers do
    	timers[x]:Start()
    end

     

    I have two workarounds, but would not like to use them. One workaround is to have a set number of timers instantiated as the cartridge loads and just use a switch statement to choose amongst them. The other is to have a timer firing in one second intervals, executing code I have lined up in a filmstrip fashion. Neither option would be good for extensibility and they're not good programming practice, either.

    I think a countdown timer gets a stop event, try that. Actually, so do duration timers, they actually start-stop-start

     

    David

  19. I have attempted to turn off all firewalls yet I still get the same error. Could the error be caused from having FireFox as my default browser?

    It could be. We are going to remove TerraServer since it's so old and use Google Maps. Can you try and edit a zone using the Edit Online? This will open up Google Maps.

     

    David.

  20. I have just started on my 2nd cartridge and have a couple of gripes.

     

    1. On clicking Close Cartridge (by mistake) the application closed without prompting me to save changes.

     

    2. Too many clicks involved when making small changes and re-testing.

    Save Cartridge (Yes --> OK)

    Tools --> Publish to my machine (Create playable cartridge --> Yes --> Save --> Yes --> Close

     

    Can the number of clicks that I have to undertake be reduced in someway.

    I'll fix #1. As for #2, you can just publish and it auto saves. So, Ctrl-M (publish to my machine) and then Ctrl-E opens the emulator with the currently published cart.

     

    David

  21. The link is: http://www.devfolio.com/geocaching/Wherigo/archive/

     

    This is available as a courtesy and only until an archive is posted to the Wherigo site proper. The site itself is my development domain, so only direct links will take you places.

    I can't seem to duplicate this problem. I just unistalled the builder and verified that the folder is gone. Then, I downloaded the latest (4/18) and installed and it runs fine. I suspected that the zonesengine.dll was a debug version, but, it's not for me. To verify, ZonesEngine.dll is 344KB with a date of 4/17/2008 3:28PM

     

    David

  22. I backdated to the 4/16 release an it's working fine.

    Might be an issue with the zonesengine.dll file installation.

     

    I have exactly the same problem and same release backdated. I wait also new working release.

    Question: Did you install the app to the same folder as the dll? In other words, is the dll in a different folder than the application?

     

    David

  23. I wonder if the comment isn't deleted for the event and this causes the problem? What does it look like in the code for the event?

     

    Just to clarify: I did delete the comment and all of the scripts from the event, leaving it perfectly blank and empty. The event then looked like this:

    When the player enters a zone (0)

     

    After saving the cartridge and reloading it into the builder, it looked exactly like on the screenshot I posted earlier, ie the event comment was back and it read:

    When the player enters a zone (1)

     

    Meaning that the event comment was automagically put into the event all by itself when it should have been empty.

     

    This behaves the same for all of the zone, item, character and whatnot events, btw.

    Anyone able to reproduce this?

    I'll log this as a bug and get it fixed.

     

    David.

    Just to clarify, looks like the delete was done editing the cartridge directly. When you delete the script lines and not the event (function) in the lua directly, the builder will pick this back up and add the comment to it. Sort of like holding the event open. If you do this in the builder, delete script from the object list will delete the function and all of the script. So, to get around this, you would delete the whole function block so that the event wouldn't show up in the builder.

     

    David

  24. I wonder if the comment isn't deleted for the event and this causes the problem? What does it look like in the code for the event?

     

    Just to clarify: I did delete the comment and all of the scripts from the event, leaving it perfectly blank and empty. The event then looked like this:

    When the player enters a zone (0)

     

    After saving the cartridge and reloading it into the builder, it looked exactly like on the screenshot I posted earlier, ie the event comment was back and it read:

    When the player enters a zone (1)

     

    Meaning that the event comment was automagically put into the event all by itself when it should have been empty.

     

    This behaves the same for all of the zone, item, character and whatnot events, btw.

    Anyone able to reproduce this?

    I'll log this as a bug and get it fixed.

     

    David.

×
×
  • Create New...