Skip to main content

VimQuestCLI

This is a vim implementation in python that tries to implement game using the vim shortcuts.

Why python ?

I love python. Maybe one day it's going to be converted in Rust (for easy webassembly and faster execution). But for now it's python 3.8.

Choice when doing executions

Executor :

  • local (the python vim implementation)
  • vim (calling vim to execute stuff, for compatibility tests)

Terminal handling :

  • Curses wrapper : the way it's usually done in python. It allows for curses to catch the input.
  • "manual" curses : Without using the full curses capabilities.

Execution loop :

  • One method to start the whole loop.
  • One method that have the input as argument and returns what to print.

The python version doesn't have just vim capabilities, but allows to expand for allowing for hooks and data attached to the cells.

Todo

  • Separate presentation layer

  • Add a vim executor (to be able to compare tests).

  • Have a context that is not a copy but modify itself (for speed).

  • Have a bunch of hooks, and use them to have game modes.

  • Have a command to choose between game modes.

  • See how neovim is made so I can use the same architecture.

  • Maybe have syntax highliting for game modes too ?

  • Activate the UTF-8, see how I can activate it.

  • Create docker images for website and terminal.

  • Add git hook for cleaning python before commit.

  • Use unicode characters (not necesseraly emojii) with colors for differents things happening.

BUG CORRECTION :

  • Clean codebase.
  • ANSI is blinking.
  • Image location is not working.
  • Size of the terminal is not used.
  • Unicode block behavior is inconsistent.
    • Maybe having replacement for unicode that include colors.

References

Now vim implementationthat I could use for corectness :

ncurses implementation : https://github.com/mscdex/node-ncurses Maybe this implementation would be easier to understand than the c ncurses one.

Next steps to cover

  • hjkl x
  • [number]command
  • i
  • aA
  • dd
  • wbe
  • v, Shift-v
  • ypP
  • "ci

Next step.

Vim core. That execute the commands and return a status. From a Contains the screen size and

Vim window. That take that buffer and return a screen. (matrix of data points with metadata).

Attachable are game modes.

Then there is terminal that push characters and returns a

Use an alternate screen : https://stackoverflow.com/questions/11023929/using-the-alternate-screen-in-a-bash-script

For inspiration :

  • Nethack

Add keystroker counts for speed. Info box to see what's happening in the game.

Game ideas :

  • Enemies coming at you and you have to delete the terrain that is underneath them without running out of terrain yourself. But if they touch you, you're dead and has to restart the game.

Metadata

Release files for vim-quest-cli 0.1.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vim-quest-cli 0.1.15
File Size Uploaded Provenance Actions
vim_quest_cli-0.1.15.tar.gz 33.1 kB Without provenance Details for vim_quest_cli-0.1.15.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vim-quest-cli 0.1.15
File Interpreter ABI Platform Actions
vim_quest_cli-0.1.15-py3-none-any.whl Python 3 none any Details for vim_quest_cli-0.1.15-py3-none-any.whl

Total release size: 79.5 kB

Release files / vim_quest_cli-0.1.15.tar.gz

Download URL vim_quest_cli-0.1.15.tar.gz
Size 33.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3a3295e9982c61c6bb0a5c3400839ad9f78b400ce6d280840e2241af049a865d
BLAKE2b-256 checksum
How to use checksums
a95f2ecb479bf29378155af256a45401be6f8efdad7bbca4f394093c019dd671
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.8.10 Linux/5.4.72-microsoft-standard-WSL2

Release files / vim_quest_cli-0.1.15-py3-none-any.whl

Download URL vim_quest_cli-0.1.15-py3-none-any.whl
Size 46.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8baad68d406c1600a1f03b192de1d008cb855cbc8ebd7adcca30e0b52c39c059
BLAKE2b-256 checksum
How to use checksums
41dae92c0fac67040c928050d1f83c6dc6175331a52cf8cfc4f2b874a9aac65f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.8.10 Linux/5.4.72-microsoft-standard-WSL2

Security for vim-quest-cli 0.1.15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page