Gamestudio Links
Zorro Links
Newest Posts
Bump with detail?
by Dooley
25 minutes 10 seconds ago
About auto hide invisible entitiesl
by Dooley
33 minutes 5 seconds ago
Windows permission issues
by HellThunder
Yesterday at 21:51
CSVToHistory.c
by Dalla
Yesterday at 20:42
Position Close not possible
by MatPed
Yesterday at 18:49
Options trading questions
by Zheka
Yesterday at 17:36
Published Gamestudio Games?
by jumpman
Yesterday at 08:05
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
6 registered (Dalla, Dooley, Seymour, NYTrader, Angerbeer, 1 invisible), 475 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
cepturion, Mon3y, vincitytaymo, just, XJohnny_Hoffmann
18057 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: 107
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: 107
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: 587
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: 107
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: 587
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