ARSA Language  2.8
(Encryption, GPU and Web 3.0)
Creating a simple Pacman style game in ARSA Language.

This tutorial will show you about simple a Pacman clone game.

1. Introduction

  • Player can control by touch screen and also moving to hit enemy on screen!
            

2. Create Player

  1. New a PSD file size is 640x960 px, 72 pixel/inc, 8 bit/channels.
  2. New layer and rename to "mu" (remove quote before put in layer).
  3. Drawing and Coloring a original character on Photoshop canvas (in "mu" layer).
  4. Save and drag PSD file in ARSA Studio for preview.

3. Move Player Code

  • Put below code in Photoshop layer or external code.
    touch("isleft",move("mu",-500,0))
    touch("isright",move("mu",500,0))
    touch("isup",move("mu",0,-500))
    touch("isdown",move("mu",0,500))

4. Create Enemy

  1. New layer and rename to "boss" (remove quote before put in layer).
  2. Drawing and Coloring a original "boss" character on Photoshop canvas (in "boss" layer).
  3. Clone (Alt+Drag and Drop) "boss" layer in 11 times.
  4. Save and drag PSD file in ARSA Studio for preview.

5. Collision Detect

6. Reset Code

  1. New layer and rename to "reset" (remove quote before put in layer).
  2. Drawing and Coloring a original "reset" icon on Photoshop canvas (in "reset" layer).
  3. New layer and write a reset enemy code when User touch reset layer:
    touch("release","reset",visibleall(true,boss))

7. Win!

  • If player hit all enemy and it gone from screen then display text Win on center of screen!
    !isvisibleall("boss",text(280, 450, "Win!"))

8. SourceCode

pacman.txt

screensize(640,960) // universal resolution
// moving player
touch("isleft",move("mu",-500,0))
touch("isright",move("mu",500,0))
touch("isup",move("mu",0,-500))
touch("isdown",move("mu",0,500))
hitlayer("mu","boss",visible(false,null)) // collision detect
touch("release","reset",visibleall(true,boss)) // reset button
!isvisibleall("boss",text(280, 450, "Win!")) // show win

9. Next! Advanced a Pacman clone game.