Main Menu
Menu

Show posts

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 Menu

Messages - athanazio

#1
Support / New here...
December 13, 2006, 02:02:02 PM
hey welcome !
this is a good place to start your java learning
http://java.sun.com/docs/books/tutorial/
#2
Support / SimpleVector[] model.getStack().peekAt(int)
December 13, 2006, 12:47:24 PM
is there possible to apply a texture to each face of the Mesh ?
#3
Projects / Technopolies
December 12, 2006, 10:52:44 PM
I tried with the clone but still have the same problem ... :(
(feeling stupid) hehehehe, its part of the game hehehe
#4
Support / 2D Isometric Maps With 3D Models...
December 12, 2006, 10:44:06 PM
Egon, learned a lot from the sample that you said to look at, but I'm still missing how to add diffetent textures for pieces of the map.... any idea ?
#5
Support / 2D Isometric Maps With 3D Models...
December 12, 2006, 09:43:38 PM
I tried something with the planes... but got out of memory on that
http://www.jpct.net/forum/viewtopic.php?t=190&start=375

any ideas ?
#6
Support / collision basics
December 12, 2006, 09:40:53 PM
thanks !
but this one worked very fine ...
I'm in trouble now with the terrain creation hehehe
#7
Projects / Technopolies
December 12, 2006, 08:38:24 PM
oh well ... not lucky :)
my frist try didn't gave me nice results ... just outofmemoryerrors, any sugestions ?

public class Map extends AbstractEntity {

private int height;

private int width;

public static final int SQUARE_SIZE = 50;

/**
* define the number of subpanels that the map will have defined in a matrix
* [width x height]
*
* @param width
* @param height
*/
public Map(int width, int height, World w) {
super(Primitives.getPlane(SQUARE_SIZE, 1), w);
createThePlanes(width, height);
}

private void createThePlanes(int width, int height) {
this.width = width;
this.height = height;

Object3D[][] matrix = new Object3D[height][];
for (int i = 0; i < matrix.length; i++) {
matrix[i] = new Object3D[width];
}

int shiftX = SQUARE_SIZE;
int shiftY = SQUARE_SIZE;
String textureName = "red";

for (int i = 0; i < matrix.length; i++) {

for (int j = 0; j < matrix[i].length; j++) {
matrix[i][j] = Primitives.getPlane(SQUARE_SIZE, 1);
matrix[i][j].translate(shiftX * i, shiftY * j, 0);
matrix[i][j].setTexture(textureName);
addChild(matrix[i][j]);
prepare(matrix[i][j]);

// TODO remove this
if (textureName.equals("red")) {
textureName = "white";
} else {
textureName = "red";
}

}

}

prepare(this);

}

private void prepare(Object3D one) {
one.rotateX((float) Math.toRadians(90));
one.translateMesh();
one.rotateMesh();
one.setTranslationMatrix(new Matrix());
one.setRotationMatrix(new Matrix());
// one.createTriangleStrips(2);
one.enableLazyTransformations();
}

private static final long serialVersionUID = 1L;

}
#8
Projects / Technopolies
December 12, 2006, 06:49:25 PM
thanks Andrei !!

I was afraid that the creation of a plane with 1000s of small plane would reduce the performance, but it seems that dont :)

I will give a try !!

thanks again
#9
Projects / Re: ideas
December 12, 2006, 06:21:13 PM
Quote from: "rolz"
1. Terrain generator.

The common concept for landscapes in technopolies was in
- making it easy to edit (drawing landscape map in photoshop with a couple of brush strokes)
- making it lightweight enough to be transfered via network (~4kb for a 1000 x 1000 meters level)
- make it possible to be divided into regions (to define footstep sounds for different tiles, add effects like sand smokes and animated grass )
- load / render only visible parts of a bigger level

I'm very curious how you make this :)
split a big plane in smal rectangles ... can you share this one ?
pleeeease
#10
Support / show selected object
December 11, 2006, 04:47:06 PM
the aura and the green circle to show that the object is selected ...
I'm not sure how to set the texture transparency to put a plane close to the ground and still show the ground texture.
#11
Support / show selected object
December 10, 2006, 05:20:41 AM
I'm thinking about to show the current selected object, using a elipse at the ground where the object is like this image bellow :



any ideas ?

was thinking about an transparent plane between the ground and the character base and draw on this plane ... not sure if it will work or not ...

suggestions ?
#12
Support / collision basics
December 10, 2006, 05:16:55 AM
errr
I solved the problem (at least I think I solved ...)

at the code


int collisionObject = w.checkCollision(getTransformedCenter(), where, 5 );


I increased the distance of the colision check from "5" to "25" and now my character lost its "ghost" powers ... ehhehehe

so it become :



int collisionObject = w.checkCollision(getTransformedCenter(), where, 25 );
#13
Support / collision basics
December 10, 2006, 04:28:28 AM
Now my journey in the JPCT its in the collision phase ...

Well sometimes the Character is able to go thru the cube, sometimes it hits the cube, and got stopped, so sometimes its working, sometimes not ... any help would be great !


look what I'm doing :

I have a class that Wrap around every Object3D that I create, and this is the translate method

public void translate(SimpleVector where) {
int collisionObject = w.checkCollision(getTransformedCenter(), where,
5);
if (collisionObject == Object3D.NO_OBJECT) {
super.translate(where);
syncTranslate(where);
}
else {
System.out.println("colide with " + collisionObject );
}
}


the basic idea is dont allow those objets to go thru other object ... :)

and this is the init() method of my Game class

public void init() throws Exception {
System.out.println("Config.maxPolysVisible=" + Config.maxPolysVisible);
Config.maxPolysVisible = 12000;
Config.collideOffset = 250;
Config.tuneForOutdoor();

addTexture("alita2", "models/alita/alita2.jpg");
addTexture("floor", "textures/floor.jpg");
addTexture("red", "textures/red.jpg");

AbstractEntity[] list = new AbstractEntity[3];

list[0] = ModelUtil.loadModelMD2(getWorld(), "alita/tris", 0, -90, 0,
0.9f);
list[0].setTexture("alita2");
setCurrent(list[0]);
Animation run = list[0].getAnimationSequence();
anim = run.createSubSequence("run");

list[1] = new AbstractEntity(PlaneUtil.getPlane("floor", 20, 300),
getWorld());
list[1].setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);

list[2] = new AbstractEntity(Primitives.getCube(50), getWorld());
list[2].setTexture("red");
list[2].setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);

addObjects(list);
PositionUtil.placeOver(list[0], 0, 0);
PositionUtil.placeOver(list[2], -50, -50);

CameraUtil.setCameraLookingFromTop(getCamera(), list[0]);

LightUtil.addDefaultLight(getWorld());
addFPSListener(this);
Config.tuneForOutdoor();
Logger.setLogLevel(Logger.LL_ONLY_ERRORS);
}
#14
Support / GUI development with JPCT
December 07, 2006, 04:07:19 AM
I believe that would be great to have a set of classes to deal with data input, menus, and things like this ... all of then running over jpct, and beeing draw over an framebuffer with the blit() method ... :) would be great !
#15
Support / I need the world looks like a real world.
December 07, 2006, 12:08:58 AM
not sure, but I believe that if you place your light far away in the -Y it would be light the sun light .... I think ...