Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, juanex, Grant), 1,018 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
can i dynamic create Blocks by lite-C? #388704
12/06/11 19:16
12/06/11 19:16
Joined: Dec 2009
Posts: 128
China
frankjiang Offline OP
Member
frankjiang  Offline OP
Member

Joined: Dec 2009
Posts: 128
China
can i dynamic create Blocks by lite-C?that means likes just create Blocks by lite-c not by wed editor.
dynamic create Blocks is so useful.so we can buildiing a collision scenes just used lite-C script.
this function likes "ent_create(..)" or "ent_remove(ENTITY*)".
Did 3dgamestudio has this function? And any one has good idea for this topic?

By the way,we can just used ENTITY Object to building a collision scenes. I think it is not better .

thanks a lot!


development 3d game is interesting!
Re: can i dynamic create Blocks by lite-C? [Re: frankjiang] #388706
12/06/11 19:23
12/06/11 19:23
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Happy Birthday Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
No, you have to use entities. Just ent_create them:

action level_block()
{
c_setminmax(my);
set(my,POLYGON); // same collision behaviour as WED's blocks, optional: INVISIBLE
wait(1); // may not be neccessary
my.emask &= ~DYNAMIC; // make it static
}


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: can i dynamic create Blocks by lite-C? [Re: Superku] #388733
12/07/11 02:17
12/07/11 02:17
Joined: Dec 2009
Posts: 128
China
frankjiang Offline OP
Member
frankjiang  Offline OP
Member

Joined: Dec 2009
Posts: 128
China
thank you ,i already know that.


development 3d game is interesting!
Re: can i dynamic create Blocks by lite-C? [Re: frankjiang] #388734
12/07/11 04:41
12/07/11 04:41
Joined: Oct 2004
Posts: 897
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 897
Lgh
Maybe you need just a region_create?


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: can i dynamic create Blocks by lite-C? [Re: rojart] #388737
12/07/11 07:42
12/07/11 07:42
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: rojart
Maybe you need just a region_create?
What have regions to do with collision detection?

"Blocks" are just primitives in WED that are used to build a static mesh that is saved in the wmb and reloaded later on. So, if you would create a dynamic mesh with enabled polygonal collision this is no difference to what you do with pre-designing it in WED and loading as WMB later. Though, creating several entities just to "emulate" blocks is not so nice, because you can predict fps drops.

What I suggest is to write a functions, that takes in a list of box descriptors (simply a struct with the origin, width, length, depth and orientation) and generates a mesh from it, for which you enable polygon collision. You can do this either during runtime directly with a DirectX mesh or with the MDL7 SDK (so you write all your boxes into one MDL file, load it, and enable polygon collision).

In the case that your game collision is entirely PhysX-driven, you can always add boxed shapes to the level entity. This is way more faster and convenient than building your mesh.

Re: can i dynamic create Blocks by lite-C? [Re: HeelX] #388793
12/07/11 16:55
12/07/11 16:55
Joined: Oct 2004
Posts: 897
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 897
Lgh
Originally Posted By: HeelX
Originally Posted By: rojart
Maybe you need just a region_create?
What have regions to do with collision detection?.

Nothing, was an Idea to simulate collision detection without WED or PhysX wink


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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