Vinny da Geek (desertwolf) wrote,
Vinny da Geek

  • Mood:
  • Music:
Still haven't gotten the town characters editor written yet but the logic (and code) for moving the characters has been done:

for every character...
  if the character type is MOVING then
    pick a random number between 1 and 5
    if the number is five then
      pick a random direction
    if it's not five then
      if the next tile along the current direction is within the map bounds and is not a solid object then
          if the old position is visible on the screen then
            restore the tile under it
          update the new position
  if new/current position is visible on the screen then draw it
  • Post a new comment


    default userpic

    Your reply will be screened

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.