Gamestudio Links
Zorro Links
Newest Posts
Please consider
by DriftWood
Today at 03:10
Draw stuff from other thread
by Superku
Yesterday at 23:25
Partial fills with MT4 in live trading?
by Sphin
Yesterday at 19:06
New Zorro version 1.83
by DdlV
Yesterday at 13:55
Cubemaps losing mipmaps
by Quad
Yesterday at 12:37
Zorro & virtual desktops & Installation
by jcl
Yesterday at 10:59
ccyStrength() only working for some Currencies
by sdh309795gaas
07/18/18 05:02
AUM Magazine
Latest Screens
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Forgotten Tales - Demo version
RPG PARTY
Who's Online
14 registered (mk_1, alibaba, 3run, Quad, kvm, jenGs, Denn15, Hopoe, oligodar, 2 invisible), 524 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
DJ_Algo, tang, stuvwx210277, refltr, hillab
18002 Registered Users
Topic Options
Rate This Topic
#471295 - 02/27/18 05:20 About entity_max error E1513 or E1005
20BN Offline
Junior Member

Registered: 02/08/03
Posts: 98
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
Junior Member

Registered: 02/08/03
Posts: 98
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 Offline
User

Registered: 05/12/05
Posts: 580
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
Junior Member

Registered: 02/08/03
Posts: 98
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 Offline
User

Registered: 05/12/05
Posts: 580
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