Open Terraria Rewrite

Discussion in 'Working in Progress Mods' started by Shockah, Dec 11, 2012.

  1. Shockah Grandson of the Wizard

    Hi guys!
    Recently when modding Terraria I got so pissed off at the lack of actual object-oriented programming usage and how bad was the Terraria's code, that I decided to redo Terraria. From scratch.
    Before you start yelling at me "BLAH BLAH TONS OF PEOPLE ALREADY SAID THAT BLAH": I know I can't do it by myself. And I know it will take much time. And that's why I'm posting about it here.

    The plan, for now:
    • rewrite without caring about "details" ("OH NOEZ, THE HEARTZ NEED TO BE SHIFTED 1 PXZ"), but still making it look like the original game
    • rewrite in Java (again, before you yell - Java is NOT slow. People just make you THINK it's slow) + libs: LWJGL, Slick 2D, EasySlick (my own lib helping me develop games in Slick); *maybe* switching to libgdx, but I'd rather not
    • not caring about compatibility with original client/server - the network protocol could be greatly improved
    • not caring *that much* about compatibility with old characters/worlds, but making it possible to import them from the original game; maybe writing a separate exporter to the old format
    • making the game moddable right from the start, to make sure everything will be possible; basically making the "vanilla" content into a mod for the base game, again to make sure everything will be possible
    • not using any content from original Terraria DIRECTLY. Converting resources from XNB format to PNG / WAV / SomethingThatWillStoreSpriteFonts
    • keeping the source open, on GitHub, so anyone can contribute to the development
    • not caring about Starbound. Seriously, I don't really like it. I don't know why. But yeah, Starbound is NOT Terraria 2, so don't bring it up
    • AFTER the project gets finished (after making sure the vanilla content is working), and IF we can get it finished, helping people remake their tConfig mods into OTR mods (Open Terraria Rewrite)
    Open Terraria Rewrite on GitHub
    Me on Twitter (turned on GitHub notifications)

    CropImage.png

    EDIT: Ignore the Terraria content on GitHub for now, still need to make use of my XNB converting code.
  2. Surfpup Raincoat Zombie

    On the plus side, Java is pretty similar to C#, so modders won't have to learn a whole lot and converting mods to Java might not be too difficult.

    I recommend trying to build Terraria content as a separate module / mod, so that this project may also be useful as a more general-purpose 2D side-scrolling engine, with Terraria content being completely optional.
    NeonJ, Shockah and Yoraiz0r like this.
  3. Modder35342 Bunny

    I suggest you first take a look at Predator106's thread on the subject (see the third post). You may even want to join his effort, instead of starting a concurrent development.
  4. MiraiMai Fire Imp

    Finally going public with this? hehe

    That is already planned, it's even in the post :p "basically making the "vanilla" content into a mod for the base game"

    C++ and Java are very different monsters. The biggest difference is that Java is much more mod-friendly. Also, Predator106 called it a clone, which in gamedev usually means it will be similar to the game, but not always identical.
    Shockah and Yoraiz0r like this.
  5. Shockah Grandson of the Wizard

    That's kinda the plan, but I'm still considering base concepts like "player" available right in the game, without any mods. It's Terraria, right? Why would you not use the player you have there?
    It would be good for total conversion mods - changing all content to custom, other than some basic stuff Terraria wouldn't exist without.
  6. Ijwu Crimera

    Well, good luck. I'm glad that you seem to have not decided to do this out of the blue. You seem to have planned ahead a bit, you have some guidelines that you want to follow even. Also, it seems like you talked to some people about it before going public, as MiraiMai hinted at.

    So, good on you for having some idea of what you're going to do before jumping into this and going public. Not that it means much, but you have my support.
  7. Duglink Cursed Man

    terraria in java? im on it :D
  8. Wingzero007 Green Slime

    This a wonderful idea man! I really think you got a great idea here my only suggestion is hurry up lol! I honestly love terraria but I am sure as you noticed its only a half completed project that seemed more focused on profit then gameplay. I was wondering if you and surfpup wouldn't mind adding a enable/disable feature of rpg style gameplay much like your tconfig style mods? Also if you could do me another huge favor of focusing highly on multiplayer compatibility? My fiancee and I love playing terraria together but multiplayer has sooooo many issues with mods... Anyways wonderful Idea and great luck (screw good you get GREAT! luck! ^_^ )
  9. MantasX12 Dungeon Guardian

    Plz post more screenshots after a while okay ? ;)
  10. Shockah Grandson of the Wizard

    So, I'm wondering now... Do I really have to convert the resources? Does anyone know if making a check for Terraria on the user's Steam account would be a good enough check to let him download the resources? Obviously with random links each time, so people can't post the link publicly. It would save me much time, and making a user login with Steam from my own website shouldn't be that hard to achieve.

    I'm not going to make this a part of the vanilla rewritten game, but as it'll be moddable as hell, anyone will be able to write such a mod.
  11. Ijwu Crimera

    Do you really need to convert the resources? (By resources I assume you mean the graphics, music, fonts, etc. Please correct me if I'm wrong.)

    Wouldn't it be easier for you to check the user's registry (I think Steam keeps install paths there) for their installation directory and use the resources there? Even if they're unusable in XNB, you could possibly extract them to usable formats, like the XNB to PNG tool floating around the forums.
  12. Shockah Grandson of the Wizard

    The problem is - copyright. I can't publish the resources publicly just like that, and I can't really use XNB files. So, there are 2 ways left.
    1) Convert them
    2) Download them from somewhere

    The problem with converters... The audio converter is simple enough, seems like these XNB files aren't compressed with this modified LZX compression algorithm. Sprites though... You know the sprite exporter tool? IT'S WRITTEN IN XNA. That's why it can load the files easily. It just loads them through XNA and writes them back as PNGs.

    I got the basic XNB format reading covered, but Terraria's XNB files with sprites have the compression flag set = I can't do a thing with it.

    That's why opening a page which lets you login through Steam lets me check whether you bought Terraria, and act accordingly - if the user has the game, generate a new download link for his IP (IP check, works only for 24h, then you have to re-login).
  13. MiraiMai Fire Imp

    Is there an XNA equivalent for mono? Or does XNA work with wine? You could always have a binary tool written in C# run by the game if it doesn't find the sprites to extract them.
  14. Ijwu Crimera

    Well, the point of me bringing up an alternative solution is that hosting the resources and allowing users to download them breaks copyright laws, I believe. I don't think you're allowed to distribute the game's resources. I doubt you'll be persecuted, but you seem like you want to keep things legal.
  15. Shockah Grandson of the Wizard

  16. Modder35342 Bunny

    If the user is required to buy Terraria in order to use its free open-source remake, you may as well stick with the original game and save your efforts on something else. What this needs is what was asked in the thread I linked earlier (there's also a discussion over here)—a copyright-free alternative asset pack that you can include with the clone free of charge. God knows Terraria's assets isn't that difficult of a job to emulate.

    Meanwhile, to get things started without an alternative asset pack, instead of implementing shady Steam ownership checks and forcing people to go online, you could probably just give a set of instructions of copying Terraria's assets to the clone's folder and then running an extractor of some sort. Knowing Steam's default installation folder used by 99% of its users, you can probably automate the whole thing through an installer or a batch file.
  17. Shockah Grandson of the Wizard

    No, the whole point of this rewrite is to make Terraria work better, not make a clone named by its name.
    I already got a working code for getting the Steam install directory from the Windows registry.
    Also, that going online thing - it would be only a one-time thing. As long as the resources are there, people will be able to run it. And I don't want it to be even easier to "crack" than original Terraria. I need to at least check (somehow) if the user has it - either by checking the Steam account or figuring out he has the resources.
    Actually... I could just check the hashes of the resource files, and if all are just right, let the user download the extracted ones...
  18. MiraiMai Fire Imp

    Either way, downloading them would still be copyright infringement ^-^;; Hence my suggestion of make a CS tool to do it for you, get it working by itself, and then run the executable from the java game if needed. Don't try to rewrite the decoder :p
  19. Shockah Grandson of the Wizard

    Don't you think that would be annoying to run on Linux/OSX, then?
  20. MiraiMai Fire Imp

    Just tell people they need mono / wine :/ Terraria was only built for windows, so they need wine anyways for the tool to be useful to them. Could also have the tool downloadable separately so they can just put it on their windows partition(I'd assume they do that over wine) to extract them, maybe to an archive, and have the game load all the resources from that archive.

Share This Page