Gamestudio Links
Zorro Links
Newest Posts
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/21/19 14:59
Alarm whenever logged out from Broker
by chsmac85. 08/21/19 14:36
What are you working on?
by 3run. 08/21/19 13:28
file_write var array ?
by laz. 08/20/19 17:18
Updating Assets<Brokername
>.csv

by Sabre. 08/20/19 15:40
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
8 registered members (RealSerious3D, 3run, AndrewAMD, Southqvist, kankan, 3 invisible), 640 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
GorgonzolaBYTE, Southqvist, tawin, Raedwulf, Sabre
18270 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: 123
RP China
2
20BN Offline OP
Member
20BN  Offline OP
Member
2

Joined: Feb 2003
Posts: 123
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: 123
RP China
2
20BN Offline OP
Member
20BN  Offline OP
Member
2

Joined: Feb 2003
Posts: 123
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: 119
Germany Nrw Herford
BlackJack Offline
Member
BlackJack  Offline
Member

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

Re: About entity_max error E1513 or E1005 [Re: BlackJack] #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: 680
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 680
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: 123
RP China
2
20BN Offline OP
Member
20BN  Offline OP
Member
2

Joined: Feb 2003
Posts: 123
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: 680
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 680
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