Question about Nexus

Posted By: Dooley

Question about Nexus - 12/03/18 23:29

I have my max_nexus set to 500 through the map editor. I believe that's the highest it goes.

However, I am wondering how it works, since when I run my game the actual memory usage is much higher than 500 MB, being closer to 1,000,000 - 1,200,000 KB

Is this really high for a game?

I would set the Max_Nexus lower, but occasionally I would get errors telling me it was not set high enough. Now I don't get those errors, but I'm wondering if there are some things I could do to reduce the memory usage that I have not thought of yet.

The biggest thing I did work on already was to change all my textures over to .dds format, which seemed to save a lot of memory. Are there other similar things you guys do to lower memory costs?
Posted By: Dooley

Re: Question about Nexus - 12/04/18 02:56

"If the project contains several levels, enter here the size for the biggest of them"

From the manual.

So, is this referring to the wmb files? My wmb files are actually really small, the largest being around 330 KB.

However, I have image files that are much bigger. Should the nexus account for this?
Posted By: Dooley

Re: Question about Nexus - 12/04/18 03:09

So it seems that either I have no understanding of how the Nexus works.

Or it works differently than described in the manual. Maybe they are assuming the level file will be the biggest file? However, since my levels use meshes rather than level blocks, the levels are small, while textures and other linked files are much bigger.

Do i need to add up the total size of all the files that will be loaded into a level and use that as the nexus?

Sorry for all the ranting and open questions, I just have no real understanding of how this works. So far I've gotten around this by setting the nexus as high as possible (500mb) but it would be nice to be able to set it to a lower level and save memory if possible.

Rather than going with a trial and error approach, I thought it would be best to understand how it works first.
Posted By: Dooley

Re: Question about Nexus - 12/04/18 03:15

Sorry again, one more thing. The game does not use quite as much memory as I mentioned in the first post. That is true when I run it through WED, but when I run the stand-alone executable, it uses about 400mb less, 600,000 - 800,000 or so.

Still, this is more than the 500mb nexus I have assigned, so I am still confused on what it actually is supposed to do.
Posted By: Ezzett

Re: Question about Nexus - 12/04/18 14:17

As I see it, the nexus is just some kind of memory pool. Game engines often implement their own memory management to save overhead instead of using the memory management offered by the operating system.

The nexus is used if you create your levels in WED and place all your models, sounds inside the level editor.

I don't think that the nexus is used if you do everything via SED.
Posted By: Matt_Aufderheide

Re: Question about Nexus - 12/05/18 00:28

I don't think that's right... I think the NEXUS is always used...I set it via a SED command line to about 800 megs

like : -nx800 in the options
Posted By: Emre

Re: Question about Nexus - 12/05/18 08:07

That's right. Just a reminder: afaik if you publish your game , you have to publish/bild from wed. otherwise nexus size will be different in publish version.
Posted By: Superku

Re: Question about Nexus - 12/05/18 08:31

Quote:
That is true when I run it through WED, but when I run the stand-alone executable, it uses about 400mb less, 600,000 - 800,000 or so.

This is because the engine sadly uses a bunch of extra memory (depending on the size of your code) for test runs. See here and subsequent posts: http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=466519#Post466519

The size of the wmb files does not matter, it's about the files being loaded/ (mostly level?) objects (including textures) created at runtime.

I always only use SED to launch my games. As Matt said you have to put in -nx XXX in the command line options under Preferences.
However, keep in mind that those will only be considered when you press the middle [▶] Test Run button, not the Run Current Script button to the left.

For publishing I create a Window Starter Definition as explained in the manual with COMMAND "-nx 200". That's only possible with the Pro version though I think.
Posted By: Ezzett

Re: Question about Nexus - 12/05/18 09:50

Originally Posted By: Matt_Aufderheide
I don't think that's right... I think the NEXUS is always used...I set it via a SED command line to about 800 megs

like : -nx800 in the options

But that's a command for the compiler and has nothing to do with SED.

I think if you load all your models and textures and so on via code written in SED the nexus is not used. It is only used if you load your models and textures beforehand in WED and create your levels inside WED. Then one big chunk of memory (the nexus) is allocated to hold all of your WED-made level data when you are playing the game, which speeds up loading and level switching.

This was useful back in the day (late 1990s, early 2000s).

I don't think the nexus is used for anything else but maybe some important stuff when the engine starts.
Posted By: Superku

Re: Question about Nexus - 12/05/18 10:21

The nexus is always being used, why would the engine be coded differently depending on SED/ WED starts? Additionally, setting the nexus in WED Map Properties and starting the game from there just launches the engine with -nx command line, identically to SED.
When you don't specify a custom nexus value a default sized one (40MB I think) is used.
Posted By: Emre

Re: Question about Nexus - 12/05/18 11:20

Superku is right. There is no difference. Just don't publish your game from sed, if you will not use windows starter command.
© 2024 lite-C Forums