Will not be brilliantly paid at the moment, hence the part-time, but we're hoping someone will see it as a potential opportunity for when the game becomes more successful and future big rewards, possibly profit share or something, for anyone willing to go above and beyond.

What would be the main responsabilities of this new guy?Anything specific or doing everything related to the game?

Initially and in the short term it would mainly be memory optimization (we're having issues with what seem to be GC pauses but apparently aren't, and something doesn't add up) mixed with some self-contained tasks to help become more familiar with the code-base. Ultimately it could range from anything from bug fixing to entire system development and there would be room for design input should you wish to be involved in that. Primarily we need someone who is very well versed with Java's intricacies, since I (the only dev on the project) come from a C++ and C# background and have as such fallen into a few Java specific traps and have little knowledge of optimizing the JRE, GC and other things.

NP sorry didn't realize it was misread wouldn't have jumped down your throat quite so much.

That was my fault.

I know a game programmer who might be interested by your project. I already asked him to work on a (paid) game project that I didn't want to do (a Javascript game for ADSL set top boxes) and he did a nice job. He has a lot of experience in Java, C, C++ and Javascript.

The former won't do anything, the compiler will be better than you at optimizing stuff like that in 99.9% of cases. In fact, all you will accomplish is obfuscating your code and wasting time on premature optimization. And it's micro optimization, which is even worse because it's usually wrong.

If you really want to get picky, I'd say having a while( true ) anywhere in your code ever is a poor idea. It's just bad practice to purposefully put an infinite loop anywhere, because if you have complex logic for the break or return statements inside you can mess things up and miss an edge case. Then you're borked.

As for the latter, as far as I know those memory amounts are correct. But, using a byte or short or whatever rather than just using an int is still a premature optimization most of the time. If you're allocating a massive state array or something, well okay. But otherwise, why bother until you need it? Most systems have gads of memory now, and in games your bottleneck is going to be image and sound assets, not random variables in memory.

The former won't do anything, the compiler will be better than you at optimizing stuff like that in 99.9% of cases. In fact, all you will accomplish is obfuscating your code and wasting time on premature optimization. And it's micro optimization, which is even worse because it's usually wrong.

The JVM Specification actually states that the two approaches are equivalent, IIRC. Space for all local variables of a method is pre-allocated at method invocation. It doesn't matter whether a variable is declared inside of a loop or outside of it. Variable scope should be based on what makes the most sense.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org