DEV Community


How do i scale in Java correctly?

Memphis Lee Richard Herghelegiu
Hello, my name is Memphis, I code since im 11 years old, now im 15. I code with java and c#. I learned all by myself. ^^
・1 min read

I have long been wondering how to correctly scale everything in a game (programmed in java). So the things that are displayed and the things that you can interact with. Please write me a solution or an example. Thanks in advance ;)

Discussion (2)

simerplaha profile image
Simer Plaha

Congrats on learning how to code by yourself! Takes a lot of commitment to learn anything on your own.

I think narrowing your question would find you a good answer with an example because scalability is broad subject. But I want to help so here is a broad answer.

As far as coding in Java goes and without getting into immutability & pure-function etc, I would say make sure things are decoupled. By decouple I mean writing each function and class such that the code is not tightly integrated with the rest of your system and that you can test your functions and classes independently without having to spawn up the entire system which in your case would be a game.

Keep coding!

inxmi profile image
Memphis Lee Richard Herghelegiu Author

Thanks for the tip