Game Programming in C [closed] - c

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have only have basic knowledge of C, and now I want to expand ot. I want to study 2D game programming in C. Is it that a possibility? Is there an engine I may use?

Take a look at the SDL Library:
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. SDL is written in C, works natively with C++.
So you can use it with both C++ and C.
Likewise, you can also take a look at the SFML Library (Which is native for C++, but has bindings for C as well):
SFML provides a simple interface to the various components of your PC, to ease the development of games and multimedia applications. It is composed of five modules: system, window, graphics, audio and network.
Personally I would suggest SFML more, since it seems to have better support for OpenGL and personally is easier to program in.

Related

Programming language with UI to learn for a C developer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I want to learn UI programming, you know like windows applications such as chrome, firefox and many others, and i already know C.
So what language should i learn next?
What you are looking for is a GUI toolkit, not a new language. If you want to stick with C, GTK+ is a decent library and works on Windows, Linux and OS X. If you want to move to C++, Qt does everything you could ask for (and also runs on Windows, Linux and OS X). If you want to stick with only Windows, I suggest using something like C# because it is incredibly easy to develop WinForm applications. If you want to stick with only OS X, learn Objective-C and use Xcode to build GUI applications quickly.
There are a multitude of answers to this question. Search the web for "GUI library" or "GUI toolkit" and you will find existing threads on SO that explain the differences in libraries.
If you have a C background and want to build Windows applications, then you would probably benefit from developing in C++ or C#.
C++ has the advantage of being somewhat platform-independent, in that you could then also program for linux/mac.
C# is also useful if you ever want to do a lot of web programming.
Both languages have huge support communities online.

How to create a GUI-like text interface in C [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have seen a few programs that use simple GUI-like interfaces made out of text. A good example would be links (see screenshots below).
Are there any C libraries for creating this sort of thing out there? I would ideally like mouse support but that is not strictly necessary. Cross-platform is good but I really only need it for *nix-like systems (including mac). I don't have a great deal of experience with C but I know my way around it, coming from C++.
If libraries aren't available, how would one go about coding this kind of thing from scratch?
Screenshots of the kind of thing I want:
EDIT: Yes, I know about curses/ncurses, but does anyone know of any good tutorials to make this kind of program with it?
You could have a look at CDK--
project home page.
This is a set of widgets for Menus, pulldowns etc. wrapped around the basic ncurses library so your coding is at a much higher level and a lot of the intricacies and gotchas of ncurses are already dealt with.
Try ncurses - this is a library which with you may create such GUI environments under console.
The best tutorial I know for curses is Using C With Curses, Lex, and Yacc: Building a Window Shell for Unix System V, by Axel-Tobias Schreiner

Lite (ansi c 89) os for custom cpu? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
A friend of mine created a 16-bit stack based CPU on an fpga and I've been developing an ANSI C 89 compiler for it. He needs a file system and networking so he's now working on an os for it based on minix, but he's doing it on a pascal based compiler he wrote and it's going to take a while. Ideally we would like to be able to use our C compiler to build the minix source in it's entirety but I am a few weeks away from finishing the compiler and I'm sure it will be a while before it's up to the task. I would like to know if anyone has had any success porting minix to a custom CPU and what we should look out for, or if there are any alternative open source os's that are lightweight that we should be considering. Keep in mind that this is a custom c compiler so I don't offer any of gcc's toolchain bells and whistles.

What are the common libraries for C? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
C++ has STL and Boost and C# has the .net Framework library. Similarly, what are the most common libraries useful to a C programmer? (Other than the C standard library.)
I am looking for most of the capabilities available in the STL: containers (vectors, linked lists, trees, hash table), algorithms (sorting, searching), file IO and strings.
Ideally, the library should be open-source, work on Windows (cross-platform is fine) and is being used actively.
If you want general-purpose data-structures like STL has, glib is probably the answer to your question. But a better question might be why are you writing your program in C? C's potential to shine comes when you don't use overly-general code to perform tasks that could be better performed in ways specific to your particular task at hand. glib just gives you "C++ with ugly syntax" (and less ability for the compiler to optimize).
The closest I know if is glib from GTK, see http://library.gnome.org/devel/glib/2.26/
Yes. GLib is the closest thing to STL in C. If you find it quite complex to use, try Vala. It is much easier. http://live.gnome.org/Vala

Mature standard library for C [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking for a library for C that gives me at least some of the things I really miss from C++ and the STL/Boost. (I have to use C, so please no "use C++" posts)
I need
dynamic strings (that grow and shrink automatically)
some sort of list (std::vector replacement)
something like stringstream (for type conversations & buffers)
Furthermore, it has to have a mature and Open Source implementation and it has to be platform independant (Windows, Linux and Mac are required to be supported).
Any recommendations?
What about the GLib from GTK?
I'd recommend the Apache Portable Runtime. It's reasonably small, portable, and powerful - powers the Apache httpd across multiple platforms, at least.
You could always consider embedding a dynamic language runtime in your application. The Lua core is not large at all, provides data types that meet your requirements, is open source, and MIT licensed so it is compatible with both FOSS and commercial projects.
You wouldn't necessarily need to use code written in Lua to benefit, as its C API provides complete access to its data types and their values. However, you could later move some of the logic of your application into Lua, for the improved clarity of expression and other benefits of coding in a dynamic language with functions as first-class values.
Take a look at Gnulib

Resources