Too much like the real Terraria source code.
I was a Terraria modder and a member of the tConfig and tAPI dev teams. (I also made another modding API for 1.3, but it didn't take off.), and I can say you didn't only try to clone the game, but also the code quality of Terraria: > Blocks and items, among many other things, are represented by magic numbers instead of enums. Terraria does the exact same thing. > There are 417 lines of block comments at the top of `TerraFrame.java` that serve as manual translation tables. We (Terraria modders) had no such thing, so the table must be made manually (or rather, we used some code to generate it). Some methods exist (such as `Item.SetDefaults`) to give an Item's fields (not properties, but raw fields) the desired values. (There are no subclasses or anything, and no Item/... definition lookup tables/... .) It is an infinite sea of `if (type == foo) { init(); } ...`. Note that it uses `if` without `else` or `return`, drastically slowing it down, but it got changed to a `switch` in 1.2. (More on `SetDefaults` later.) In 1.2, a `Terraria.ID` namespace was added containing (static) classes containing constants for easy Item/... -> numerical ID lookup as well. Terraria entities also have a `netID`, which slightly differs from their `type`: entities with the same type have the same texture, but they can have differing netIDs. The latter defines the actual properties (max life, damage, ...). Thus, separate `netDefaults` methods exist as well... > So as to avoid needing to declare lo
Posted by PoroCYon on Jul 23, 2017, 4:53 PM
Tags
Related issues
- The issue is really the extreme difficulty of programming them, especially for anything sequential (rather than combinatorial).
- I probably could have beared with it if it was only limited to programming, but it showing up in creative fields has made me feel all sor...
- I hate that I'm in deep enough to know what you mean.
- The biggest problem with “AI” is that big corps are shoving it down our throats.
- in the middel of a coding session with 5.6 sol.
- [Hero Run] 535B-A23B on 18T tokens
Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments
reliability (Other)
The issue is really the extreme difficulty of programming them, especially for anything sequential (rather than combinatorial).
I probably could have beared with it if it was only limited to programming, but it showing up in creative fields has made me feel all sor...
I hate that I'm in deep enough to know what you mean.
The biggest problem with “AI” is that big corps are shoving it down our throats.
in the middel of a coding session with 5.6 sol.
[Hero Run] 535B-A23B on 18T tokens
I hate that this is how AI is being used..
inexperienced protobuf user here -- why do non-googlers generally use protobuf?
Too much like the real Terraria source code.
I was a Terraria modder and a member of the tConfig and tAPI dev teams. (I also made another modding API for 1.3, but it didn't take off.), and I can say you didn't only try to clone the game, but also the code quality of Terraria: > Blocks and items, among many other things, are represented by magic numbers instead of enums. Terraria does the exact same thing. > There are 417 lines of block comments at the top of `TerraFrame.java` that serve as manual translation tables. We (Terraria modders) had no such thing, so the table must be made manually (or rather, we used some code to generate it). Some methods exist (such as `Item.SetDefaults`) to give an Item's fields (not properties, but raw fields) the desired values. (There are no subclasses or anything, and no Item/... definition lookup tables/... .) It is an infinite sea of `if (type == foo) { init(); } ...`. Note that it uses `if` without `else` or `return`, drastically slowing it down, but it got changed to a `switch` in 1.2. (More on `SetDefaults` later.) In 1.2, a `Terraria.ID` namespace was added containing (static) classes containing constants for easy Item/... -> numerical ID lookup as well. Terraria entities also have a `netID`, which slightly differs from their `type`: entities with the same type have the same texture, but they can have differing netIDs. The latter defines the actual properties (max life, damage, ...). Thus, separate `netDefaults` methods exist as well... > So as to avoid needing to declare lo
Comments (0)
No comments yet. Start the discussion.