Message from C, C++ discussions

November 2019

— Yeah, i have some experience. But i'm not really interesting in unity and i prefer cocos2dx for my projects. My main problem is weak architecture of programs and i'm sure that through game engine development that's much better to understand almost everything about game development process.

Message permanent page

— 

You are going to understand everything and sure its fun- but also remember that it can take years to learn all the stuff and you need a very solid understanding of C++. Sure you could also an other language (ive written my first engine in C#) but in c++ you have much more libraries and example code for game engines plus you have the full memory control and can do fancy & fast things like sse/avx. Do you want to make a 3d or 2d game engine?

— I'm interesting in 3d graphics but my current knowledge are very limited and i have merely experience with 2d. I think that really the best way is to start from game engine book.

Message permanent page

— Afaik scanf returns the number of successfully parsed and assigned inputs - for example if you want to read one int you could check if scanf return something which is NOT one- then you know something went wrong

Message permanent page

— 

while (scanf(“%i”, &somenum) != 1)

— Something like that like?

— I guess you want to run the loop as long the input is valid :) so in this case you should do

while(scanf("%i", &somenum) == 1)

Message permanent page

— The while loop runs as long as one input value is succesfully parsed and assigned - that should be it

Message permanent page

— Thank you

— Haha ^^ your welcome

— Is it possible to use an if statement instead of a while loop?

— If scanf equals to 1 else …