About source code)
quick watch it ^^
nice code - but have some not critical arhitecture errors
many code dublicated
//LightingEarth.java
if (z < 31 && chunk.getSunLight(x,y,z+1) < 14) {
lvl = getBlock(x, y, z+1).absorbLight(15);
lvl = getBlock2(x, y, z+1).absorbLight(lvl);
if (lvl > 0) {
if (setSunLight(x,y,z+1, lvl)) {
add(SUN_CAST, x,y,z+1); }
}
}
if (z > -15 && chunk.getSunLight(x,y,z-1) < 14) {
lvl = getBlock(x, y, z-1).absorbLight(15);
lvl = getBlock2(x, y, z-1).absorbLight(lvl);
if (lvl > 0) {
if (setSunLight(x,y,z-1, lvl)) {
add(SUN_CAST, x,y,z-1);
}
}
..
//can be optimized
//dublicates create small errors
function_absorbLight(x, y, z, lvlPrev){
int lvl = getBlock(x, y, z).absorbLight(lvlPrev);
lvl = getBlock2(x, y, z).absorbLight(lvl);
if (lvl > 0) {
if (setSunLight(x,y,z, lvl)) {
add(SUN_CAST, x,y,z); }
}
return lvl;
}
also will be good use more static var
for(int y=0;y<255;y++) {
for(int x=0;x<16;x++)
//
ChunkSizeY = 256;
ChunkSizeX = 16;
//good for refactoring
need window manager but not critical )
//CraftingMenu.java
//Hard for refactoring
public void mousePressed(int x, int y, int button) {
...
bx = 59;
by = 33;
for(byte a=0;a<9;a++) {
if (a != 0 && a % 3 == 0) {
bx = 59;
by += 36;
}
if (x >= bx && x <= bx+36 && y >= by && y <= by+36) {
Static.client.clickCraftlInput(a, button == 1);
}
bx += 36;
}
//check craft output
bx = 239;
by = 60;
if (x >= bx && x <= bx+36 && y >= by && y <= by+36) {
Static.client.clickCraftOutput(button == 1);
}
}
...
BUT- this all NOT important: its works and THAT WHAT Important.
So make game popular and after that can start fixing code ^^
p.s http://javaforce.sourceforge.net/ Man that Insane XD, so many cool tools
i have question - becouse i can’t find answer((
do you have any solutions for:
java - packet(TCP or UDP) tunneling for dedicated server
from users pc Internet without 3d party broadcast server?
(dirrect user connects through internet with gray IP’s)
(NAT traversal, UDP Hole Punching etc)
up: hm i think i finally find possible solution: SSH tunneling =)
(without UDP cheats ^^)
{try it later - in unknown future}