Git Product home page Git Product logo

libngame's Introduction

libngame

Is a very simple library for C, that used ncurses. The goal is to keep it simple, and use ncurses for game dev in the console or whatever.

#Building the Library

Go to the ./lib folder and run buildLib.sh, it is going to compile the library and generate a '.a' file. That is the library. The script is also going to compile the example program on the main directory (file.c).

#Methods/Functions

By reading the header file: ngame.h you can see all the implemented functions.

initcolors(); initializes the colors of ncurses domram(i); Generate random number between 0 and i rcolor(); returns a random number between 0 and 7 rchar(); returns a random ASCII char endg(); disposal of the screen and waits for user input

Drawing functions:

putch(x,y,c); draws a character c on x & y position puttxt(x,y,str); draws a string str on x & y position line(x1,y1,x2,y2,c); draws a line from x1,y1 yo x2,y2 with character c rectangle(x1,y1,x2,y2,c); draws a rectangle from x1,y1 yo x2,y2 with character c

This library is not finished yet....

libngame's People

Contributors

k3ll3x avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.