Code Optimization and Porting

    Joined
    Mar 25, 2014
    Messages
    17
    Reaction score
    5
    Hey guys. I'm a little new hear, so this is gonna seem really pretentious of me.... but I really like the game so I'm gonna go ahead and give my opinion. Don't get mad!

    This game is awesome. When I found it I was super excited about it, and I enjoyed all 3 of my first hours of gameplay before my graphics drivers were reset and I had to close the game. I started it up again multiple times and played a good bunch of hours over the past few days. I even made a carrier which held 6 ships and had enough power to be cloaked for 3 seconds, and I fought pirates and demolished a space station. (idk if these are all great achievements or not, but considering the short time i've had, I feel pretty accomplished). I love the way the blocks interact with each other, and how you can optimize your power and docking and turrets with different shapes of support blocks. This is just a great game, and I would love to see it get better.



    Now, here's my issue: The game is poorly optimized. It has obvious memory leaks, and it uses WAY too much CPU power for what's going on in the game (afaict). I looked around in the files that came with the game, and I saw some OpenGL, some Lua, and some Java.

    The developers are obviously not bad coders. They've made a great game (and I'm sure they're working on optimization and have next-steps already in mind). This game has a great dev team. What I want to suggest is that the entire game gets ported out of Java and into a language which is better for big projects (C++ or, dare I say it, C# with Unity).

    Before you guys get all pissy at me for suggesting that: I am a Computer Engineer. I know exactly what I'm asking you to do, and how difficult it will be.

    I'm guessing that Java was used because:
    -it's easy to write this type of code in java
    -minecraft was written in java, and is similar
    -there's plenty of example code for this type of game on the web, written in java
    -Java is platform independent

    However:
    -Java's optimizing compilers are not as good as can be found in, say, C++.
    -Java doesn't have the same memory management options as other C languages, (it does have garbage collecting, which I understand is useful, but afaik the only reason this is attractive is because it means you don't have to manage your own memory... and managing your own memory is still better.)
    -Despite what the internet tells you about coding 2D games in Java, it's not the best language for large-scale projects with 3d rendering. It's just the "most portable" to different OS's. However, something coded in C++ or C# with Unity CAN be compiled on any operating system, nullifying the portability advantage of Java.
    -Java doesn't have the same precedent for 3D game engines as C++ or C#. C++ would give us a lot to work with.

    Now, I understand that Java will improve as more developers use it for games, but this particular project just has so much potential! I'm not aware of any other really good free space-fighting-sims; not to mention the crafting/building aspect of the game. I want it to be great before Java gets its 3D gaming act together.

    If you don't want to do it yourself, let me help. Give me the source and I'll work on it. I don't expect to "finish the port" anytime soon, especially if I'm the only one doing it, but I'd love to help out.

    Alright, thanks for hearing me out.
    ~Boxcartenant

    *bracing for negative responses*
     
    Joined
    Aug 21, 2013
    Messages
    61
    Reaction score
    0
    i am doing ALEVEL Computing 3 years early and so i understand you completley


    I also agree that java is not the greatest language as its quite weak for a third level imperative language but unlike things like unity i feel that java is much more flexable for program writing, from my experiance languages like C++ and C* yes they are better languages, yes they have better validations but they as far as i know have schine engine capacity which would cause big issues with the current game stage.

    unfortunatly i have to adress the elephant in the room, its another language. with the current stage in development poor Schema is doing many different improvments and updates (hes doing his best with java even though as you said the C languages are more powerful), my only real reason about not suporting this is the fact that i dont feel that completley re-writing the game at its current state is a good idea. Schema has enough on his plate for the time being, however this ocouring later on in development would be fine provided programs and development tools are combatible,



    Thanks for Reading and i hope you apreciate my response,



    PS: sorry for the negative response but what did you expect? theres always one sorry its me =)

    *Lemons Away!!*
     
    Joined
    Mar 26, 2014
    Messages
    46
    Reaction score
    0
    From what I understand Java is pretty bad for the processor but allows for easy porting. This game does make my laptop go like crazy trying to render things
     
    Joined
    Mar 25, 2014
    Messages
    17
    Reaction score
    5
    Thanks for reading, and thanks for the thoughtful response. I definitely understand and agree that making this kind of change would be a big task. I also see your point that it may not be the most beneficial thing for the devs to do at this stage in development.

    I\'m not sure that I understand how it could happen more easily at a later stage, though. Perhaps rewriting at a later stage would have a smaller impact on the community, but the longer we wait the more difficult it will be to port out.

    Ultimately the dev\'s decisions are canon, and I wouldn\'t hold it against them if they didn\'t port.. but I would be really disappointed.

    On a related note... is the source repository available to the public?
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    I think in OOP Java Programms you spend too much time writing getter/setter methods.

    And using a function to set a value where a compiler could decide wether to filter/check this value in a filter-function or just set it is not optimal.

    I don\'t know how well it runs as in processor-time for a function call compared to languages in the C-family, but I would like to give a compiler or have it to judge about how often an object is created/attached/deleted for better optimized memory management.

    I am interested into low-level mechanics, because I really dislike buggy or feature-lacking solutions below the level of your program (Example: I dislike buggy, slow, ressource-heavy and feature-lacking IDEs for the language I am programming in, such as auto-indenting lines continue at the beginning in the next line without visual indent-level indications).

    But I think a working (balanced) trading system and something to make it fun in the long term is more important.

    (Build limits as 10x10x10 blocks and mirrow mode only are not supporting fun in the long term!)