• Content Count

  • Joined

  • Last visited

Community Reputation

50 Excellent

About PaintDream

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. (in Chinese, google translate required) This article illustrates the main performance issues of porting lua to luajit. As I mentioned before, the code of the game is hard to jit. In conclusion, the optimization results varies from machine to machine.
  2. It looks like that I misunderstand your sentence. Have you met the same problem as @hyiltiz ?
  3. Well i3-8100 has 6M cache.... Strange still.
  4. It turns out that the LuaJIT would not improve the execution of the game on i5-3210M processor. Maybe there are too many cache misses on i5-3210M (3M cache), blocking cpu execution frequently. By contrast, my i7-3610QM has 6M cache.
  5. That means you are not running latest version. Please check out 2020.5.23 version. It should print enabled features out when typed "print(jit.status())": true SSE2 SSE3 ...
  6. Download the release above. Use jit.on() and to see if CPU load changes? Note that you should wait for about 1 minute after jit.on(). prints out jit.status() to get more details.
  7. Looks weird, what if creating a brand new world without any mods?
  8. Could you please reupload the images via forum's attachments or show me the stats on left-top corner (as my comparison show) in text?
  9. I can't see your images since their links are unavailable in China. How much RAM are installed on your old linux computer? LuaJIT consumes much more RAM and it is possible that the RAM is insufficient and had to be exchanged from swap partition. Jit compiler mostly consumes more RAM for generating and caching jitted functions to reduce CPU overload significantly. If your CPU is not bottleneck for game, it will not benefit a lot from jit. For me, an empty DST world with jit consumes 900MB memory while non-jit version consumes 850MB. . BTW, There is another issue about framedrops: #8 in Chinese. It is so strange that it appears only on linux. I guess this framedrop is mainly caused by garbage collection which could stop the world at this issue. Here's my comparison: Hardware: Old linux computer purchased on 2012, i7-3610QM (4C8T) + 16 GB DDR3 RAM + Intel HD 4000. My RAM is sufficient for game running and no swap partitions are configured on my linux (Debian 8.5, 64bit). Lua version (FPS: 48-50, CPU full load on one core, Don't starve is not multi-threaded optimized at all): LuaJIT version (FPS: 57-58, CPU full load) It benefits a lot. With the same full CPU load, luajit can execute 57-58 frames per second while lua version can only do 48-50 frames. Once paused by mod "Global Pause", it goes to 60fps for both version.
  10. Linux DST version fixed. Please download the latest release at: Linux DS remains broken. It seems that machine code matching goes totally wrong.
  11. Not really. Lua is one of the best script languages for game, since: 1. It's small, ANSI C portable and easy for integrating with C. 2. Its performance is higher than nearly all other script languages without jit. 3. It provides powerful language mechanism such as metatable and coroutine, allowing programmers to write more flexible and asynchronized code. In game developing, script language is designed to describe a world within a sandbox. Most other languages, such as python, javascript, coupled with too many heavy functions that should be disabled to ensure sandbox safety.
  12. I used DINPUT8.DLL years ago since it is simple for forwarding original apis. But it was not default-loaded by dedicated version of game so I changed to WINMM.DLL. In fact, this mod doesn't work on Don't Starve published at WeGame platform, since the platform does some anticheat modifications and I have no plan to deal with it. For me, the biggest contribution of this mod is NOT how to inject a dll to game but the modifications for LuaJIT that removes incompatibilities between LuaJIT and Lua, which could be much valuable than hacking techniques for all of us, especially for Klei.
  13. In fact you needn't to make a backup of original binaries files (but still recommend to backup your save slots). DontStarveLuaJIT does not replace any existing binary files Your uninstallation steps are correct and it can be much simpler: just rename the WINMM.dll with aother name if you want to disable/uninstall it.
  14. Usually the script language (e.g. Python, Lua) executes in a virtual machine (VM). VM is flexible and portable but slow. The JIT (Just-In Time) technique are designed to run threse languages directly in your CPU native language (native assembly), which could be much faster than virtual machine.
  15. I apply a flexible method to adapt with Dont'Starve executable files. It has been working fine at most cases since 2016. The only small exception is that Klei merges thier lua engine modifications in DST to DS in early 2019. (I maintained two versions before that time, one for DS and the other for DST, since there are some differences between them) So after that update, the old DS version was deprecated and then nicely replaced by DST version. Binary mods are not always appliable when the host game upgrades. But I've tried my best to make it compatible. I think it would be OK if Klei are not to do strange modification on thier lua engine.