Lua lagging performance issue


#1

Hey! im noticing a lot of problems regarding lua. making the game almost unplayable, especially when playing multiplayer…


#2

Welcome to the forum, @razorshap :slightly_smiling_face:

Some questions:

Are you playing with the stable or the unstable version?

Do you have enemies in unreachable places (hills, mountains…)?
Are any of you mining in the water, or have placed wet stones?

What are the system specs of the host (CPU, RAM, Graphic card, OS) and their upload speed?
How many of you were playing? How many hearthlings in total?

If you have access to the host’s savefile, could you upload it?

  1. Find the save folder for the saves you wish to upload. By default, they are located in C:\Program Files (x86)\Steam\steamapps\common\Stonehearth\saved_games (assuming a default Steam install).
  2. Zip the folder.
  3. Right click the folder (should be a long set of numbers).
  4. Left click on Send to in the menu that appears.
  5. Left click on `Compressed (Zipped) folder).
  6. (Optional) Rename the folder to something different than the default set of numbers.
  7. Upload the save.
  8. If the zip is less than 10 MB, you can upload it directly. Either use the upload button or drag and drop it into the compose window,
  9. If larger than 10 MB, upload it to a cloud storage site like Dropbox, Google Drive, File Dropper, etc. and post the sharing link here.

#3

Google drive link: stonehearth game - Google Drive

Specs: Intel i5-8400k, 1070 armor 3gb, 8gb ram, win10

Thanks for quick response! we’re currently 3. in total maybe 50 heartlings soon.

we’re having just about 40 upload and between 40 - 100 download


#4

Note, this also accure when im playing alone, around 30 or so heartlings


#5

just got this:

release-893 (x64)

…rth/services/server/game_master/controllers/node.lua:349: assertion failed!

stack traceback: [C]: in function ‘report_error’ radiant/modules/commons.lua:58: in function <radiant/modules/commons.lua:51> [C]: in function ‘assert’ …rth/services/server/game_master/controllers/node.lua:349: in function ‘get_ctx’ …arth/services/server/game_master/controllers/arc.lua:352: in function ‘_trigger_edge’ …arth/services/server/game_master/controllers/arc.lua:315: in function ‘_trigger_out_edge’ …arth/services/server/game_master/controllers/arc.lua:289: in function ‘trigger_next_encounter’ …ame_master/controllers/encounters/wait_encounter.lua:66: in function ‘?’ radiant/modules/commons.lua:194: in function ‘invoke’ radiant/controllers/timer_controller.lua:77: in function ‘fire’ radiant/controllers/time_tracker_controller.lua:91: in function <radiant/controllers/time_tracker_controller.lua:91> [C]: in function ‘xpcall’ radiant/modules/commons.lua:67: in function ‘xpcall’ radiant/controllers/time_tracker_controller.lua:91: in function ‘set_now’ …hearth/services/server/calendar/calendar_service.lua:538: in function ‘_on_event_loop’ …hearth/services/server/calendar/calendar_service.lua:58: in function <…hearth/services/server/calendar/calendar_service.lua:57> [C]: ? [C]: in function ‘trigger’ radiant/modules/events.lua:63: in function ‘_update’ radiant/server.lua:66: in function <radiant/server.lua:63>


#6

For this lag I suggest switching to the unstable branch, it has some performance fixes that might help:

  1. Go to your Steam Library and right click on Stonehearth
  2. Select “Properties” from the dropdown menu.
  3. Hop on over to the “Betas” tab
  4. In the “Select the beta you would like to opt into:” dropdown, choose “latest – The latest branch”
    If you want to return to the stable branch, select “NONE – The regular version of the game.”

Still trying to reproduce the lag you mention on multiplayer.

About the error, was it after loading or just while playing? Was someone connecting/disconnecting right when it appeared?


#7

ok i’ll try beta. the error just popped up while playing. no one entering or disconnecting.


#8

this pops up first start:

release-899 (x64)
…ervices/server/game_master/controllers/encounter.lua:167: attempt to index local ‘info’ (a nil value)
stack traceback:
[C]: ?
…ervices/server/game_master/controllers/encounter.lua:167: in function ‘_continue_on_disconnect’
…ervices/server/game_master/controllers/encounter.lua:139: in function ‘suspend’
…arth/services/server/game_master/controllers/arc.lua:54: in function ‘suspend’
…services/server/game_master/controllers/campaign.lua:50: in function ‘suspend’
…vices/server/game_master/controllers/game_master.lua:68: in function ‘suspend’
…/services/server/game_master/game_master_service.lua:75: in function ‘suspend_game_master’
stonehearth/services/server/town/town.lua:1478: in function ‘suspend_town’
stonehearth/services/server/town/town.lua:167: in function <stonehearth/services/server/town/town.lua:161>

and

release-899 (x64)

c++ exception: lua runtime error

stack traceback:


#9

I think that error has just been fixed for the next build :thinking: