Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Edgar_Herrera, VoroneTZ, Akow), 973 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
About entity_max error E1513 or E1005 #471295
02/27/18 04:20
02/27/18 04:20
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline OP
Member
20BN  Offline OP
Member
2

Joined: Feb 2003
Posts: 146
RP China
Hi all.
About entity_max error E1513 or E1005.
how to set entity_max(unlimited, ent_create(...) ) use sys_malloc?
THANKS.

Re: About entity_max error E1513 or E1005 [Re: 20BN] #471297
02/27/18 07:28
02/27/18 07:28
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
there's a variable called max_entities that you can set at the start of the main function:

Code:
void main()
{
   max_entities = 5000;



POTATO-MAN saves the day! - Random
Re: About entity_max error E1513 or E1005 [Re: Kartoffel] #471298
02/27/18 09:08
02/27/18 09:08
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline OP
Member
20BN  Offline OP
Member
2

Joined: Feb 2003
Posts: 146
RP China
@Kartoffel
THANKS your time.

I need more than 100K entities in level.( my dynamic system render less than 500 entities in area, not all render in screen).
The engine crash when i set entity_max > 100000. But i need more entities support.

Re: About entity_max error E1513 or E1005 [Re: 20BN] #471299
02/27/18 11:27
02/27/18 11:27
Joined: Feb 2011
Posts: 124
Germany Nrw Herford
HenWoll Offline
Member
HenWoll  Offline
Member

Joined: Feb 2011
Posts: 124
Germany Nrw Herford
I mark myself here quickly - had a similar question for some time.

Re: About entity_max error E1513 or E1005 [Re: HenWoll] #471318
02/27/18 22:58
02/27/18 22:58
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
I don't think that's possible.

I think the best way is to create entities only when they are needed.


POTATO-MAN saves the day! - Random
Re: About entity_max error E1513 or E1005 [Re: 20BN] #471790
03/19/18 20:51
03/19/18 20:51
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 868
Chicago, IL
Originally Posted By: 20BN
@Kartoffel
THANKS your time.

I need more than 100K entities in level.( my dynamic system render less than 500 entities in area, not all render in screen).
The engine crash when i set entity_max > 100000. But i need more entities support.


I think you need to think about optimizing your game. If you are only rendering 500 at a time, you can use some clever programming to change/reposition entities when you enter a new area. Having 100000 or more entities will make any game run very slow if at all.

Can I ask what kind of things you need so much of in your game?

Last edited by Dooley; 03/19/18 20:52.
Re: About entity_max error E1513 or E1005 [Re: Dooley] #471804
03/20/18 05:45
03/20/18 05:45
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline OP
Member
20BN  Offline OP
Member
2

Joined: Feb 2003
Posts: 146
RP China
Originally Posted By: Dooley
Originally Posted By: 20BN
@Kartoffel
THANKS your time.

I need more than 100K entities in level.( my dynamic system render less than 500 entities in area, not all render in screen).
The engine crash when i set entity_max > 100000. But i need more entities support.


I think you need to think about optimizing your game. If you are only rendering 500 at a time, you can use some clever programming to change/reposition entities when you enter a new area. Having 100000 or more entities will make any game run very slow if at all.

Can I ask what kind of things you need so much of in your game?


less than 5000.

Re: About entity_max error E1513 or E1005 [Re: 20BN] #471888
03/22/18 23:06
03/22/18 23:06
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 868
Chicago, IL
So you could use "ent_create()" to create new entities when they are needed, and "ent_remove()" to remove the ones that you don't need any more. This way it is possible to have many more entities in a level.

You will still have to be careful with memory usage, and may need to use "ent_purge()" to remove resources from memory.


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