Runescape uses some specific optimalizations. Runescape doesn't use a z-buffer and the screen width is 2^n.
Good luck anyway.
Good luck anyway.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuoteQ: Is it possible to use LWJGL from an Applet?
A: Unfortunately, no. However you can start a LWJGL application from a webpage using Java WebStart. For more information click here
public void loadLevel(String level)
{
int y = 0;
int z = 0;
boolean onPlatform = false;
levelObj = new Object3D(0);
try{
URL url = new URL(getCodeBase(),level);
InputStream inStream = url.openStream();
BufferedReader dataStream =new BufferedReader(new InputStreamReader(inStream));
String inLine = null;
while((inLine = dataStream.readLine()) != null)
{
if(!inLine.equals(";"))
{
int x = 0;
while(x < inLine.length())
{
if(inLine.charAt(x) == '#')
{
//This command adds a blue block
Object3D Box1 = block.cloneObject();
if(!onPlatform)
Box1.translate(x*4,y*4,z*4);
else
Box1.translate(x*4,(y*4)-0.5f,z*4);
levelObj = Object3D.mergeObjects(levelObj,Box1); //add the block to the level
}
else
if(inLine.charAt(x) == 'R')
{
//This command moves the red sphere
sphere1.translate(x+5,y-1.5f,z-2); //move the sphere
camera.setPosition(x+5,y-1.5f,z-10); //move the camera
}
x++;
}
z++;
}
else
{
//go to the next platform or to the 2nd layer of the current platform
if(onPlatform)
onPlatform = false;
else
onPlatform = true;
z = 0;
if(!onPlatform)
y--;
}
}
}
catch(Exception e){System.out.println("Exception while loading the level: " + e);}
levelObj.createTriangleStrips(2);
OcTree tree = new OcTree(levelObj,12,OcTree.MODE_OPTIMIZED);
levelObj.setOcTree(tree);
theWorld.addObject(levelObj);
theWorld.buildAllObjects();
}
Page created in 0.022 seconds with 12 queries.