Index: game.bas
===================================================================
--- game.bas	(revision 2124)
+++ game.bas	(working copy)
@@ -184,6 +184,8 @@
 DECLARE SUB debug_npcs ()
 DECLARE SUB npc_debug_display ()
 
+DECLARE function spd(integer) as integer
+
 '---INCLUDE FILES---
 #include "compat.bi"
 #include "allmodex.bi"
@@ -247,6 +249,8 @@
 'textbox stuff (needs moving into a udt)
 DIM SHARED choosep, say, sayer, showsay, say$(7), saytag(21), saybit(0), sayenh(6), choose$(1), chtag(1)
 
+dim shared tickmod
+
 'global variables
 DIM stat(40, 1, 16)
 DIM scroll(), pass()
@@ -515,8 +519,9 @@
 GOSUB movement
 setkeys
 DO
+ tickmod = (tickmod + 1) MOD 3
  'DEBUG debug "top of master loop"
- setwait speedcontrol
+ setwait 18 'speedcontrol
  setkeys
  readmouse mouse()  'setmouse() is optional
  tog = tog XOR 1
@@ -837,7 +842,7 @@
  'DEBUG debug "drawoverhead"
  IF readbit(gmap(), 19, 1) THEN drawmap mapx, mapy, 2, 0, tilesets(2), dpage, 1
  IF readbit(gen(), 44, suspendoverlay) = 0 THEN drawmap mapx, mapy, 0, 2, tilesets(0), dpage
- animatetilesets tilesets()
+ IF tickmod =0 THEN animatetilesets tilesets()
  IF harmtileflash = YES THEN
   rectangle 0, 0, 320, 200, gmap(10), dpage
   harmtileflash = NO
@@ -1140,6 +1145,7 @@
  END IF'--this only gets run when starting a movement to a new tile
 NEXT whoi
 '--if the leader moved last time, and catapillar is enabled then make others trail
+IF tickmod = 0 THEN
 IF readbit(gen(), 44, suspendcatapillar) = 0 THEN
  IF xgo(0) OR ygo(0) THEN
   FOR i = 15 TO 1 STEP -1
@@ -1156,14 +1162,15 @@
   IF xgo(whoi) OR ygo(whoi) THEN wtog(whoi) = loopvar(wtog(whoi), 0, 3, 1)
  NEXT whoi
 END IF
+END IF
 FOR whoi = 0 TO 3
  didgo(whoi) = 0
  IF xgo(whoi) OR ygo(whoi) THEN
   '--this actualy updates the heros coordinates
-  IF xgo(whoi) > 0 THEN xgo(whoi) = xgo(whoi) - herospeed(whoi): catx(whoi * 5) = catx(whoi * 5) - herospeed(whoi): didgo(whoi) = 1
-  IF xgo(whoi) < 0 THEN xgo(whoi) = xgo(whoi) + herospeed(whoi): catx(whoi * 5) = catx(whoi * 5) + herospeed(whoi): didgo(whoi) = 1
-  IF ygo(whoi) > 0 THEN ygo(whoi) = ygo(whoi) - herospeed(whoi): caty(whoi * 5) = caty(whoi * 5) - herospeed(whoi): didgo(whoi) = 1
-  IF ygo(whoi) < 0 THEN ygo(whoi) = ygo(whoi) + herospeed(whoi): caty(whoi * 5) = caty(whoi * 5) + herospeed(whoi): didgo(whoi) = 1
+  IF xgo(whoi) > 0 THEN xgo(whoi) = xgo(whoi) - spd(herospeed(whoi)): catx(whoi * 5) = catx(whoi * 5) - spd(herospeed(whoi)): didgo(whoi) = 1
+  IF xgo(whoi) < 0 THEN xgo(whoi) = xgo(whoi) + spd(herospeed(whoi)): catx(whoi * 5) = catx(whoi * 5) + spd(herospeed(whoi)): didgo(whoi) = 1
+  IF ygo(whoi) > 0 THEN ygo(whoi) = ygo(whoi) - spd(herospeed(whoi)): caty(whoi * 5) = caty(whoi * 5) - spd(herospeed(whoi)): didgo(whoi) = 1
+  IF ygo(whoi) < 0 THEN ygo(whoi) = ygo(whoi) + spd(herospeed(whoi)): caty(whoi * 5) = caty(whoi * 5) + spd(herospeed(whoi)): didgo(whoi) = 1
  END IF
 
  o = whoi
