Gamestudio Links
Zorro Links
Newest Posts
Specular Shader
by Dooley
Yesterday at 18:17
is 3dgs byDirextX or Opengl?
by Dooley
Yesterday at 18:09
Tensorflow and Python 32 bit
by jcl
Yesterday at 13:28
New Zorro version 2.12
by jcl
05/21/19 17:23
Mixed frequency history (M1+D)
by jcl
05/20/19 12:21
This is my fault-tolerant ATR indicator for you
by OptimusPrime
05/18/19 16:35
missing trade variables
by AndrewAMD
05/18/19 12:37
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
5 registered (kvm, Michael_Schwarz, Ayumi, Dooley, 1 invisible), 519 Guests and 1 Spider online.
Key: Admin, Global Mod, Mod
Newest Members
Reza65, Pritamchakra, h4h4rd, ccm, Pippo
18224 Registered Users
Topic Options
Rate This Topic
#471295 - 02/27/18 05:20 About entity_max error E1513 or E1005
20BN Offline
Member

Registered: 02/08/03
Posts: 123
Loc: RP China
Hi all.
About entity_max error E1513 or E1005.
how to set entity_max(unlimited, ent_create(...) ) use sys_malloc?
THANKS.

Top
#471297 - 02/27/18 08:28 Re: About entity_max error E1513 or E1005 [Re: 20BN]
Kartoffel Offline
Expert

Registered: 06/11/09
Posts: 2210
Loc: 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

Top
#471298 - 02/27/18 10:08 Re: About entity_max error E1513 or E1005 [Re: Kartoffel]
20BN Offline
Member

Registered: 02/08/03
Posts: 123
Loc: 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.

Top
#471299 - 02/27/18 12:27 Re: About entity_max error E1513 or E1005 [Re: 20BN]
BlackJack Offline
Member

Registered: 02/10/11
Posts: 118
Loc: Germany Nrw Herford
I mark myself here quickly - had a similar question for some time.

Top
#471318 - 02/27/18 23:58 Re: About entity_max error E1513 or E1005 [Re: BlackJack]
Kartoffel Offline
Expert

Registered: 06/11/09
Posts: 2210
Loc: 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

Top
#471790 - 03/19/18 21:51 Re: About entity_max error E1513 or E1005 [Re: 20BN]
Dooley Online
User

Registered: 05/12/05
Posts: 609
Loc: 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?


Edited by Dooley (03/19/18 21:52)
_________________________
Check out "Star Explorers" on Steam:
http://store.steampowered.com/app/502720/Star_Explorers/

Anomalies released on Steam: http://store.steampowered.com/app/546780


Top
#471804 - 03/20/18 06:45 Re: About entity_max error E1513 or E1005 [Re: Dooley]
20BN Offline
Member

Registered: 02/08/03
Posts: 123
Loc: 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.

Top
#471888 - 03/23/18 00:06 Re: About entity_max error E1513 or E1005 [Re: 20BN]
Dooley Online
User

Registered: 05/12/05
Posts: 609
Loc: 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.
_________________________
Check out "Star Explorers" on Steam:
http://store.steampowered.com/app/502720/Star_Explorers/

Anomalies released on Steam: http://store.steampowered.com/app/546780


Top


Moderator:  HeelX, Lukas, Rei_Ayanami, 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