#BlameMojang

Discussion in 'Mod Development' started by Strikingwolf, Jan 29, 2015.

  1. Strikingwolf

    Strikingwolf New Member

    There are always a few problems with Mojang code. I don't have specifics here on a lot of the stuff I've seen, but I'll give you the gist.
    1. A bug since alpha pushed the whole texture library to the GPU every tick. Fixed in 1.7...sure you couldn't have fixed that sooner?
    2. No onArmourDequip pre-built-in. @chbachman can tell you the multiple pains associated with this one and getting it to work
     
    Last edited: Jan 30, 2015
    CoolSquid and trajing like this.
  2. Gideonseymour

    Gideonseymour Relatable Gamer Trusted User Retired Staff

    IIRC, this could be solved by Forge as well
     
  3. Strikingwolf

    Strikingwolf New Member

    True...
     
  4. ljfa

    ljfa New Member

    I guess I don't need to mention the rendering changes with all the JSON and stuff?
     
  5. FyberOptic

    FyberOptic New Member

    • Render order made the translucent pass (with blocks like water) render on top of particles for numerous versions, starting sometime around 1.5 I believe. Forge fixed it, then stopped fixing it I believe, maybe sometime around 1.7 or 1.8.
    • When hoppers can't carry out an action, they never reset their timer and search inventories on every tick. Still in 1.8.1.
    • 1.8's model system requires you to specify definitions for every possible combination of states, including all rotations. For some blocks this isn't a big deal. For others, like redstone dust, it's a disaster.
    • 1.8's model system generates baked models for every possible combination of renderable states (again, including rotations) and caches them, not only using a lot of memory (even more massive when mods start using it), but creating a large list that must be searched to find the model for a specific combination of states for a particular block.
    • When 1.8 wants to render the block breaking damage, it has to be passed a baked block model, which it duplicates all the inner components of, parses fully to replace every texture reference with the current block breaking animation frame, renders the model again, then disposes the model, all every render tick.
    • 1.8 creates and disposes a lot of objects during the rendering process now, actually.
    • 1.8 can't actually store any of the block states directly, or transmit them through networking packets; they're converted back into metadata, which is still saved the traditional way. If you can't fit their information into 4 bits, forget it. Though to be fair, I think this is meant as a stepping stone for 1.9. Maybe.

    Actually this is going to be a lot of "When 1.8..." so I'll stop there. I thought I had more from beforehand but none are coming to mind at the moment.

    This isn't to trash Mojang, because I respect them a lot, and it's a big game so some things will slip by or simply have to do until they can better address them. But it's certainly things that I hope are addressed better in the future.
     
  6. Strikingwolf

    Strikingwolf New Member

    Exactly. Mojang is a great game, but some things seem like people just want to watch the code burn...
     
    gold49 likes this.
  7. ljfa

    ljfa New Member

    Also: Translucent entities will occlude translucent blocks...for instance if you drop a glass pane item next to a body of water you will not see the water surface through it. That doesn't look very good.
     
  8. Overmorrow

    Overmorrow New Member

    Personally I think Minecraft is a great game, I'm not quite sure how you can play a company.
     
  9. Celestialphoenix

    Celestialphoenix Too Much Free Time

    Can we gripe about sloppy design decisions as well as dodgy code?
     
  10. Strikingwolf

    Strikingwolf New Member

    Welp
    Yes obviously
     
  11. RavynousHunter

    RavynousHunter New Member

    I get the feeling that Mojang is still kinda figuring out how to do a lot of things when it comes to making a game, because a lot of their design decisions are very beginner-style mistakes. That's fine for a small game that you're mostly making to learn how to do things, but when your game becomes a best-seller, its time to drop the hapless beginner crap and get serious, maybe hire a professional developer or two to sort things out. Their design philosophy seems to come from a quote from the Fallout 2 dev team (or Origin, I forget which one): "Now is not the time for serious solutions, now is the time for HACKS!"
     
  12. ljfa

    ljfa New Member

    Design as in game design or as in code design? I think they have weaknesses in both areas.
     
  13. trajing

    trajing New Member

    Sometimes all of the solutions you have to a problem are hacky.
     
    gold49 likes this.
  14. Strikingwolf

    Strikingwolf New Member

    But that shouldn't be true most of the time ;)
     
  15. FyberOptic

    FyberOptic New Member

    I agree, but honestly I think a lot of it is coming from idle hands. There's a lot of rewriting of things for the sake of rewriting them, even if the benefit doesn't really outweigh the huge effort they put in. Sure, they wanted a model format added to the game. No problem. It could have been added to 1.7.10's engine in a week. Modders already did this, after all. Modders have also created some freaking awesome block, item, and entity models in this game, which exceed anything Mojang ever made to be blunt. So obviously an engine rewrite was not necessary.

    I just watched Rorax's video the other day where she was talking about the advantages of using a professional modeling program, and she mentioned the Wavefront model format for making Minecraft models, and I completely agree. I've used it in non-Minecraft stuff before. It's a text-based format which can do quite a lot despite its simplicity and ease to parse, and it's supported in just about any 3D modeling program (including Blender). But instead of using a standard format, Mojang invented their own proprietary one, in JSON of all things, which is full of limitations. Then to make matters worse they wrote a back-end that's so convoluted and memory-intensive with abstraction that they achieved little to no benefit from it. Literally none of that extra garbage was necessary just to add models. Now even threading will be an issue for modders. And for what? For every person who got a better framerate, someone else got a worse one. And the implications of this system when filled with mods is going to be bad.

    I mean, I get why they came up with the model format that they did. They wanted something really simple that just some average young person or non-tech-savvy individual could figure out and whip up a model with. That's fine, I don't actually mind it in that regard. But then they had to do it in JSON, which is the opposite of being user-friendly. The very audience they're targeting with it is going to end up fighting with brackets and commas, and all the cryptic issues that come from that. They could have written their own incredibly simple text parser for a very similar format.

    Have you guys ever looked at just how many external code libraries vanilla Minecraft requires now? Thirty. Thirty! And one of those is required just for the JSON parsing. Minecraft used to use three libraries, for comparison. Meanwhile, the game grew by almost a thousand (!!!) more classes just since 1.6, with 1.7 being when the bloat really started to roll in.

    So one wall of text later, my point is basically that the game is bigger for no reason other than somebody wanted to write fancier code, and the game ended up no better for it.
     
  16. RavynousHunter

    RavynousHunter New Member

    Preeeeeeeecisely, Brother FyberOptic. Though, I feel that it comes from a combination of laziness and an amateur's take on design. Mojang hasn't seemed to learn the old adage that "something isn't complete when there's nothing more to add, but when there's nothing left you can take away." Take away all the bloat, all the pea-brained JSON models, and the additional things that were added, not to make the lives of Mojang or 3rd party content creators easier, but simply because they looked neat, and you'd likely have a game that would run an order of magnitude better, would require less space both in terms of HDD space and RAM, and would end up actually being a superior product to what 1.8 is now.

    They want the fancy toys, but they don't know how to use them properly, or even really why they want to use them. Why do they want a proprietary, JSON-based model format when there's things like Wavefront (which you mentioned Rorax mentioned) which do the job better and already have established toolsets that work with them? Reinventing the wheel is the kind of mistake made only by amateurs; those who've spent enough time with code know exactly why that's a bad idea. Now, certain things might require licensing to use, but I'm sure there's free and open source modelling libraries that are unencumbered by licensing fees and the like that would also be relatively easy to use and work with. Besides, its not exactly like they're hurting for money right now, anyways, I'm sure they could afford a license for a good-quality modelling library if they were that desperate to have one integrated into Minecraft rather easily.

    Mojang's an amateur developer trying to play in the professional leagues. That...just doesn't work.
     
    Strikingwolf and FyberOptic like this.
  17. lenscas

    lenscas Over-Achiever

    I would not be surprised if they are just sick and bored of it.
    It started as just a fun and small project notch once had, and look where it is now how much hours of dev time went into it. They already said they didn't put minecraft on the first place and instead wanted to focus on other projects but it is minecraft and as a result more time must be put into it while they probably want to work on something else and exiting.

    If you don't enjoy the project you work on you tend to make bad or at least not as good decisions then when you do enjoy to work on it.

    This together with the toxic community that even they probably experience and you have a perfect recepie for disaster.
     
  18. goldenapple

    goldenapple Well-Known Member Mod Developer

    Not necessairly an epic rant on Mojang, but I found this little gem in the ItemPickaxe class:
    Code:
        @Override
        public boolean func_150897_b(Block p_150897_1_){
            return p_150897_1_ == Blocks.obsidian ? this.toolMaterial.getHarvestLevel() == 3 : (p_150897_1_ != Blocks.diamond_block && p_150897_1_ != Blocks.diamond_ore ? (p_150897_1_ != Blocks.emerald_ore && p_150897_1_ != Blocks.emerald_block ? (p_150897_1_ != Blocks.gold_block && p_150897_1_ != Blocks.gold_ore ? (p_150897_1_ != Blocks.iron_block && p_150897_1_ != Blocks.iron_ore ? (p_150897_1_ != Blocks.lapis_block && p_150897_1_ != Blocks.lapis_ore ? (p_150897_1_ != Blocks.redstone_ore && p_150897_1_ != Blocks.lit_redstone_ore ? (p_150897_1_.getMaterial() == Material.rock ? true : (p_150897_1_.getMaterial() == Material.iron ? true : p_150897_1_.getMaterial() == Material.anvil)) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2);
        }
     
  19. RavynousHunter

    RavynousHunter New Member

    That is the most abominable misuse of the ternary operator I've seen in a very long time.
     
  20. ljfa

    ljfa New Member

    That probably comes from the decompiler.
    I think he was referring to how this is hardcoded into the pickaxe class.
     

Share This Page