Download

BLOG       DOWNLOAD/ABOUT         LINKS         CONTACT

14 December 2015

how to make a windows exe in linux with python and wine

Kat loves Mouse as Windows Linux
Since a few releases back, I've been able to pack the Windows executables of LoSt natively in Linux, with no need to dual-boot any longer. For my own reference, and to the benefit of other unhappy dual-booters who might be searching for a more sustainable solution, I figured I'd outline the steps I had to take to make this magic happen.

I'm using Wine to make the exe with Pyinstaller. In addition to these, you'll have to install some tools to Wine's folder c_drive, in particular: Python, Pywin32, setuptools, and MS Visual C++. I'm using the pygame module myself, so that had to be put on there as well. Obviously, you want to download the tools which are compatible with Windows, and with the version of Python you're using. Use wine to install everything. Depending on the file extension, use the following commands to install all the components:
wine filename.exe
wine msiexec /i filename.msi
wine python filename.py

Due to the fact that Windows isn't case sensitive, Pyinstaller may be throwing the following warning at you: "WARNING: file already exists but should not: C:\Users\<name>\AppData\Local\Temp\_MEI34922\Include\pyconfig.h" You can bypass this by editing the file build.py, situated somewhere like: ~/.wine/drive_c/Python27/Lib/site-packages/PyInstaller-2.1-py2.7.egg/PyInstaller/build.py. Search for the function named "append" and change the line:
if tpl[2] == "BINARY:"
to
if tpl[2] in ["BINARY","DATA"]:

At this point, you should be good to go. Once you've went through these steps once, whenever you need to chug out an exe, just cd to the directory where your main script is situated, and type:
wine pyinstaller --onefile main.py

This will put the executable in a folder named dist. You can safely rename this file and delete the build folder along with all python scripts before distributing your application.

A final note: Depending on your program, you may need to make small changes to the script to make everything work. In my own case, I'm using os.chdir() to access data files, starting from a "code" directory which I conveniently delete before distributing the exe. I worked around this by adding the following line at the top of my "main.py" script before running pyinstaller:
os.chdir(os.path.dirname(os.path.realpath(__file__))+'/graphics/')
Happy hunting!

As always,
Minotauros

11 December 2015

Released: LoSt v.9 «Broken Windows»

spread the glorious news!
Version 9 is out. Links to the archives are the same as ever:
Windows (exe)
Linux (deb)
Sources (python)

This version mostly fixes some bugs and adds a few more things to do. Now you can blow up stuff with dynamite and shoot stray cats with elephant guns. Here's the changelog:
  • Bug: Game would sometimes crash when unloading gun in hand
  • Bug: Chainhook critical hits could cause a crash
  • Bug: Chainhooks could drag victims over/onto obstacles
  • Bug: Crash when actions executed without a proper target/tool
  • Bug: Spirit stone displayed false tile when carried
  • Bug: Items would sometimes be generated in water
  • Bug: Windows version warned about duplicate files
  • Bug: Holy site animals would sometimes get "prickly plant" AI
  • Props and features: Dynamite, rubble, smithereens, sledge hammer, elephant gun, sniper rifle, gun slits, windows
  • Place template: pillbox bunkers
  • Game: Inventory items can grant flags/intrinsics
  • Game: Stackable inventory items
  • Game: Simplified day/night cycle
  • Game: Carrying heavy items encumbers the player
  • Game: Demolishing house walls
  • Game: Beings can trigger actions upon destruction/death
  • Game: Worked on corpses and rubble
  • Kits: Each animal species gets a random disposition (ornery, shy, docile)
  • Kits: (Some) animal families now have set special abilities (cats sprint, dogs charge, horns penetrate, bears deal more damage, etc.)
  • UI: Placement of text log now configurable to center, top or bottom
  • UI: Status line in menu displays timer for temporary flags
  • UI: Menu displays current place and time
  • UI: File structure for prop tiles now much more orderly
  • UI: Testing out another style for prop tiles
  • System: Game now keeps a log file
  • System: Config and save files now track release version, tries to repair obsolete options 

Is it right to have left left for right?
I've also been taking the visual style in a more abstract direction. The changes do reflect my experimenting towards a vague plan I have for the visual design of the game. Frankly, it'll also be easier to add content once I don't have to hand draw/steal tiles for each new prop. I'm hoping to get some visual snazz whilst maintaining the flexibility and low maintenance of traditional Roguelike displays. Let's see where it may end. Here's a picture showing some simple examples: To the left, props as they were displayed in version 8. To the right, how I'm displaying the same objects now. Similar items use similar icons, only differently colored. So even encountering a new object, you'd be able to instantly classify it as a whip, bomb, medicine, etc.

Barring any glaring bugs, this'll probably be the last release of the year.

In any case, I'm sorry for spamming you with release notes. The next entry will surely be some piece of text pertaining to game design. I hope to turn my attention towards NPCs now, evolving the AI a bit and adding some more content and features.

As always,
Minotauros

1 December 2015

Released: LoSt v.8 «Still Life»

I decided to release the game in its current state, This is version 8, titled «Still Life». Hopefully, someone might have interest in trying it, just to stifle their own curiosity, and perhaps to leave a comment or two.

Get your fresh bloodshed here:
Windows executable
Python sources

(Linux users: Apologies for delayed Deb package this time. I'll put it up shortly; in the meantime, Linux and Mac users can quite easily run the game from source, by following the readme inside the archive.)

Save files are not backwards compatible. This even goes for the configuration file, so if you're reinstalling LoSt, your safest bet is just to delete your old configuration folder (named ".LoSt" and contained in your home directory).

«Still Life» is very much a pre-alpha release. Compared to the last version, which featured a dungeon and a win condition, I've rolled back to something even less reminiscent of a real game! Let's hope the one step backwards precedes a leap onwards … Highlights of «Still Life» include randomized species of plants and animals, basic overworld generation, and snazzier graphics (with configurable resolution and animation options).

There have been a lot of changes behind the scenes, which will make it easier to add more content to the game from now on. I guess the basic setting will take shape within a release or two, and hope to start working on humans in the next release. Implementing NPCs will entail getting more or the basic engine in place, including speech, trade and bounties (quests).

Comments welcome

I'd be happy for any comments, even (especially) if it's just that someone didn't get the game to work or didn't understand how to play it. At the current point, I'm curious as to how people find the interface and combat system, both of which are quite unconventional.

Ideas and requests for content and features will be given high priority, as a carrot for those interested in the further development of LoSt. At the current point, the game is a bit lacking in theme. There are not many objects to find, and practically no lore. Also, the random animal species doesn't yet yield really memorable creatures. I'm sure the animals will get some more personality once text descriptions are added, but I'll also need some inspired ideas for how to take this feature a bit further. In general, I'm looking forward to getting the setting more or less in place. So if anyone want to see telescopes implemented before lassos, or would love to play a travelling quack in the next release, make your voice heard, and I'll try to accomodate.

As always, Minotauros