Gamestudio Links
Zorro Links
Newest Posts
Z strategies
by Fuchs
Yesterday at 17:27
saturation/contrast on different resolution?
by Kartoffel
Yesterday at 13:37
vec_for_vertex gap issue
by Dooley
04/19/18 22:15
FPS Damage effect
by 3run
04/19/18 20:51
website-related suggestions for the webmaster
by Fuchs
04/19/18 19:03
Algorithm for Detrend=SHUFFLE
by kujo
04/19/18 15:24
Separate entry and exit parameters optimization
by kujo
04/19/18 13:27
AUM Magazine
Latest Screens
Forgotten Tales - Demo version
RPG PARTY
Triton Wing now available on Steam
AckCon'17: Lotter vs The World
Who's Online
14 registered (3run, firecrest, AndrewAMD, jmlocatelli, PadMalcom, Don_Diego, kujo, Fuchs, mk_1, 2 invisible), 504 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
stuvwx608784, Joderin, Fuchs, Don_Diego, jetomas59
17937 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: 95
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: 2173
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: 95
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: 114
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: 2173
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: 568
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: 95
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: 568
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 | resources | magazine | manual | support faq | bugs

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) 3dgamestudio.net