A
A
Anton K2021-04-08 22:36:47
Programming
Anton K, 2021-04-08 22:36:47

Why can't you find the source code of the game?

Please explain why I will never know the source code of any game until the developers themselves make it publicly available?

In .net applications, it can be found through DotPeek, but not in most games.

Why is it impossible to find out the source code, for example, how to get textures from the game?
Why is everything after compilation?
If this is all somehow encrypted, then how does this encryption work?

I understand the questions are stupid, but I just can't understand it... =(

(Please explain in simple words, without Wikipedia, I don't understand what is written there)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
1
15432, 2021-04-08
@tosi_kk

Um, let's say you've made a salad. They cut crab sticks, poured in corn, mixed a special sauce according to their recipe. And put on the table - here, eat.
So how can a hungry student find out the recipe? Yes, the product is in front of him. Yes, he can pick out his portion, sort out the corn and sliced, find out by the shape of the cubes with which knife they cut, count each ingredient in grams, figure out the sauce in a centrifuge, shine it with a spectrum analyzer for chemical elements, figure out approximately what it could consist of. But this will take a lot of time and money.
It's the same with the program. Source code is for us humans. It is more convenient for us to describe the program this way. The machine, however, did not give up beautiful names and the English language for execution at all, all our needlework is translated into machine codes, moreover, more compactly, more optimally (optimizing compilers are engaged in packing / cutting lettuce from our code). The result is a binary file. Yes, you can disassemble it, break your brains, but understand how it works. And to understand it, you need to learn how to read like a machine, think like a compiler. In general, it is difficult and often impractical. In general, people, not only software, even hardware, reverse from photos of a crystal cut. But that's a completely different story.

C
cicatrix, 2021-04-09
@cicatrix

In fairness, it should be noted that many modern games consist of 2 main parts.
The first is the so-called. "engine", it is responsible for visualization of models, input processing, network, physics calculation, etc. It is really usually compiled into machine code and its disassembly is very difficult.
The second part is the game logic, it is already responsible for the script, determines what will happen in the game for certain actions of the player, opens levels, changes the parameters of the game itself, etc.
Very often, game logic is described by scripts that are available for reading.
Of course, this is not always the case, but very often game studios do not have the resources or desire to develop their own engine, and focus on the game itself.
A huge number of games, even AAA games are made that way. I think the Unity and UnrealEngine engines together eat up more than half of the global game market.

I
Igor Makhov, 2021-04-08
@Igorgro

https://ru.wikipedia.org/wiki/%D0%AF%D0%B7%D1%8B%D...
https://ru.wikipedia.org/wiki/%D0%90%D1%81% D1%81%D...
https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D...
https://ru.wikipedia.org/wiki/% D0%9A%D0%BE%D0%BC%D...

T
Tera Incognita, 2021-04-09
@Lunali

someone else's code is useless. what's the point in it? I can play any game just by playing it, why do I need someone else's code? any game is not difficult to reproduce. Your code will be much faster.
You will lose a lot of time reading other people 's code . It's easier to write a new one just by looking at the game
. Moreover, the game that you see can be implemented in at least six ways, what's the point of wasting time on someone else's code if you liked the idea? creating your own game after seeing someone else's is not difficult.
I just had a fight with the Massachusetts Institute of Technology over this. They want to steal the code from children and distribute it to everyone. I don’t see the point in this and I think the point is to Close the code, but teach everyone to reproduce it by looking at someone else’s game.
I believe that the code should be closed, and the game should be published not on the institute's website, but in the Huawei store
.
The task is not to teach how to steal someone else's code and pass it off as your own by changing sprites, but the task is to teach anyone to write code just to look at the game ...
Turn someone else's code - this is not only nothing to teach, but also to teach bad things, namely theft....
In order to steal someone else's game, just look at the working one .... I don't see any problems making exactly the same if I see a finished game ... It 's
more important to understand and know what the code does than just look stupidly at someone else's
For example, here is the code
Who knows what he's doing?
606f7f87a8817509029762.png
I'm not sure that without an explanation, someone will immediately give an answer.
Therefore, it is much more important to give an explanation than just look at someone else's code
. In games, the idea is more important than the code .... The most important thing in the game is the game scenario.
Let's say you stole the python game code, but you yourself know only si sharp, what's the use of this?
Having looked at the game, I’ll just write it from scratch in a couple of days

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question