I am in the process of porting a game I developed some time ago in VB to Windows 8 Desktop. I am using VB.
The game has a module in it where I do the game simulation and store the results of the simulation as Public Variables in
the Module. So I have a memory resident data base that is stored in the module and I have the simulation going on in the Module. The Module has been defined as a background task.
In this app as I move around displays , I am able to view and reference the data in the Module so I can see the data change
as the simulator runs. It works great.
I am trying to achieve the same thing in Windows 8.
I started with the Thread pool sample and as a first try coded what I had in the Module in the Main and was able to get
it working. It works as long as I only view the Main display, when I go to another display the Thread (or Simulator stops).
I am thinking now I should move the Simulation with its memory data base back into a Module with Public Variables as I had
in the original VB older project. I am not sure how to achieve my goal here.
Actually I tried to move the simulation and making it a threadpool in the Module and when I did it would not allow me to access the Dispatcher .
I then move the simulation back to the Main and the Dispatcher worked , however , if I move off of the Main to another display the simulation stops while I am on the other display. Of course
when I am on another display I would like to watch the game variables update - this is a problem.
Of course , all this worked on Windows 7 , but I can't seem to find the key to unlock how it should work on Windows 8.
Anyone know where I can find a key?
I am wondering if this will work? Is this the way to do this? Can I have a memory resident data base as Public Variables
that can be accessed by other functions with the Module being a thread?
Any ideas on this? Seems to me that this is the basic thing one wants to do in a game app?