Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
If I want to create a game in C with SDL for example, is there a reason of why I should use a scripting language like Lua with it (since alot of commercial games uses a scripting language)? I have heard that scripting languages often are faster to write and easier to read, but what should they do? (graphics? ai? input? etc).
They should interact with the various "programming primitives" that the native code implements. That is, the native code should only do enough to allow the scripts to function within the game (although "function" can sometimes mean speed-wise).
If that sounds cyclical... it is. There's no complete way to define at the beginning of development what responsibilities the native code will have as the project progresses.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I would like to implement go's concurrency in C because I have seen that it increases the [performance] of go. I have not tried anything because I can't understand what to try. How can I do that?
Coroutines are not available in C natively (although they're supported in C++ starting with C++20), so you're going to rely on external libraries or you'll have to implement something yourself.
Some useful resources: an example by Simon Tatham, another small example, a C library called libaco, an interesting article with an alternative approach.
Another approach could be using an event-loop, that is the same approach used by JavaScript to implement concurrency within a single thread. One of the most used libraries is libuv and here's a small example of using libuv.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I just created the "Hangman game" using C language, i used GCC to compile it and worked in the terminal.
Let's say that i started with C a week ago, and this is the only programming language i know (Html & CSS arn't programming languages even if i know them). I'm a complete beginner so.
My question is, from the code source i have, how can i create an interface, an app that i'd start on windows (instead of linux terminal), with "buttons" or something like that ?
If i can't do this from the code source, what wold u recommend ?
What would be the software i should use instead of visual studio code to write code (because i guess i'll need a specific software if i want an interface or if i want to compile it in order to ceate a windows app ?)
I'm not english native so i may did some languages mistakes, sorry in advance.
Let me know if i can be more precise and explain something using other words.
There are numerous libraries and frameworks which can provide a GUI for your games.
Qt
Dear IMGUI
libsdl with widgets
and many more, depending on your requirements
Related posts:
https://gamedev.stackexchange.com/questions/1086/what-c-gui-library-can-you-suggest
Game GUI framework
http://samirsinha.com/choosing-a-gui-framework/
It's probably best to study existing games and how they are designed, what libraries people use, and so on, before embarking on building your own from scratch.
Also try reading some of the resources in the GameDev Stack Exchange.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I got a project that is already developed, in other words I have an API for some software that coded in C language, but the company haven't the source code, thus my mission is to write the source code for this application. Now I have the executable program and I want to write the source code, regarding to my less experience I'm asking, which is better, to write the source code from the scratch or to use some reverse engineering tool to find out the source code? But notice that reverse engineering tools results with some hard to read files since there are not enough comments!
No reverse-engineering tool will give you a source code (with or without the comments). So you can safely abandon this idea.
It is definitely better (in your case) to write new code from scratch using the existing executable as your black-box reference point.
Make sure to have many test cases that should cover as much of the original functionality as possible and when you are done writing your code run them all to affirm that your code is a reasonable replica of the original.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am converting code written in perl to C language but before proceeding I would like to know the performance difference between perl execution and c language execution.
It depends entirely on what you are doing. Raw performance of an interpreted language like Perl isn't as good as C, but if you are accessing files, pulling information out of a database, or other things which aren't purely part of the language itself you'll find the performance difference is negligible and the benefit of an interpreted language is much easier maintainability.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am a computer science student. I studied C, then came to C++[an object oriented one] and now Java[More Object Oriented]. My question is whether 'C' language is of any importance these days? Did I study it for the sake of studying the languages in the order in which they were developed so as to understand languages step by step?
Is there things that can be done only with C? What is it's scope?
The main scopes are:
drivers
operating systems
systems where performance is critical
small embedded systems (thanks Joachim)
C is still heavily used in situations where otherwise one would drop down to assembler, since it's one of the few structured languages to let users code that close to the hardware.
And a lot of what claims to be C++ code is C code with an OOP wrapper.