C developper, but newbie gamedev, where should I begin?

Started by
13 comments, last by Galdred 11 years, 4 months ago
Actually that was my point... that you are going to be able to write code that performs the same in either C or C++ with the equivalent skill level.... not that C is any faster, etc. My point was that the author of that post (the sections I quoted) claimed that code written in C is not as performant as code in C++ or C# which is untrue.. I guess I just worded it badly or missed the point.
Advertisement
Hi Saruman,

smile.png


My point was that the author of that post (the sections I quoted) claimed that code written in C is not as performant as code in C++ or C# which is untrue..


Uh... That is not correct about my writing. huh.png

Pure language coding performance data was not revealed by me, but the language of choice does effect game source code performance because of other issues.

Performance of coding is subject to other influences apart from its raw, native language performance characteristics. The performance of game source coding is also effected by the programmer, community experience, and software environment, as well as the language. As a kind of parable, a heavy, large row boat will outperform a smaller one, but only in certain circumstances like a Roman galley compared to a canoe. If you can't fill the galley with rowers, crew, soldiers, weapons, and provisions, then forget it! Having a huge or complex game source code will require you to have a bigger system just like the galley, but the exception is if you have lots and lots of time in your canoe to get to your destination. The game source coding is the vehicle, the language(s) is the material, the stuff with it contributes, and the game developer oversees it all. So many things are acting toward performance!


I did not focus on the level technical comparison of the coding languages themselves, though L. Spiro did nicely with that. smile.png One of my points is that the language does not come alone. Other factors determine the advantages available toward coding performance of any language. In a tech lab, your point is most relevant, however in the real world of language environment in the gaming industry then performance results can be far different: The human factor effects the features being used in relation to a language, impacting performance. Let's not confuse pure language performance with the game source code performance which relates to many external things.


I apologize for expecting too much from all readers of my post. My assumption was that the human factor would be realized immediately.

I stand by my recommendation for Galdred to continue using C until the need becomes clear to add languages to game creation, because of experience and desire to do so. The software engineer won't fully need the advantages of another language environment until expanding the features, assets, and at least one team working under such a prospective leader, if it is the plan to make a mega game. Besides this, who knows where the trends will be in a few years? We have seen new emerging movements in the past.

Game industry experience and tech support of C++ has a huge infuence on the game performance, let alone the game source code low level performance. Software environment of choice by the programmer is another factor which potentially can impact performance of the game. Personal game preferences are another area. For C++, the bigger view is that the programmer will likely get better performance in a complex, asset laden game made by teams with this game industry leading environment. Keep in mind that a 3D game is more likely to need the advantages of the C++ environment than a 2D game. In this sense, C++ development allows extreme teamwork and game source code adaptivity which has many as such advantages toward game performance, but typically in these very complex situations. (Think galley! wink.png)

As for C#, I also am assuming the reader will understand the human factor with the learner friendly language and the advantages of the superbly supported .NET Environment toward game performance for the programmer who has these needs. Again, the human factor being highlighted as a major factor toward end result game source code performance, not confused with pure language performance.

The C language will do nicely for Galdred until the software engineer sees the need to switch or add languages. My role is to highlight the human elements with the language environment toward performance. This points light at the coming challenges of deciding how much to do independent and how much will require teamwork, in turn effecting final performance of the game source code.


Saruman, please understand me as saying that environment can potentially influence performance more than the language itself. The C++ or C# (Python or any other language in the future) development advantages (think human factor) in the language environment can outweigh the raw language performance. Low level work in C is just fine for performance, but other needs will come for consideration which impact performance as the developer's organization expands! wink.png

Being that you are a professional, I am sure that you agree with much here, but I am clarifying my past assumptions based that the reader has or will do relevant research in these areas. ( I will, too! )


Language + language environment + game industry tech support + game industry experience + technology + personality + other variables = end result game performance:

Various influences are attached to any coding, some special to each language, which may give a language environment its performance advantage in certain circumstances.

Thanks for the opportunity to clear the air. Hopefully, I don't come as all high and mighty and all that stuff because I just want to make this good.

smile.png



Clinton

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

Actually I believe we both agree on the same point! Although I just took in the human factor of him being a professional C programmer to figure that he would achieve both optimal performance and development time with the language he is used to.

Core language wise of course you could compare something like the templated introsort of std::sort and the C library qsort and the C++ will kill it performance-wise as due to templating it will be typed as well as not need an indirection and there are many places this could be pointed out... although if someone really had a performance concern in C they wouldn't be using qsort (so as you mentioned the human factor). And as Spiro mentioned people may point out virtuals as performance issues due to the cache miss but if a virtual is truly warranted it likely would have been coded the same way in C anyways (by building a vtable of function pointers).

My bad for reading your post incorrectly, I had assumed you meant that you would see a raw performance benefit just by using C++ or C# over straight C but that was not the case.
An upvote for L.Spiro and Saruman from me on the last posts.


Saruman, it is very good to work with so many reasonable people around these forums! biggrin.png

Hold me to better communication and I will deliver - thank you very much!


Clinton

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

I am going with Cython for the game logic, and C with SDL for the display, and AI. But SDL does not seem that good if I want my game to accommodate various screen resolutions (ie scale graphics on the fly). It looks like I should draw on an openGL texture to have the graphics depend on the ratio only, and scale with screen size. Should I use the beta version of SDL 2.0, or should I use SDL and openGL at the same time ?

This topic is closed to new replies.

Advertisement