Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

nec
nec
3,886 Points

General Basic Questions about coding, languages, and their relationship

1)What constitutes as a coding language? For example, if someone wanted to build a game for the PS3, they would have to code in something unique correct? Does that mean there is a "PS3 language"?

2) Would the PS3 "engine" be a "framework", "IDE", an "interpreter", or something entirely different?

3) From what I understand, coding is simply providing instructions. So, especially with modern languages becoming more efficient, won't code that is designed to achieve the same goal be very similar or near identical? Is there such thing as proprietary code?

Thanks

3 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,028 Points

Some very good questions here. Here are my attempts at a response. :)

1) As far as I'm aware Java is the coding language of the gaming world, particularly for current generation gaming consoles. Java powers pretty much everything including Desktop computers. :)

2) I'm not sure about this to be honest. I think the programming languages games consoles use link to Graphics engines but it depends on the individual game I suppose. :-)

3) Computer languages vary of course as they're all different especially as some were created to solve the problems that others maybe could not. So while programming languages may be different to one of another they generally share the same concepts,

nec
nec
3,886 Points

Thank you for the response.

1) I'll differ with my colleague and say that C/C++ is the language of the gaming world.

2) Engines are code frameworks that allow developers to access graphics hardware. Since the entire purpose of the PS3 is rendering graphics, you could think of it as being just an engine - although, I may be oversimplifying this.

3) Modern languages are becoming more abstract (higher level). The efficiency gains here are with our time and productivity. If you want fast executing code, you write in a lower level language (as a general rule), but it's rare to ever need to drop down below C/C++, because their compilers to Assembly are often hard to beat.

So, when you write myString.split() in Python (a high level language), as it compiles down by the interpreter, this single method call is using many lower level calls to achieve it's abstraction. By the time this code is executing on your processor, it could be hundreds or thousands of instructions (or more).

nec
nec
3,886 Points

1 and 2 cont.). Assuming the code required to program in each Engine (such as Frostbite, Unreal, Source) is different, what makes them different compared to each other? (The language of the code? How the code is processed? What "compiler" is used? )

I think I was mixing hardware and software together before. Let's focus on the software side first.

3) I think what I meant to ask is, if codes were just instructions how can companies or anybody "own" unique code? For example, a company charges money for other companies to use a framework that they built. I may missing something really big and obvious.

You're asking very good questions that I don't have solid answers to. I'm not really qualified to talk about the details with any authority - you'll have better luck with a Google search.

I view game engines as a set of constraints that provide some level of guarantee about consistency regarding physics, rendering, input and audio. It's the same reason why there isn't just one programming language that can do everything at all levels of abstraction. Game engines, like languages, are tools designed to solve a problem domain.

Each engine likely uses their own custom compiler. Here's a relevant quote from Unreal docs.

Unreal Engine uses a custom building method via the UnrealBuildTool which handles all the complex aspects of compiling the project and linking it with the engine. This process occurs transparently allowing you to simply build the project through the standard Visual Studio build workflow.

In regards to code ownership, here's a good article on Proprietary software. While code is 'just instructions', it's all being executed in binary form and tailored to CPU architecture that recognizes those patterns of bits. If the software is not open-source, then it's proprietary (this feels redundant to say, but it's important to understand). We can't easily - nor legally - modify, add, or delete any part of the source code.

Which brings us to why there's a market for buying and selling software. It's true, that as developers we could create all our own tools and then produce software products with those tools, but how long will that take? How much will it cost to employ myself and other developers to re-invent the wheel? Compare this cost with purchasing a license to use a game engine or framework that someone else already spent their time and money on.

If studios aren't writing their own engines from scratch, they're buying a license to use another engine and getting permission to heavily modify it for their own use.

nec
nec
3,886 Points

Thanks

I'll check out the article and research further.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,028 Points

Although I failed miserably at C and C++ at college I never did get as far as C for gaming!

I only got as far as C on the command line interpreter! How on earth does it translate to the gaming world? :)

Here are a few links that should help answer that.

  1. Game Development in C, is it possible?
  2. Is it reasonable to write a game engine in C?
  3. Why has the industry switched from C to C++?

C and C++ have access to hardware devices. Instead of writing your own framework for talking with the graphics card, you'll probably just import DirectX or OpenGL and use their libraries for creating a window and drawing to it.

nec
nec
3,886 Points

On the topic of C/C++, I noticed that treehouse don't seem to have a course for it? Is there a reason for that?

Since C/C++ have been around for so long there are probably lots of different resources on it. Any good suggestions on a good place to start?

In my opinion, Harvard's CS50: Introduction to Computer Science - through edX - is, without question, the best entry level course available covering C programming in a Linux VM environment.

I don't know why C/C++ are not offered, other than to guess that Treehouse tends to be highly focused toward Web technologies.

nec
nec
3,886 Points

Looks promising! It's seems to include a lot of terminology for communicating effectively with programmers also.