Skip to main content

Questions tagged [curses]

Curses is a library for controlling Unix-style terminals

Filter by
Sorted by
Tagged with
20 votes
3 answers
41k views

Tetris in C, in 200 lines

I aimed at making fully functional (real) Tetris, in the shortest way possible in C. The result is a terminal game for Linux, that uses ncurses. I made it for my friend, who wanted to play it on his ...
Najib's user avatar
  • 323
17 votes
3 answers
9k views

Snakes Game Using ncurses

This is my version of snakes in C++ using the ncurses library. I would like to hear from you how this piece of code can be improved and general advice for future projects regarding coding and ...
user3762742's user avatar
15 votes
4 answers
1k views

A top-like live monitor for virsh/kvm/qemu VM's

I needed a tool to monitor VM's running on my server in relatively real-time (similar to top or the many variants out there). The main things I need to keep track ...
Der Kommissar's user avatar
15 votes
3 answers
1k views

Ncurses Tic Tac Toe with simplistic AI

I have read your rules and in particular the part about bite-sized portions, so I am apprehensive about posting this but want to do it anyway. I have recently begun getting into C and in particular ...
some_guy632's user avatar
15 votes
2 answers
377 views

Mengenlehreuhr in Python

Telling the time based on the "set theory principle", the Mengenlehreuhr consists of 24 lights which are divided into one circular blinking yellow light on top to denote the seconds, two top rows ...
mproffitt's user avatar
  • 253
14 votes
1 answer
760 views

Ncurses Snake game

I decided to write a little snake game in c++ to practice and as an opportunity to learn ncurses. It turned out to be much bigger than I anticipated but since I've never really written anything big, I'...
Sergey Kasmy's user avatar
13 votes
3 answers
5k views

A Simple Tetris game made with C++ and ncurses

I made a Tetris game with C++ and ncurses. The game implemented the most core rules of the game such as 7-bag system or familiar rules you know about the Tetris, but lacks some features - for example, ...
Doyoung Kim's user avatar
12 votes
2 answers
3k views

Python Curses input screen

This is my first TUI program implemented via the curses module for Python. I use the program to input some data (numbers only) via the terminal, which are then saved to a .txt file. Any kind of ...
noibe's user avatar
  • 181
12 votes
2 answers
3k views

Snake with ncurses in C

I've implemented a version of snake using GNU ncurses, and I'd appreciate some feedback! There are two main files, a main.c file that houses the ...
mnoronha's user avatar
  • 173
11 votes
2 answers
2k views

CAT: Cat Approved TUIs

Cat Hello everyone! I am working on this TUI framework which aims to abstract the ncurses library. I was wondering how understandable it is, and what I can improve! Any feedback is welcome!! My ...
Labricecat's user avatar
10 votes
2 answers
180 views

Roguelike-ish template game

I have created a simple program that is supposed to be the core of a roguelike game. The program uses ncurses, and all that is supposed to happen is you choose a race and class, then choose an arena. ...
user avatar
10 votes
1 answer
626 views

Conway's Game of Life implemented in Python

I'm a Python novice and decided to give Game of Life a try in Python 3: ...
user avatar
10 votes
1 answer
627 views

Simple pager in C

I have written a simple pager in C. It works fine for most things, but I'd like to know how it can be improved. Specific things I'm looking for are if there are size and/or speed improvements to be ...
user avatar
8 votes
5 answers
954 views

Tic Tac Toe in C w/ ncurses Revision

Someone in this thread said I could ask for a review of my revision: Ncurses Tic Tac Toe with simplistic AI I re-wrote it from scratch using the suggestions from the answers. In particular I did the ...
some_guy632's user avatar
8 votes
2 answers
1k views

UNO for ncurses

I've been teaching myself C for the last few months. As a learning exercise, I set out to write an ncurses implementation of the classic card game Uno, mostly because it was was one of the simpler ...
Earth2's user avatar
  • 83
8 votes
4 answers
1k views

Another Conway's Game of Life Simulation (With colored populations!)

This is my near-final version of Conway's Game of Life, with inherited colors using PDCurses. Any new spawned cells take on the most frequent color surrounding it when it spawns. This leads to single-...
Carcigenicate's user avatar
8 votes
1 answer
314 views

Function to wrap words in a text editor without breaking them

These are 3 functions I created in C language to read in a text file, remove the carriage returns from it in order to display on the screen, and display the file on screen wrapped with the words of ...
Mohammed Ashour's user avatar
8 votes
1 answer
1k views

NCurses-based Tetris game in C++

What sticks out and what would you have done better in this termina-tetris implementation? I do not intend to use namespaces or split it up into multiple files. ...
tetriscoder7654876543's user avatar
7 votes
1 answer
1k views

Python Breakout game

I came from C# background with strong OOP approach. I've decided to learn Python and Breakout game is a way to cover the basics of Python. I'll be really glad for any feedback and general opinion ...
NeverDoomedEnough's user avatar
6 votes
1 answer
558 views

Play Snake Game on Mac OS Terminal using C with ncurses Library

Made a simple snake game in C. I am just having some fun with program and using this as a spring board of knowledge in hopes to get some confidence to maybe try different kinds of projects. I am ...
Alf's user avatar
  • 63
6 votes
1 answer
896 views

Python word wrapping function

I'm attempting to make some ui tools for my python ncurses application, and I needed a word wrap function. It works pretty well, but trying to read it is frustrating. I'm specifically looking for ...
DeathTails's user avatar
5 votes
1 answer
235 views

Terminal interface audio player based on VLC & Curses

