Skip to content

Repository files navigation

PacVim is a Vim learning game ʕ◔ϖ◔ʔ

pacvim

The Go gopher was designed by Renée French.

testGo Report Cardcodecov

| English | 日本語 |

Table of Contents

For those who want to play with PacVim

How to start PacVim

PacVim is started by double-clicking on the binary file below.

PacVim Rules

PacVim follows the rules of Pac-Man.

Game screen

game screen

Note

I suggest you play with a larger view of your terminal or command prompt because your eyes will flicker.

About objects

Object nameDisplaySupplementary explanation
appleapple1apple2This turns green when eaten.
poisonpoison-
obstaclesobstacle1obstacle2obstacle3-
playerplayer-
Enemy(hunter)hunter-
Enemy(ghost)ghostEnemies that can slip through obstacles

About the state of the game

StateTo transition to the left state
Stage clearEat all apples
Stage failureCaught by enemy or eat poison
Game clearClear all stages
Game overStage failure with 0 life.

Player Controls

KeyAction typeAction
h, Nhwalkmove left (If Nh, repeat N times)
j, Njwalkmove down (If Nj, repeat N times)
k, Nkwalkmove up (If Nk, repeat N times)
l, Nlwalkmove right (If Nl, repeat N times)
w, Nwwalkmove forward to next word beginning (If Nw, repeat N times)
e, Newalkmove forward to next word ending (If Ne, repeat N times)
b, Nbwalkmove backward to previous word beginning (If Nb, repeat N times)
0jumpmove to the beginning of the current line
$jumpmove to the end of the current line
^jumpmove to the beginning of the first word on the current line
ggjumpmove to the beginning of the first word on the first line
Gjumpmove to the beginning of the first word on the last line
NGjumpmove to the beginning of the first word on the nth line
q-quit the game

About action type

  • walk

    • walk is the image of moving one square at a time to the destination in an instant. Therefore, hit detection with enemies, obstacles, and apples is applied. Use it when you want to eat apples all at once.

      • e.g. If you type w.

        walk example

  • jump

    • jump is the image of jumping between to the destination and reaching it in an instant. Therefore, hit detection with enemies, obstacles, and apples is not applied. Use it when you want to move to avoid enemies or obstacles.

      • e.g. If you type $.

        jump example

For those who want to develop PacVim

Commands for development

make help
Usage:
make <command>
Commands:
fmt
go fmt
lint
golangci-lint run
deps
go mod tidy
test
go test
cover
create cover.html
build
Make a macOS executable binary
build-win
Make a Windows executable binary
clean
Remove binary files

Note

If you have not installed make, refer to the Makefile and execute the command.

  • e.g. When building on MacOS
    • go build -o bin/mac/pacvim .

Execution options

./pacvim -h
Usage of ./pacvim:
-level int
Level at the start of the game. (default 1)
-life int
Remaining lives. (default 2)
  • e.g. If you want to start from level 3 with 5 lives.
    • go run . -level 3 -life 5

How to customize PacVim

How to add a stage map

Reference commit

How to add enemy types

Reference commit

How to add enemy strategies

Reference commit

License

MIT

Author

Masahiro Kasatani

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages