Recent Posts

Pages: 1 2 [3] 4 5 ... 10
News and Updates / Re: VoidExpanse - Patch notes v2.1.x
« Last post by Lurler on March 20, 2018, 03:01:31 am »
=== VoidExpanse v2.1.1 ===
Small bugfix and improvement patch.

- Slightly increased maximum zoom for static camera mode.
- Reduced input lag (especially in single player mode)

- Fixed issue when unsynchronized Steam achievements being reset when restarting the game.
- Resolved master server connection issues by using UDP and fallback to TCP when cannot connect.
- Netcode fixes.

Extra notes:
- Saves ARE compatible with the previous versions!
- Important! It is necessary to update BOTH clients for users and servers for server hosters.
Help section / Re: Trying to set a global variable without using(storage);
« Last post by ninekorn on March 19, 2018, 05:58:39 pm »
Awesome! Thanks for the clarification ai_enabled!

I now understand... And for the record, there is no such thing as a "maximum number of else if statements" in ECMA script 5 (It was quite dumb to even mention that lol). I just didn't have any other clues why it wasn't working.  ::)

I'm gonna work again on the drone AI Mining/formation AI tonight hoping It will move forward... Lol I think I lost 3 nights in a row just thinking it was global variables of my custom Libraries that were causing the issues... Anyway, I prefer my current version of the Drone AI since it doesn't even lag at spawn even if it's already 1800 lines long. It's starting to get exciting ;) I just can't wait to have a full drone formation that I can send to mine and I am almost there.

thank you

EDIT: Wow... yeah, both patrol.js and trader.js have super easy to understand objectives setuped... I can't believe I missed this the first time around.
Help section / Re: Trying to set a global variable without using(storage);
« Last post by ai_enabled on March 19, 2018, 12:12:53 pm »
Well, I was not really clear when wrote "All the JS files are loaded into isolated script engine instances".

Imagine that for each JS file (except libs) we create a "script instance". All "include(*.js)" are simply injected (inlined) into the JS file.

That means that we create the script instances only once (during the startup) and then simply reusing them.

And that means we're using the same AI script instance for every NPC ship which shares the same AI script name. So if we Trader.js AI script, we using the same instance of this script for every trader NPC in the game.

And you might have noticed that our AI scripts don't store any variables. If we need to store or access anything, we're using storage API.

