Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Help Can not use more than 19 Entitys [Re: tindust] #185882
02/29/08 00:57
02/29/08 00:57
Joined: Feb 2008
Posts: 22
R
RaceBert Offline OP
Newbie
RaceBert  Offline OP
Newbie
R

Joined: Feb 2008
Posts: 22
phent_settype is set to BOX because I try to mage layers of bricks

I will try the POLYGOM=ON etc.

But I think the problem is the CPU-Power (E6600)

The bricks colide not correct after about 40 bricks.


A8 PRO
Worst possible programmer (as bad as my english)
Re: Help Can not use more than 19 Entitys [Re: RaceBert] #185883
02/29/08 01:33
02/29/08 01:33
Joined: Aug 2005
Posts: 312
Sweden
tindust Offline
Senior Member
tindust  Offline
Senior Member

Joined: Aug 2005
Posts: 312
Sweden
Hmm, not sure exactly what you trying to do, but if you continue to add physics entities you might try to turn off the physics for those that are not needed any longer. That would free up cpu power.

Re: Help Can not use more than 19 Entitys [Re: tindust] #185884
02/29/08 10:41
02/29/08 10:41
Joined: Feb 2008
Posts: 22
R
RaceBert Offline OP
Newbie
RaceBert  Offline OP
Newbie
R

Joined: Feb 2008
Posts: 22
I build some constructions with bricks [phent_settype(eBrick0001,PH_RIGID,PH_BOX);]. Later I plan that the player can set the bricks in his own way.

Planned were a little game with about 200-500 bricks.

If the bricks are close to each other the prblems happen.
When I put boulder [phent_settype(eBoulder,PH_RIGID,PH_SPHERE);] in my landscape, the problems do not happen...

I think the problem is the distance between the bricks. I can place about 100 bricks with a greater distance to each other without problems.
If I build a staple with 20 Bricks, no problems happen.
If I try to build a wall, the problems causes..

(Excause me for my bad english - i red the manual but I do not understand all, I got A7 on beginning this week)


A8 PRO
Worst possible programmer (as bad as my english)
Re: Help Can not use more than 19 Entitys [Re: RaceBert] #185885
02/29/08 11:54
02/29/08 11:54
Joined: Feb 2008
Posts: 22
R
RaceBert Offline OP
Newbie
RaceBert  Offline OP
Newbie
R

Joined: Feb 2008
Posts: 22
eBrick0001.POLYGON=on;
set(eBrick0001,POLYGON);
does not work....
Syntax Error

Last edited by RaceBert; 02/29/08 11:58.

A8 PRO
Worst possible programmer (as bad as my english)
Re: Help Can not use more than 19 Entitys [Re: tindust] #185886
02/29/08 12:48
02/29/08 12:48
Joined: Feb 2008
Posts: 22
R
RaceBert Offline OP
Newbie
RaceBert  Offline OP
Newbie
R

Joined: Feb 2008
Posts: 22
Maybe I do not understand everthing from the manual because it is in english.

function Brick(var m_x, var m_y, var m_z,var mBy)
{
var y_position;
eBrick0001 = ent_create("Brick.mdl" ,vector(m_x, m_y, m_z), NULL);
phent_settype(eBrick0001,PH_RIGID,0);
phent_setmass(eBrick0001,0,PH_BOX);
eBrick0001.POLYGON=on;
set(eBrick0001,POLYGON);
// wait(1);
vec_set(eBrick0001.min_x,vector(Br_x-0.01,Br_y-0.01,Br_z-0.01));
vec_set(eBrick0001.max_x,vector(Br_x-17.97,Br_y-35.97,Br_z-12.97));
// wait(1);
c_setminmax(eBrick0001);
// c_updatehull(eBrick0001,1);
// wait(1);
y_position = eBrick0001.y;
eBrick0001.y = y_position+mBy;
// wait(5);
phent_settype(eBrick0001,0,0);
phent_settype(eBrick0001,PH_RIGID,PH_BOX);
// wait(1);
phent_setmass(eBrick0001,3,PH_BOX);
phent_setfriction(eBrick0001,90);
phent_setelasticity(eBrick0001,70,70);
phent_setdamping(eBrick0001,90,90);
set(eBrick0001,SHADOW);
eBrick0001.material = mat_metal;
eBrick0001.emask |= ENABLE_FRICTION;

// wait(5);
}


A8 PRO
Worst possible programmer (as bad as my english)
Re: Help Can not use more than 19 Entitys [Re: RaceBert] #185887
02/29/08 17:14
02/29/08 17:14
Joined: Aug 2005
Posts: 312
Sweden
tindust Offline
Senior Member
tindust  Offline
Senior Member

Joined: Aug 2005
Posts: 312
Sweden
Since you are using models you may try to in script manually change the bounding box sizes. Look at the instructions for c_setminmax(ENTITY* ent) and min_x,max_x. Decrease the bounding box sizes hopefully solves the problem.
Here is the link to online manual.

Re: Help Can not use more than 19 Entitys [Re: tindust] #185888
02/29/08 18:32
02/29/08 18:32
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Code:

function Brick(var m_x, var m_y, var m_z,var mBy)
{
eBrick0001 = ent_create("Brick.mdl", vector(m_x, m_y+mBy, m_z), NULL);
set(eBrick0001, SHADOW);
eBrick0001.material = mat_metal;
//
phent_settype (eBrick0001, PH_RIGID, PH_BOX);
phent_setmass (eBrick0001, 3, PH_BOX);
phent_setfriction (eBrick0001, 90);
phent_setelasticity (eBrick0001, 70, 70);
phent_setdamping (eBrick0001, 90, 90);
}




xXxGuitar511
- Programmer
Re: Help Can not use more than 19 Entitys [Re: tindust] #185889
02/29/08 19:12
02/29/08 19:12
Joined: Feb 2008
Posts: 22
R
RaceBert Offline OP
Newbie
RaceBert  Offline OP
Newbie
R

Joined: Feb 2008
Posts: 22
I tryed it like your Code xXxDisciples but it will not work.

To change the size with c_setminmax() will not help too.

I am really confused

Last edited by RaceBert; 02/29/08 19:17.

A8 PRO
Worst possible programmer (as bad as my english)
Re: Help Can not use more than 19 Entitys [Re: RaceBert] #185890
02/29/08 20:44
02/29/08 20:44
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I simply cleaned up your above code. I didn't look into the details...

Everything looks fine, but the physics engine is not going to like having all those objects stacked together, especially 3DGS ODE physics. Try using Newton, it handles this better, but you'll still get bad results...

You'll need to manually switch physics on/off for the bricks...


xXxGuitar511
- Programmer
Re: Help Can not use more than 19 Entitys [Re: xXxGuitar511] #185891
03/01/08 08:18
03/01/08 08:18
Joined: Aug 2005
Posts: 312
Sweden
tindust Offline
Senior Member
tindust  Offline
Senior Member

Joined: Aug 2005
Posts: 312
Sweden
Yeah, xXxDisciple is right. (Kind of liked your old name xXxGuitar511 )

It's a real challange to the physics engine. Well, looking at what you try to create I wonder why you want to use physics at all when building the wall? It may be easier to have the bricks be non-physics entities when the wall is being built or changed by the player. Theb if there is a particular event occurring, change the involved bricks into physics ents. Then you avoid the condition that is the root of the problem.

Page 2 of 3 1 2 3

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1