Age | Commit message (Collapse) | Author |
|
Move the GDK lock-management into the various arena action functions
so that we can release the lock _before_ sleeping in the guile thread,
allowing the GUI thread to update when the sleep starts
rather than when the sleep ends, so that the messages actually
stand a chance at remaining visible for something close to USLEEP_TIME--
rather than not showing until USLEEP_TIME has already expired.
Otherwise many of the updates get lost, e.g.:
(while (robot-feel "space") (robot-move 1))
... never seems to actually spend any time with the "Robot feels ..."
messages visible onscreen between the "Robot moves.." messages.
Note also that this change allows the GUI to generally be much more
responsive to user interaction (e.g.: scrolling, selection/copy/paste)
while a robot program is running!
|
|
|
|
This avoids weird off-by-1 errors in the GUI counters at game end.
|
|
Even if there's no movement to animate per se, we still want
to be able to see the energy/shields stats decrementing
as we bump into things--otherwise we might be surprised
when our robots suddenly dies with our counters all still
_apparently_ well above zero!
Note that we're still charging only 1 hit against energy and shields
per failed move *command* regardless of how many spaces
the robot was attempting to go....
|
|
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|