Monday, March 4, 2024

Ncurses

 


Finally found a library that is simple, it have tutorials and is recently updated. The only draw back is that only works on Linux but is a minor issue since lather we can extend it to work on windows.


It works 100% width procedural code, so that is another think in favor, people looking to enter in to C, and have the same problem as me. Like it takes to long to start from scrach is not PHP. And large library's will be a bit hard to module since they already have to many dependency's as people also argue in other forum post.


Software done width this library we have VIM a famous text editor for Linux which people use for ages. The library was update in 2020 so think width all this in favors people might like it.


We can see in the tutorial the code working width getchar() a basic function on C.


https://www.youtube.com/watch?v=lV-OPQhPvSM


Snake game


https://www.youtube.com/watch?v=MH6QlYJ2SwU&list=PL2U2TQ__OrQ_TV2-wuHqGaK8qlnxgKUvK&index=1&t=0s


Old manual


https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html


New version + manual


https://invisible-island.net/ncurses/announce.html#h2-overview


3D graphics;


Actually it does not do that, i was watching the tutorials and the guy explain it : "it moves the courser of the mouse  to any position on the screen or in console backward and forward" it is all that it does. While normal console only goes in strait line is much more advanced then the normal console. "Escape codes are not mention" only the mouse courser thus the name "N curses" which translates to Variable mouse cursor or manipulated mouse cursor.


"Operating system escapes", actually not again,  since Ncurses is Linux specific, to work in windows you need more code, is not cross platform. It is not in any way related to general operating systems... (but to know more on this you probably need more tutorials)


This guy writes a 3D library introduction think it will be great for people starting. The code is in C++  wdith ncurses in C, but he says we can easily translate from C++ code to C.  Since you have the code + the tutorial think will be nice. 



The end result We have a basic 3D shape working. You probably need more tutorials since he only touch the topics light, assumes you know this things.


3D Engine


https://www.youtube.com/watch?v=UJVfh8K-0wY


can check last part working : https://www.youtube.com/watch?v=1iNawdvmHRc


There are also video tutorials for Ncuses library did not post on previous post: 


https://www.youtube.com/watch?v=lV-OPQhPvSM&list=PL2U2TQ__OrQ8jTf0_noNKtHMuYlyxQl4v

No comments:

Post a Comment

m

 The MVC or separete logic from presentation. is a well knowned paradigm.  Its knowned that MVC Frameworks implemented the Model View Contro...