VoidExpanse > Ideas and suggestions

How hard to "remove" the NPC physics deactivation in VoidExpanse hardcoded core?

(1/2) > >>

Hi, ai_enabled or Lurler.

I tried everything many times in corefunctionality.js to try and activate more than 1 system at a time with only 1 player in the game. It NEVER has been working.

I didn't find a loophole BUT, it seems that if I put a "timer" linked to a function inside of the AI scripts, then make them jump to another system, the script of the AI is still alive so to say, because the timer functionkeeps debugging me information but the AIDecision function is not working because the NPC physics are deactivated.

This made me think of this. Could it be easier to just remove this "deactivating" function instead of making all systems alive at all times. I'm just saying coz that is something  that I have been looking forward to for a long, very long time in Void Expanse.... to have more than 1 system alive at all times.... If the system isn't alive but I am able to use the NPC's physics, would I be able to control the NPC AIDecision in the other system without the physics affecting the "upper layer" system? I mean, it must be layers that you guys have used to do this game, I suspect so if it is layers and physics are independant from one system to another, then only reactivating the physics/movement capabilities of the ship and AIDecision on whatever layer they are on could make it so that we have multiple "AI's alive" in different systems in Void Expanse... well, the systems won't be alive but the AI will still be which would make everything that exists in other systems, accessible by AI's... I don't need to see what they do, I need to read the debug window on what they do, to know if they are following the correct orders, like going to a base, fighting another ship, trading with another station etc.

Thank you for taking the time to answer. And please consider this for the next Void Expanse update. like pretty pretty please. Like a blitz fast update that would make it possible for me to work on that new option. It's all for Void Expanse and the station mod and whatnot that I'm working on.

I want to make a "persistent" Game/Mod. I know that performance will be crucial in those cases so I'm always wary of that when I code especially since Void Expanse is NOT multithreaded but it still has a lot of capabilities. I know you guys are working hard on Cryofall but please consider it.

EDIT: lol i tried addingForceToObject to the NPCs ship that are on the other system but it has no effects. I also tried using the "set ship as arrived from jumpgate" method because it reactivates the physics for a second but unfortunately, the physics are deactivated right after that because the NPC isnt in the same system as I am. No loopholes. prooves the game is well coded lol.


the physical simulation is very expensive and we still kind of worried regarding the performance of the multiplayer server when there are dozens of players visiting simultaneously multiple systems. Honestly, the problem was never solved, we just recommend getting a better server (with a high single-core CPU performance), limiting the server tickrate (but it will make the experience much worse as input lag increases - this game doesn't have any lag prediction so every input has to be sent to server, processed there and received back to client) or simply kindly asking the players to visit less systems simultaneously. :-)

The primary issue is that we cannot simply disable (or reasonably reduce the rate of) the physics simulation as it required to actually move the ships. The secondary issue is that updating AI scripts in the system is also very expensive (even so most of them might be "sleeping"). Considering how the game implemented, it's not possible to fix.

I will check if it's possible to implement a simple API to programmatically enable/disable the star system simulation without players to use for modding so you will be able to turn on/off simulation as you wish for particular star systems - however, no promise here as it's kind of a hack request (which might be simply not possible or create unexpected game-breaking issues) and our current priority is CryoFall Early Access release and I simply don't have much spare time now.


I got new computer parts since Christmas. But still the old generation stuff. I wish I would've gotten a AMD Ryzen cpu, but I couldn't afford it. Anyway i'm back to something still better than what I had, a fx-8350 cpu instead of my now defunct fx-8320e. And I got a Amd radeon rx570 instead of my gtx960. Still better in VR but not really at the top. It's doing the job though.

For the persistent Universe, depending on where my mod goes, I was thinking of buying a second Void Expanse cd Key to at least have 2 systems alive at all times. But i'm not sure about the "Hyper-Space" kinda system. I'm caught up in making the drone material retrievers work and whatnot anyway.

So nevermind about the "hack request", I understand it will be too hard for you to fiddle on it, so i'll find an alternative to make my mod still fun to play.

But thank you ;)