@@ -1304,7 +1311,7 @@
      END IF '---CHASE/FLEE
      'WALK IN PLACE---
      IF movetype = 8 THEN
-      npc(o).frame = loopvar(npc(o).frame, 0, 3, 1)
+      IF tickmod = 0 THEN npc(o).frame = loopvar(npc(o).frame, 0, 3, 1)
      END IF '---WALK IN PLACE
     END IF
    END IF
@@ -1316,7 +1323,7 @@
 
 movenpcgo:
 setmapdata pass(), pass(), 0, 0
-npc(o).frame = loopvar(npc(o).frame, 0, 3, 1)
+IF tickmod = 0 THEN npc(o).frame = loopvar(npc(o).frame, 0, 3, 1)
 IF movdivis(npc(o).xgo) OR movdivis(npc(o).ygo) THEN
  IF readbit(gen(), 44, suspendnpcwalls) = 0 THEN
   '--this only happens if NPC walls on
@@ -1346,7 +1353,7 @@
      npc(o).xgo = 0
      npc(o).ygo = 0
      '--a 0-3 tick delay before pacing enemies bounce off hero
-     IF npc(o).frame = 3 THEN
+     IF npc(o).frame = 3 AND tickmod = 0 THEN
       GOSUB hitwall
       GOTO nogo
      END IF
@@ -1357,10 +1364,10 @@
 END IF
 IF npcs(id).speed THEN
  '--change x,y and decrement wantgo by speed
- IF npc(o).xgo > 0 THEN npc(o).xgo = npc(o).xgo - npcs(id).speed: npc(o).x = npc(o).x - npcs(id).speed
- IF npc(o).xgo < 0 THEN npc(o).xgo = npc(o).xgo + npcs(id).speed: npc(o).x = npc(o).x + npcs(id).speed
- IF npc(o).ygo > 0 THEN npc(o).ygo = npc(o).ygo - npcs(id).speed: npc(o).y = npc(o).y - npcs(id).speed
- IF npc(o).ygo < 0 THEN npc(o).ygo = npc(o).ygo + npcs(id).speed: npc(o).y = npc(o).y + npcs(id).speed
+ IF npc(o).xgo > 0 THEN npc(o).xgo = npc(o).xgo - spd(npcs(id).speed): npc(o).x = npc(o).x - spd(npcs(id).speed)
+ IF npc(o).xgo < 0 THEN npc(o).xgo = npc(o).xgo + spd(npcs(id).speed): npc(o).x = npc(o).x + spd(npcs(id).speed)
+ IF npc(o).ygo > 0 THEN npc(o).ygo = npc(o).ygo - spd(npcs(id).speed): npc(o).y = npc(o).y - spd(npcs(id).speed)
+ IF npc(o).ygo < 0 THEN npc(o).ygo = npc(o).ygo + spd(npcs(id).speed): npc(o).y = npc(o).y + spd(npcs(id).speed)
 ELSE
  '--no speed, kill wantgo
  npc(o).xgo = 0
@@ -1570,7 +1577,7 @@
      scriptret = wonbattle
      .state = streturn
     CASE 1'--wait number of ticks
-     .waitarg -= 1
+     IF tickmod = 0 THEN .waitarg -= 1
      IF .waitarg < 1 THEN
       .state = streturn
      END IF
@@ -3127,3 +3134,7 @@
  NEXT
  RETURN formset(1 + foenext) - 1
 END FUNCTION
+
+function spd(n as integer) as integer
+ return (n + tickmod) \ 3
+end function
