Euflorium: The Eufloria Community
Eufloria => Eufloria HD Mods => Topic started by: Aino on November 25, 2012, 11:50:47 AM
-
Since there has been so much asking for a map editor, I'm going to make one. I just need help with one thing:
How do you calculate the positions in the game? This meaning how do you calculate the mouse position and make the entities rendered orient themselves around the middle of your screen?
I've been trying around for 4 hours. I wanted to keep it secret, but it's inevitable :/
Solved(this is java codes!):
public int findX(float x) {
return (int) (x * mng.camera.zoom - mng.camera.x * mng.camera.zoom + mng.frameObj.getWidth()/2);
}
public int findY(float y) {
return (int) (y * mng.camera.zoom - mng.camera.y * mng.camera.zoom + mng.frameObj.getHeight()/2);
}
public int findXR(float x) {
return (int) ((x-mng.frameObj.getWidth()/2) / mng.camera.zoom + mng.camera.x);
}
public int findYR(float y) {
return (int) ((y-mng.frameObj.getHeight()/2) / mng.camera.zoom + mng.camera.y);
}
-
Is this for HD?
If so, pm me your best email (if not the one used to register here) and I'll answer anything you want to know and keep you informed of plans.
-
Since there has been so much asking for a map editor, I'm going to make one. I just need help with one thing:
How do you calculate the positions in the game? This meaning how do you calculate the mouse position and make the entities rendered orient themselves around the middle of your screen?
I've been trying around for 4 hours. I wanted to keep it secret, but it's inevitable :/
well,there truely exist some editors for classic mod ,not work very well though...
-
So is this going to be a standalone map editor application, or another Lua "level" that you load that lets you load and edit other maps?
-
So is this going to be a standalone map editor application, or another Lua "level" that you load that lets you load and edit other maps?
This is going to be a standalone Java application which you can run from a .jar file. This should also make it compatible with all operating systems(unless you're running a very special one).