I didn't say that it would be too hard.
I will have a look in my spare time and let you know here.

It's not urgent ai_enabled.

Sorry for saying that it was maybe too "hard" for you. What I meant is, maybe it requires a bit more "fiddling" than necessary like too many changes. I mean, I don't know how the core of the game looks like, but sometimes, the code is sooo huge especially in a finished game that it looks like a fragile spider's web. You break 1 cord, and the whole web crumbles. Also it's like knowing where all cords are attached AKA where all Global Functions and Global Variables are beeing called.

I know how good all of you are at coding, it's not everyone that can release a video game. But what really is astounding is how modable the games the Atomic Torch studios make. I mean, just being able to update a server LIVE with "debug_reinit" is magic all by itself. No server restart needed. I mean, you all say that Cryofall can be "reinitiliazed LIVE within a game", well, i don't see how Void Expanse is any different from that. Void Expanse Engine is not far behind.

But I can only imagine what it is especially since you were not alone to "make the WEB".

Oh and when you finally have the time to fiddle in Void Expanse at some point hopefully this year, please wait for my next tiny list of API needed functions as some that were released in the last patch weren't working. Not that my list of API functions are always super useful, but they will help all modders i am sure. Especially the prototype function

ship.GetObstacleOnRay(ship_id, rotationAngle, distance) that isn't in the official patch release and also
npc.GetObstacleOnTheWay() that isn't in the official patch release.

The pathfinder that I was able to make in VoidExpanse costs practically nothing in terms of performance. No multithreaded is needed. I create a grid of 5x5 which is 25 units or even 10x10 which is 100 units in an array and then frame per frame I build the pathfinder tiles. Obviously its not an instant result but it doesn't affect performance. I am pretty sure that I could find a better way of initializing the GRID in order for it to also be a frame per frame basis. the reason why the functions above will be usefull is that there is only the function "GetShipsInScope" in Void Expanse... The other functions are like "GetAllSystemObjects" or "GetAllSystemWhatever" that gets all the system objects and then I have to sort through them and then get the distance of all of them and then compare which are closer. Internally in the core code, it would probably work the same way or close to that anyway. If I would shoot a ray in a tiny "for loop" in increments of 5-10 degrees to where the next "walkable" tile is, BAM, I find if there is an object/station/spaceobject/crate/ship/etc... (I tested it in a private server and it would be so darn usefull you have no idea.)

You did implement two very usefull functions in the past for Void Expanse which are "GetAsteroidsbyDistanceToNPC" and "GetCrateContainerByDistanceTo NPC" or something close to that which I am using currently for my drones to search the "scrap metals" which are actually crates.

Tell you what, If you promise me that this year you will work on a new list of API functions for Void Expanse and some new tweaks, I will build you my infinite items mod for Cryofall within a month, multithreaded. But I might only share it in private. In fact, just talking about it tonight makes me want to work on it already. You remember this?


I coded an infinite energy weapons mod for Void Expanse that isn't released still... I can't remember if it was multithreaded but it wasn't fast as many other personal projects that I have coded. And that was in July 2017. Lol I know, it's far away, and I got more gray hair now, but I know that I can code it too for Cryofall. I'll reply to this thread in two days with my current advancement on the infinite items mod for Cryofall.


EDIT 2019-02-28: OMG... just read it.  FrameWork 4.7.1 in Cryofall full c# API... that is insane. My heart is pumping like crazy. What is this new engine... And what are it's capabilities? I'm diving right in to find some answers. First Off, where is the main project starter function/script for the game? I need to load things at the start. Will post this on Discord.

03:08am - weekend has started yesterday night. I work from saturday to wednesday. But geez, I talked way too fast about making an infinite items mod. The number of items in Cryofall is quite extensive + it doesn't even use XML files compared to Void Expanse. Eh well. It's ground zero - bottom of the learning ladder.


[0] Message Index

[#] Next page

Go to full version