r/csharp • u/Euphoric-Piccolo-761 • 9h ago
Help how would i do this.
https://graebor.itch.io/sort-the-courtim trying to make a game like sourt the court but i have no idea how it works so i really want to look in the code of the game to see what they did, does anyone know how to acces this?
(working with unity)
0
Upvotes
5
u/Drako__ 9h ago
You can't. The game is not open source so the source code is not available to the public. You might have heard AI being able to reverse engineer games but AI decompiled code won't really help you understand how it's actually made, at least as a beginner.
Your best bet is to look for a tutorial on how to make these types of games or even better, try to figure it out yourself. Even if you don't have the best solution or the one that has actually been used, it's still a good learning experience trying to figure out how something might work
1
u/binarycow 8h ago
It's Unity, so it's .NET
JetBrains dotPeek will decompile it, and if I recall, it will even create a csproj for you.
It may not be easy to read. Unity might have done some weird stuff. The assets (images, sounds, etc) may not come out correctly, if at all. But you should at least be able to read some source code.
0
u/streepje8 7h ago edited 7h ago
If you got the dll files and IL2CPP was not used (usually you find them in GameName_Data/Managed, id start with AssemblyCsharp.dll), you can reference the code for your study with a tool like DnSpy (free and opensource)
Please do keep in mind that using any of the code obtained by decompiling is copyright infringement though.
Because you are asking about this game (which is relatively simple code wise) I assume you are relatively new to programming. In that case I'd not recommend decompilation studies at all since they will drop you in a big, complicated and unknown code base. Usually at this level its better to start replicating mechanics one by one using knowledge that you do have rather than trying to learn from existing source. To learn programming it is usually better to try and puzzle your way to a solution rather than getting the answer fed to you and replicating it as closely as possible (typing out the same code as somebody else without knowing what it does will not lead to improvement for example)