Regarding the "switch" - it will not work if the switchFunction variable is global (and so shared across all NPC's using this AI script; BTW, next time you will ever need to debug something like that - wrap all writes of the global variable into a function with console.print() printing current and new values together with ShipID at the function first line - it will be obvious when a global variable is shared as different NPCs will modify the same global variable).

The only way to make it work is to use storage API or "objectives" API (npc.AddObjective(), npc.GetCurrentObjective() - see Trader.js for example).

News and Updates / Re: CryoFall - Patch notes v0.10.x
« Last post by Lurler on March 19, 2018, 03:42:12 am »
=== CryoFall v0.10.1 ===

New features:
- Now you can claim unused bedrolls - It allows you to take a bedroll as yours if it doesn't belong to anybody

- Land claim structure in "blueprint mode" now properly handles the case when it's unfinished and another one is being built
- "Forums" section in the main menu now displays updated messages from several more forum categories
- Added mode to connect to master server with UDP with fallback to TCP (previously it was only TCP)
- Now you can deconstruct "flat" objects (i.e. without physics) such as floor tiles and bedroll
- Fixed issues with clay respawning
- Changed balance of some burnable items, also paper is now burnable
- Adjusted animals attack range (now you can't murder everything you see with no consequences :) )

- Fixed weapon experience being added even when damaging world objects (it should have been added only when attacking other players or animals)
- Fixed memory leaks (related to sound asset not disposed by MonoGame automatically)
- Rewrote async caches to ensure memory release
- Fixed guides being offset in debug tools
- Fixed issue with mouse click on an item taking it and putting it back immediately
- Disable arrow navigation of menus (it wasn't supposed to work that way)
- Fixed issue with master server connection and needing to press "Refresh all" to obtain server info
- Auto-locate XAML files based on generated attribute attached to .XAML.CS files during compilation
- Fixed issue with inability to deal damage or mine minerals if staying on slope
- Fixed map panning and zoom in pointed position (it was offset due to UI scaling)
- Fixed input from players being stuck (like player characters continuously attacking, even when attack button is released)

- The world has been wiped. Enjoy the fresh start!
Help section / Re: Trying to set a global variable without using(storage);
« Last post by ninekorn on March 18, 2018, 10:26:41 pm »

This post is old but I still need some clarifications... So I have 6 scripts that were for the drone AI... 5 of those were libraries. I thought this became an issue since 2 drones seemed to be sharing the same variables... I thought, here we again with the script instances stuff... So I decided to combine the 5 scripts together (except the direction calculations which remains a library).

The AI script that is used by the drone or created at the same time as the drone with generator.addnpcshiptosystem is supposed to be a different "instance" from drone to drone right? So that script contains all functions now and shouldn't those functions be independant from npc to npc?

But my drones still share variables. I don't get it. Aren't they supposed to be different instances?

The main "update" function of the npc "AI" is "function Decision(args)".  I've decided to go crazy and put all I needed inside of there but still it's not working...

So I've found the main culprit. I use an "integer" to go from functions to functions. Example:

Code: [Select]
if(switchFunction == 0)
  //fetch list of asteroids
else if(switchFunction == 1)
    //check inventory if full or not
else if(switchFunction == 2)
   //Does asteroid still exist and if it does, MOVE to asteroid. check for distance... if distance is reached, switchFunction = 3.
else if(switchFunction == 3)
   //start mining

I don't understand why this really really tiny piece of code is not working... The moment that one drone is within the distance of the asteroid, the second drone that is NOT even near the asteroid stops and starts mining too?! I'm just baffled, we are talking about completely individual instances of scripts here... two drones with their own AI.

Are there limitations in ECMA Script 5 to the number of "else if" statements that can be used in a row?

Anyway... I've done the test "without" that type of "function switches" and my drones are acting normally... I just can't pinpoint why two different instances are somehow "linked"...

Any thoughts on this?

EDIT: The reason I use those "switches" is to avoid "fetching the asteroid list at every frame" or "checking if inventory is full at every frame" (my mining "lasers" take 40 frames approx to mine something and so for 40 frames I am free to "disable" the inventory check) etc.... I don't wanna overload the script or make functions run that don't need to run hence why I use those "switches".

Bug reports / Re: Bugs and other things
« Last post by defrag on March 17, 2018, 07:42:53 am »
Have a great weekend!
Bug reports / Re: Bugs and other things
« Last post by ai_enabled on March 17, 2018, 07:17:03 am »
Will continue working on it on Monday.
Bug reports / Re: Bugs and other things
« Last post by defrag on March 17, 2018, 07:05:54 am »
Oh now I remember. The game once got frozen due to lack memory (because the OS and apps used a lot or RAM - I have a huge amount of opened tabs in Chrome). I have 16 Gb RAM and about 60% according to Task Manager is used by apps (mostly Chrome). So when it happened, Windows warned me that the RAM is full and advised to close the game but I ignored the warning and kept playing until it gets frozen so I had to close the game.

But the issue of the crash when the connection was lost is an another case. I hope you'll find its traces. The client just close itself without showing any errors and in Task Manager history I noticed it was increased memory usage since the lost of the connection until the game closes. It was about 10 secs of duration.

As I mentioned before, my GPU is Intel HD Graphics 4000 and according to dxdiag it can address approx. 1792MB
Bug reports / Re: Bugs and other things
« Last post by ai_enabled on March 17, 2018, 06:51:30 am »
Thanks, you can delete the link now - I've got the file.
Yes, I see where the crash happened. I've noticed that many times the game was unable to create a texture object ("The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.") and when that happened the memory usage jumped (maybe the texture was allocated but due to the error it was never released).
Alas, we don't have GPU stats in our logs. What is the model of integrated GPU you're using and how much VRAM it can address? You can get this info by launching dxdiag, "Display" tab.

Bug reports / Re: Bugs and other things
« Last post by defrag on March 17, 2018, 06:45:04 am »
2. I don't remember the exact time when the crash was happened. I've created a debug dump and it contain all the logs created by the game. Is it okay to send it as is? I can only say the matching logfile probably is Client_CryoFall_2018-03-17_00-44.log
Pages: 1 2 [3] 4 5 ... 10