Edit: think you could show me how you do collision between the player and the blocks?
There are many ways to do this =)
Player is point in space (else think can do self
First) create for cube collision sphere , if player in sphere check how far and drop it out on this distance.
Second) collision with cube, there are 2 cubes for collision ,first is always not rated cube
(I use them now),second cubes may be rotated(want rewrite in this later
Third) collision with triangle polygon (or quad) for these need understands linear algebra
that’s hard write in couple words, easy simple find ready code in Google:)
You should add an "Online" paragraph like the "Offline" with an applet link that send you to a login/register page.
Beside that, i will not register to test something.
Ty fix it in new patch;)
You always can try java application instead of Applet
I think this can help to understand how collision work.
Let say you have 2d space ,you have sphere with radius 6 in point of 0,0
And player in point of 4,3
Need calculate distance if shi(point) lesser then radius then shi need collision
Now need calculate in what side need drop down player =) for this you need knew from what point shi start moving before collision (in game I calculate this really easy I take position of object then add direct speed vector, if new position create collision fix vector, after all collision gone add fix vector to origin position)
Let say player star moving form 7,3 then in theory (7,3 -4,3 =3,0) that’s our direct vector
So we now know in what direction need drop down player
6= Sqrt(X*X+3*3) ////3 because shi stay on Y=3 on all path.
(if Vector move by diagonal need calculate point on "moving diagonal" where is start collision and move player there from sphere (that’s many code and many Explanations
We have X.The new position is X,3
More info in Google
Heer is my collision
I even don’t realize how many Cpu used for Draw. Hm…
Strange and mysteries thing happen :2 hr ago game take 20-30% Cpu, that’s strange (all versions ),
I start thinking that’s I doing something wrong ,after many try’s I don’t find error in code, and I start think that’s its normal and I cant fix it, but after I go in street and restart pc game start takes
0% Cpu (sometimes 10%-12%) like always (all versions) after thinking I decide that’s problem in java(I think its Gc) (version with cpu changing by Aliens and parallel world I decide to cast away
Ok now I am sure on 99% its GC take 10+% cpu ****** ….. =)
Finish rewriting Bsp tree (only small things left) also rewrite placing blocks (this is part of bsp tree
)hope tomorrow start doing unlimited world.
Lol I find why java start using more cpu on 10-30% ,when my Music player work (or else game, player cpu usage 0% =)) java eat more(game show 62 fps), when off less(game show 58 fps)
Like I said before its java problem =)
Also find :not all code start lags only Lwjgl Gl (maybe else code lagging too but its not see).