termbox | Library for writing text-based user interfaces

 by   nsf C Version: v1.1.2 License: MIT

kandi X-RAY | termbox Summary

kandi X-RAY | termbox Summary

termbox is a C library. termbox has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Termbox is a library that provides minimalistic API which allows the programmer to write text-based user interfaces. It is based on a very simple abstraction. The main idea is viewing terminals as a table of fixed-size cells and input being a stream of structured messages. Would be fair to say that the model is inspired by windows console API. The abstraction itself is not perfect and it may create problems in certain areas. The most sensitive ones are copy & pasting and wide characters (mostly Chinese, Japanese, Korean (CJK) characters). When it comes to copy & pasting, the notion of cells is not really compatible with the idea of text. And CJK runes often require more than one cell to display them nicely. Despite the mentioned flaws, using such a simple model brings benefits in a form of simplicity. And KISS principle is important. At this point one should realize, that CLI (command-line interfaces) aren't really a thing termbox is aimed at. But rather pseudo-graphical user interfaces.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              termbox has a medium active ecosystem.
              It has 1889 star(s) with 184 fork(s). There are 75 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 17 open issues and 49 have been closed. On average issues are closed in 48 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of termbox is v1.1.2

            kandi-Quality Quality

              termbox has 0 bugs and 0 code smells.

            kandi-Security Security

              termbox has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              termbox code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              termbox is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              termbox releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              It has 224 lines of code, 14 functions and 3 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of termbox
            Get all kandi verified functions for this library.

            termbox Key Features

            No Key Features are available at this moment for termbox.

            termbox Examples and Code Snippets

            No Code Snippets are available at this moment for termbox.

            Community Discussions

            QUESTION

            Is there a way to render my Termbox game and handle keyboard events in the same loop?
            Asked 2020-Jan-11 at 21:26

            I'm having issues with my termbox program rendering the screen and handling keyboard events. Recently, I've finished a C and C++ class at my university. I wanted to demonstrate my knowledge by creating a basic Snake game. The first steps, I wanted to get a simple render loop going and have a block of text simply move leftward and exit the game upon reaching the 0th x-coordinate. The issue arises when continuing to the next render frame, because the game is running single-threaded the next frame won't be rendered until a new keyboard event is accepted. Ordinarily, I would expect the game to continue rendering regardless of events, new events affecting the new frame.

            As for potential solutions, I thought about using multiple threads to run the game loop and handle keyboard events. But, I think this would be overkill for such a small problem, there are likely easier alternatives than having to manage multiple threads for a simple snake game.

            As for the code, it's as simple as:

            ...

            ANSWER

            Answered 2020-Jan-11 at 21:26

            After digging through the header file a bit more I found a method which doesn't wait forever.

            Source https://stackoverflow.com/questions/59698658

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install termbox

            Termbox comes with a waf-based build scripts. In order to configure, build and install it, do the following::.
            Termbox's interface only consists of 12 functions::. See src/termbox.h header file for full detail.

            Support

            If you want me to add your Termbox project here, send me a pull request or drop a note via email, you can find my email below.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/nsf/termbox.git

          • CLI

            gh repo clone nsf/termbox

          • sshUrl

            git@github.com:nsf/termbox.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link