Jump to content

Activating Lots of Zones and Task Visibles on PPC


tands

Recommended Posts

Hi All,

 

I also posted this in WIG Hardware...

 

I working with some cart writers on a WIG cart, and we're running into some differences in function between the Colorado and the PPC.

 

The cart runs fine on the Colorado, not the PPC.

 

The cart does this when you enter the start location zone:

 

1. Displays a message saying you're at the Start Location.

 

2. Activates 18 other Zones which are invisible and makes 18 Tasks Visible.

 

On Exiting the start location zone it does this:

 

1. Sets the Start Zone Visibility to False.

 

2. Activates a Hunt Zone encompassing the entire area the other zones are contained in, which contains an event that displays a message saying you're in the Hunt Zone.

 

3. Sets the Start location zone active to false.

 

The behavior of this cart on the PPC is this:

 

When you enter the Start Area you get the initial message with an ok button. Click ok and right away you get the message saying you're in the Hunt Zone with an ok button. When you click that button you get the main cart screen. The start location is no longer shown and the Tasks are now visible. However, clicking on Tasks gives no result, and the WIG player is very sluggish. If you close the cartridge you can save game if you want, then it doesn't go to the main WIG screen but instead runs the cart again. If you close the player, you can save game if you want, then it exits, but immediately you get an error message with the text on the lines starting with 'at' repeated over and over under Details:

 

Player.exe

ObjectDisposedException

 

at Microsoft.AGL.Common.MISC.HandleAr()

at System.Windows.Forms.Control.get_Visible()

at Player.frmMain.ProcessEnterKey()

at Player.frmMain.uBase_MouseUp()

at System.Windows.Forms.Control.OnMouseUp()

at Player.Controls.uBase.OnMouseUp()

at Player.Controls.uWigGame.Cat_Click()

at System.Windows.Forms.Control.OnClick()

at System.Windows.Forms.Control.WnProc()

at System.Windows.Forms.Control._InternalWnProc()

at Microsoft.AGL.Forms.EVL.Yield()

at Player.Controls.uWigGame.Cat_Click()

at System.Windows.Forms.Control.OnClick()

at System.Windows.Forms.Control.WnProc()

 

I think it's a thread or resource availability issue, but one thing that's weird is that the Hunt Zone appears to be activating and the Start Zone is going not active even though it shouldn't do this until we exit the start zone.

 

All this doesn't happen if we de-activate the Hunt Zone. The other zones are activated ok as well as the tasks are visible.

 

Anybody got any ideas?

 

Thanks,

 

- T of TandS

 

This post has been edited by tands: Today, 06:05 AM

Link to comment

OK, so my theory is this...

 

If you have an Enter Zone Event defined for example. And at the start of the event you display a message box that has an ok button to click. Then in the same action, you fire off activation of a bunch of zones. What happens is lua uses a .Net control to display the message box, so far no problem since that's first, then while user is looking at msg box, lua starts activating zones. I experimented with this using the MSoft Virtual PC Emulation stuff. I sat and waited and watched the drive and cpu activity on the PC hosting the emulated Pocket PC. As each of 18 zones was activated on the virtual PPC, I saw the drive light blink, and the cpu activity jump on the host PC. Each zone took about half a second to activate. After 10 seconds, I clicked the OK button on the message and everything was fine. It worked.

 

So, my take on this is, you guys used lua cuz it's a nice way to leverage C-efficiency compiled code while having a sweet interface to call the .Net screen controls. But what's happening in this case is that lua doesn't know what .Net wants for threads and .Net doesn't even know lua's there. Lua shows the message and then starts chugging on the zone activations, using all the threads it can grab to calculate the player's positional relation to each zone as each zone comes up as well. Meantime, .Net shows message and when user clicks OK, .Net says get X number of threads to execute Click control. But those threads aren't yet available, and .Net doesn't know that, and lua isn't listening since it's working.

 

So, maybe you guys could recompile the builder so that if an event action has a .Net control call and a cpu intensive action like a zone activation action, make the event's preceding actions finish before the .Net control is called, and make sure the .Net control is finished before continuing with the event's zone activation lua code.

 

What do you guys think?

 

- T of TandS

Edited by tands
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...