Skip to content

alezost/ducpel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ducpel

Logic game with sokoban elements for GNU Emacs.

Level 1 in progress

Installation

Manual

Clone the repo and add the following lines to your .emacs.

(add-to-list 'load-path "/path/to/ducpel-dir")
(autoload 'ducpel "ducpel" nil t)

Automatic

The package can be installed from MELPA or using quelpa like this:

(quelpa '(ducpel :fetcher github :repo "alezost/ducpel" :files ("*.el" "levels")))

Usage

Use M-x ducpel to start the game and the following keys to play:

  • left/right/up/down – move a man;
  • TAB/S-TAB – switch to the next/previous man;
  • SPC – activate a special cell (exit or teleport);
  • u – undo a move;

Key bindings for levels:

  • R – restart current level (with prefix also reread a level file);
  • N/P – go to the next/previous level;
  • L – go to the specified level;
  • F – load a level from file.

Key bindings for replaying:

  • rc – replay current moves;
  • rS – replay solution (each inbuilt level has a solution);
  • rs – save current moves to a file;
  • rf – replay saved moves from a file;

Rules

You will learn everything you need during playing the game.

TODO Write something here.

Contributing

If you found a better solution than the default one, and especially if you created a level, you may make a pull request or open an issue.

Making new levels is a priority. artist-mode can be useful during building a map. A level file consists of 2 maps:

  • The main map (titled with ; Map) defines:

    • @ – impassable cells (unbreakable walls);
    • # – breakable walls;
    • – empty cells;
    • floors:
      • . – simple floor,
      • E – exit,
      • T – teleport,
      • L – floor that can move left,
      • R – floor that can move right,
      • U – floor that can move up,
      • D – floor that can move down,
      • H – floor that can move horizontally (left and right),
      • V – floor that can move vertically (up and down),
      • M – floor that can move in any direction.
  • The second map (titled with Objects) is used only to define the position of men and boxes:

    • p – inactive man;
    • P – active man;
    • boxes: b, e, t, l, r, u, d, h, v, m (the same meaning as for the floors above).

    Other characters in the object map are ignored.

Also a level should provide a solution (ducpel-moves-history variable contains the moves and it is the solution after you passed a level).

About

I thought it would be great to make a sokoban-like game where several men can move several boxes and boxes can be transformed into floors, so that you can build a path to the exit.

A big part of the game is the idea of moving cells (floors with arrows). It was taken from a non-free game "Metamorphs" (it was released only for Microsoft Windows around 2000).

The code of sokoban package was used hardly.

What does the name mean?

I just tried to make a unique name and stayed on this variant because it ends with "el" and it consists (almost) of 2 latin roots:

  • duco, ducere, duxi, ductus – to lead;
  • pello, pellere, pepuli, pulsus – one of the meanings is "to push".