Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialnec
3,886 PointsGeneral 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
Treehouse Moderator 91,253 PointsSome 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,
Robert Richey
Courses Plus Student 16,352 Points1) 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
3,886 Points1 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.
Robert Richey
Courses Plus Student 16,352 PointsYou'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
3,886 PointsThanks
I'll check out the article and research further.
Jonathan Grieve
Treehouse Moderator 91,253 PointsAlthough 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? :)
Robert Richey
Courses Plus Student 16,352 PointsHere are a few links that should help answer that.
- Game Development in C, is it possible?
- Is it reasonable to write a game engine in C?
- 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
3,886 PointsOn 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?
Robert Richey
Courses Plus Student 16,352 PointsIn 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
3,886 PointsLooks promising! It's seems to include a lot of terminology for communicating effectively with programmers also.
Jonathan Grieve
Treehouse Moderator 91,253 PointsThanks, I look forward to having a look at these later :)
nec
3,886 Pointsnec
3,886 PointsThank you for the response.