I'm working on an audio player with a terminal interface. I'm designing it for eventual use on a Raspberry Pi with a 480x320px display. I've broken the code into three main files with the intention ...
Reticulated Spline's user avatar
5 votes
1 answer
2k views

15 Puzzle in Python

This is a playable 15 puzzle game in Python and Curses. It consists of 2 files, a backend called fifteen.py and a frontend called ...
Tornado547's user avatar
5 votes
1 answer
3k views

Tetris clone in C++ using ncurses

Recently, just for fun, I've created a clone of the widely popular game Tetris using C++. Since I am still a novice when it comes to C++, I would really appreciate all the feedback I can get from ...
James Balajan's user avatar
4 votes
1 answer
318 views

Text-based vertical scroller game

I'm making a simple text game using the pdCurses library and a few other minor things like a vertical scroller in which you avoid the randomly-generated walls. There are two walls on left and right ...
Griffin's user avatar
  • 297
4 votes
2 answers
918 views

Creating a border using ncurses

The biggest question is if it's worth it to use a useless if statement to make the x and y ...
Alex's user avatar
  • 143
4 votes
1 answer
760 views

MP3 player for Linux

I wrote a Python MP3 player for Linux using PyGame, with a curses GUI and a mouse-only interface. It's purely for personal use. It hasn't been polished yet, but for now I'd like to know what I've ...
Fruckubus Crunt's user avatar
4 votes
1 answer
299 views

Blackjack Game in Python 3/curses

You were all so helpful with my Tc Tac Toe games in C. I was encouraged to put it up on GitHub and two very helpful users refactored it in ways that really taught me a thing or two. While I have ...
some_guy632's user avatar
4 votes
1 answer
241 views

Multithreaded MVC game engine

This is an attempt at a multithreaded model-view-controller based engine for 2d console games (board games, roguelikes that sort of thing.) The code below will provide a fully working example but is ...
Jaldhar's user avatar
  • 409
4 votes
0 answers
1k views

Snake in Haskell with Ncurses

I've created the Snake implementation in Haskell. User input and graphic is handled by the Ncurses library. The goal of this question is to get the feedback on what can I improve to make it more ...
Piotr Aleksander Chmielowski's user avatar
4 votes
1 answer
119 views

Game of Runes: version 3

I've written a very revised and developed version of the game of Runes. The major changes are listed: Convert runes to use curses. Add color-coding to the pieces. Change the board to use the ...
user avatar
3 votes
1 answer
110 views

Looping input function

Currently, I have a function that loops to gather input for program execution, but I feel that it is a bit lacking, overthought and unoptimized. I would love any input on the process, coding style, or ...
Ziyad Edher's user avatar
3 votes
1 answer
151 views

Python File Explorer / RSync Terminal User Interface

I've been working on my first python program for a few weeks now and I feel like the program is at a decent stage to begin sharing. The premise was to create a file explorer that eases the use of ...
Kriffer's user avatar
  • 43
3 votes
1 answer
425 views

Displaying a "map" with curses and python

I started making a game in curses, but I feel like I am displaying the map inefficiently and ineffectively. Here's the code (only the relevant parts): ...
Have a nice day's user avatar
3 votes
0 answers
734 views

Snake game with multiple snakes

Firstly, I wrote standard snake game, then I decided to increase difficulty and made game with various snake number. My main point was to try the curses module, the second - to create game with OOP ...
MiniMax's user avatar
  • 862
2 votes
0 answers
68 views

PDcurses clock using abstract factory design

I am currently learning how to use PDcurses and decided to make a clock with it. **NOTE: this Watch that uses the abstract factory design pattern is not the same as this question!!. This question is a ...
globalturist's user avatar
2 votes
0 answers
187 views

Stopping ncurses printing with key presses

I've been updating a little text-based game of mine to have the text roll out over a time period to give the appearance that it's being typed. I'm doing this by using non-blocking output with ncurses. ...
SergeantPenguin's user avatar
1 vote
1 answer
109 views

Command-line sentence-by-sentence EPUB reader in Python

This is a command line application which displays the text of an EPUB one sentence at a time. I am going to make it more robust, including: make the segmentation more accurate, because it currently ...
Julius Hamilton's user avatar
1 vote
1 answer
964 views

Tetris clone in C

I just finished writing an ncurses-based Tetris clone in C. It's only my second project of this size, the first being a Snake clone. I would really appreciate any and all suggestions/improvements as I'...
atirit's user avatar
  • 225
1 vote
1 answer
515 views

PDcurses library menu.h extention

I am currently learning how to use PDcurses in VC++ 2015 Community, and I noticed that menu.h is not implemented so I decided to extend the library for my own use (feel free to just copy the code if ...
globalturist's user avatar
1 vote
0 answers
144 views

Python Local/Remote File Manager & RSync Terminal User Interface (TUI)

I have been working on a Python Curses terminal user interface for RSync for a little while now. I recently visited code review and recieved some help with cleaning up the code to make it more ...
Kriffer's user avatar
  • 43
1 vote
0 answers
149 views

First c program: Snake with ncurses

Six month ago I started studying C as my first programming language and a couple of weeks ago I decided to write snake as my first program. The program is written with ncurses and contains four ...
rieger60's user avatar
0 votes
1 answer
94 views

Calculating the volume of a box

I've been studying more C using C Programming: A Modern Approach: A Modern Approach 2nd Edition by K.N. King as well as reading the comp.lang.c FAQ and the Code Review section here on Stack Exchange ...
Faraz's user avatar
  • 513