mrmin123 / kancolle-auto

Kantai Collection (Kancolle) bot/automation tool - DEPERECATED - see kcauto-kai:
https://github.com/mrmin123/kcauto-kai
54 stars 22 forks source link

VM setup information gathering #357

Open mrmin123 opened 7 years ago

mrmin123 commented 7 years ago

Hi all, I'm still a bit busy IRL to actively develop and test features (hoping that the last patch didn't break kancolle-auto compatibility!) but I wanted to take this time to gather some VM setup information people have been using.

I know that some VM software have been more problematic for others, while others have worked fine with little or no configuration. If you run kancolle-auto on VM, please share your set up to help future users set up their environments and troubleshoot any problems they might encounter. Thanks!

waicool20 commented 7 years ago

I don't use a VM but since I'm already running Linux natively it's possible to run kancolle-auto in the background without interference using Xephyr/xvfb, both programs can create a "virtual desktop" with its own video framebuffer and mouse control, only for computers with X11 window system so linux only, might be possible with the ubuntu subsystem in windows 10.

As for windows, I've been speculating it's possible to run the script without interference using this program: https://technet.microsoft.com/en-us/sysinternals/cc817881.aspx Havn't tested it yet.

phantasia15 commented 7 years ago

I had been using kancolle-auto with VM for a while before switching to a Linux server.
Here is my setup:

Nothing special about installing kancolle-auto on linux. I just followed the guide on setup page and it worked.
The only problem I encountered was that kancolle-auto (or perhaps Sikulix) might fail to find the images if the resolution of the VM is different from the real one. However, this was on Sikulix 1.1.0. I'm not sure if the same thing still happens on the version 1.1.1

frosty5689 commented 7 years ago

I just setup kancolle-auto on a VM today. Will let you guys know how it goes... So far it seems to be fine.

For installation, I followed the same steps as defined in the wiki.

waicool20 commented 7 years ago

@mrmin123 just sending this as a heads up, I'm working on this https://github.com/waicool20/SikuliCef Possibly eliminating the need for VMs in the future. I've tested Mouse and Keyboard control and it's completely confined within the program (Havn't committed the implementation yet).

Update: I have implemented mouse and keyboard controls, so it is somewhat useable now!

nekoma0 commented 7 years ago

Here's my setup

This is what i've been using, but it does have few problems while it does not breaks the bots function. Host PC will crash/BSOD if it's running for too long.(suspected Virtualbox issue) Audio lagging/spiking if it's running for too long.(i end up disable the audio on virtualbox configuration) Updating Virtualbox to newer version fixes a few thing but introduces new problems.(more frequent BSOD despite audio issue is fixed, so i decided to use old version) The reason why i emulating windows within windows is due to i want to use 3rd party kancolle client because it has cache functions so it wont have to redownload everything IF BSOD happens.(all cache is lost if BSOD)

@waicool20 thanks, it would be great if i could use yours and eliminating the needs for VM. since it's pretty power hungry just for emulating windows.

stackhanovets commented 7 years ago

Here is my quick report:

All systems in-game software: Chrome, KC3Kai, no proxy/VPN. XFCE4 as WM on Linux systems.

sudo yum -y update
sudo yum -y install python-devel wmctrl xdotool tesseract opencv git

Now it just works. No color mismatch, no power overconsumption, no memory leakages and disc eating.

R-Jimenez commented 7 years ago

Nice, CentOS has always been good to me, so glad to hear it's leading the pack. If I move to a VM off of my server computer I'll be sure to keep that in mind.

mrmin123 commented 7 years ago

Thanks for the reports, everyone.

@stackhanovets thanks for the extensive testing. Which VM were you using?

stackhanovets commented 7 years ago

@R-Jimenez, Well, that's RHEL after all.

@mrmin123, In all cases it was VMware Workstation 11 or 12 Pro with advanced virtualization options enabled. The host OS was Windows Server 2008 R2. I have migrated on Windows Server 2016 and use the CentOS VM now.

frosty5689 commented 7 years ago

Just a note for CentOS 7, you will need to do

yum install -y epel-release first if you want to install tesseract

stackhanovets commented 7 years ago

@frosty5689, Sure. Here is some additional software I had installed:

sudo yum -y groupinstall "MATE Desktop"
sudo yum -y groupinstall "Xfce"
sudo yum -y install xfce4-whiskermenu-plugin ksysguard wine terminator

GNOME and KDE window managers have a performance issue. To allocate more resources to the Flash plugin I have installed XFCE. I wanted more icons, wallpapers and color schemas, so I have also installed Whisker Menu and MATE. There is a guide to enable XFCE at startup and another one for autologin. Disabling screensaver, monitor lockdown and monitor power management are obvious. KDE System Guard allows me to freeze the main java process when I want to make some changes in game, such as flagship place trade, modernization, common drops scrap etc. Terminator is just a custom console. And I have installed Wine, just in case.

PS @mrmin123, I have a couple of new images - the once-implemented PVP quest and the _pvp_start2.png:

pvp-once pvp_start_2

How can I enable automation for once-implemented PVP quests?

frosty5689 commented 7 years ago

I've been encountering some flickering issue with CentOS and Chrome. Sometimes a part of the kancolle Flash iframe becomes white and blocks kancolle-auto from detecting the correct image. This white block mostly appears and disappears right away. Anyone got a similar issue?

stackhanovets commented 7 years ago

@frosty5689, I think I understand what you're talking about. I have tested two 64-bit versions of Google Chrome: Version 58 - no flickering Version 59 - flickering confirmed

It may be caused by KC3Kai API updates or by engine changes. However, it is hard to say until someone will test it. Try to use Chromium, Opera/Mozilla/IE/whatever browser without WebKit Engine or disable KC3Kai.

waicool20 commented 7 years ago

So I was browsing reddit and I think i found the solution (and reason) to the flickering: https://www.reddit.com/r/archlinux/comments/6jp1ge/psa_if_anyone_else_has_been_getting_screen/

Basically go to about://flags in chrome/chromium and enable the option Override software rendering list

frosty5689 commented 7 years ago

Looks like that helped stop the flickering. I guess Chrome in CentOS VM is unable to determine if hardware acceleration is available.