Using the Batch migrate method behaves erratically in my code.

What I'm trying to do is to create a very simple fog of war. At the start 
of the game, everything is hidden(unexplored) and as the player moves 
around tiles become explored(transparent).

In order to implement this I created a matrix of 5x5 squares(quad_strip) 
that I migrate to and from 3 different groups depending on whether a tile 
is visible, explored or unexplored. The visible group sets the color alpha 
to 0(fully transparent), the explored group set the alpha to 100 and the 
unexplored group set it to 255.

The problem I have is that, once a group is set, its properties will not 
disappear after the migration.

Here is the fog code: http://pastebin.com/ZpTkB0ju
If you run it, you should see mostly a black screen(the unexplored area) 
and a transparent circle close to the bottom left corner(the visible area).

If you uncomment the last two lines of the update_fog function the visible 
area will disappear and that's what confuses me, because all that line does 
is migrating the vertexes that already belong to the unexplored_group into 
the unexplored_group.

What is going on in my code?

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to