Shop Forum More Submit  Join Login
Group Info Group Founded 8 Months ago Statistics 30 Members
1,585 Pageviews32 Watchers

WELCOME to ACGI the place for Visual Story Telling

Captain Peter Langstrom: the Elk Rider by PeKj

The Group is about animations, comics, games and illustrations. That is, different forms of visual story telling.

Please submit to the most suitable folder.
Submissions deemed to be in the wrong folder may be moved to the right folder without notice.

If you think that any additional folder would be good to have, let me know.

There is a folder for stories for writings (not everything is visual). And a folder for anything else. So pretty much everything is covered. :)

Anything that should have a mature filter goes in the mature folder and must have the filter turned on.

The group does not use quality control, but material can be rejected on content, mainly anything that would fall under hate speech.

I hope this group will fulfill a need.
Have fun.


Gallery Folders

Featured
Gameboy Zelda Inspired Tileset by ShaneGrantsHam
the Hellion Havoc by PeKj
Olga and Ivan by Blondbraid
banner Bubbles and the Pterodactyls by PeKj
Animations and films
What I did today by H-SWilliams
'I like you!' by elainexdraw
Dancing Skeleton by Geosammy

Mature Content

Bloody Eyed Box by JoeEyeMonster
Comics - original
Random old Truth and Bone comic book page by AdeHughesArt
Cursed pg1 by FireEmber345
kamalika by radijad
Maggie Olsen Comic #1 by jessatriestodoart
Comics - Fanart
Venom Vs Carnage by global99
Shantae And Bolo's Small Adventure Page 11 (final) by DesenhoExperiment
Shantae And Bolo Small Adventure Page 10 by DesenhoExperiment
Shantae And Bolo Small Adventure Page 9 by DesenhoExperiment
Games - wip
Testing snake animations by PeKj
Cutscene Defenders of Adacan by PeKj
Connecting rooms and some dialog by PeKj
game room by PeKj
Games - complete
the Hellion Havoc by PeKj
Olga and Ivan by Blondbraid
Pyro boy  the game released !!!! by rapxic
Game of Ur by PeKj
Games resources
Skulls by PeKj
Gameboy Zelda Inspired Tileset by ShaneGrantsHam
Props . Stylized Hydrant by priabudiman
Making a font from hand drawn letters by PeKj
Games - fanart
Guar from Morrowind by CathFreaky by CathFreaky
Bowsette by PeKj
Valkyon by tenkaktus
Nevra by tenkaktus
Illustrations
Brage, God of Poetry by PeKj
Fisherwoman by radijad
Plea by radijad
Valkyrie Rider in the Sky by PeKj
Stories

Mature Content

The Best Bit About My Job by xtcgm
ESCAPE by xtcgm

Mature Content

WATCH THE BIRDIE part 1 by xtcgm

Mature Content

AFTER THE STORM 1 - On Foreign Shores by xtcgm
Mature

Mature Content

Vestalent Angelus (Flash Interactive) by JoeEyeMonster
Anything else
Lullaby the Beast to Sleep by JoeEyeMonster
Tutorials
Wt6 by PeKj
Making an exe-file

So you have made a game and you want to share it.

You could do that by distributing your py-file and the image-files and sound-files necessary to play the game. If the person that receive the game have python and PyGame installed on their computer then all should be good. They can play your game.

But you probably want to be able to share your game with other people as well. So you need to make a stand-alone version of the game. To do this you need to have a program that helps you to transform your program.

I have looked at three different programs for this task;
cx_Freeze, py2exe and PyInstaller

I had a lot more trouble with this than I had expected. The problem, as I understand it, basically is that the development of Python moves faster than the development of the programs for making the stand alone versions.

I have Python 3.7 and none of the programs seemed to be able to handle that.
To make a long story short I had to go down to Python 3.5 before I got something going with  cx_Freeze. Once I got one of the programs working I stopped looking at the other two. This should not be seen as a fair comparing of the different programs.

I used pip to install cx_Freeze.

py -m pip install cx_Freeze

I got an error message
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": landinghub.visualstudio.com/vi…

So I downloaded the build tools and could complete the installation of cx_Freeze.

To make an exe-file you first need to write a setup file with instructions to cx_Freeze what files to include and some additional information.

The setup-file usually is named setup.py, but you call it something else if you want to.

You place the setup-file in the same folder as your game files. Open your terminal and move to that folder and then run the build command.

py setup.py build  

In the game folder you should now have a new folder that might be called 'build' with the exe.file and a whole lot of other files. So you do not get everything compressed into one single exe-file.

Before we go into what is in the folder let us take a look at the setup file I used with my game.



------

import cx_Freeze
import os.path

PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6')
os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6')

executables =[cx_Freeze.Executable("Bubbles.py", base="Win32GUI", icon="bub64.ico")]

cx_Freeze.setup(
   name="Bubbles and the Pterodactyls",
   author="Per K Grok",
   description="Game",
   options={"build_exe":{"packages":["pygame"],
       "include_files":["bub01.png","bub02.png","bub03.png",
                        "bub04.png","bub05.png","bub06.png",
                        "bub07.png","bub08.png","bub09.png",
                        "bub10.png","bub11.png","bub12.png",
                        "bub13.png","bub14.png","bub15.png",
                        "bub16.png","bub17.png","bub32.png",
                        "bubble55.png", "BubSplash.png",
                        "burstbubble.png", "crosshair.png",
                        "cursor_arrow.png", "divePetro.png",
                        "greenButton.png", "pteo1s.png",
                        "pteo2s.png", "pteo3s.png", "pteo4s.png",
                        "rock.png", "sky.png", "SplashEasy.png",
                        "SplashEasy.png", "SplashHard.png",
                        "SplashMed.png", "SplashNight.png",
                        "SplashQuit.png", "SplashStart.png",
                        "etobicoke.ttf","2br.ogg", "ROAR2.ogg",
                        "phaser.ogg", "pop.ogg","cs1.png","cs2.png",
                        "cs3.png","cs4.png",

           os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'),
           os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll')]}},

   executables = executables,

   version="1.0.1"
)



A couple of lines in the setup-file is to counter an error message.

KeyError: 'TCL_Library'

Removing those lines to make it easier to follow the code, we get this


---

import cx_Freeze

executables =[cx_Freeze.Executable("Bubbles.py", base="Win32GUI", icon="bub64.ico")]

cx_Freeze.setup(
   name="Bubbles and the Pterodactyls",
   author="Per K Grok",
   description="Game",
   options={"build_exe":{"packages":["pygame"],
       "include_files":["bub01.png","bub02.png","bub03.png",
                        "bub04.png","bub05.png","bub06.png",
                        "bub07.png","bub08.png","bub09.png",
                        "bub10.png","bub11.png","bub12.png",
                        "bub13.png","bub14.png","bub15.png",
                        "bub16.png","bub17.png","bub32.png",
                        "bubble55.png", "BubSplash.png",
                        "burstbubble.png", "crosshair.png",
                        "cursor_arrow.png", "divePetro.png",
                        "greenButton.png", "pteo1s.png",
                        "pteo2s.png", "pteo3s.png", "pteo4s.png",
                        "rock.png", "sky.png", "SplashEasy.png",
                        "SplashEasy.png", "SplashHard.png",
                        "SplashMed.png", "SplashNight.png",
                        "SplashQuit.png", "SplashStart.png",
                        "etobicoke.ttf","2br.ogg", "ROAR2.ogg",
                        "phaser.ogg", "pop.ogg","cs1.png","cs2.png",
                        "cs3.png","cs4.png" ]}},

   executables = executables,

   version="1.0.1"
)


-----------


So we import the cx_Freeze library and run cx_Freeze.setup. Everything in this program happens between the first and the last parentheses of the setup function.

We are setting down some information about the game, name, author, description and version.

The main action is however in 'options'.  In option we have 'build_exe' which have two parts, 'packages' and 'include_files'. In packages 'pygame' is included. In include_files all image and sound files that are used are counted up.

Notice how { :{ :[], :[]}} are used to divide the different parts. Note also the use of ','. You got those parts right, you should not have to much problems.

I did however have a set back with the include_files. As you might remember I put the images and sounds in different sub-folders. The setup program didn't like that. In the end I had to put all the files in the main folder to get it to work.

Another set back was that I did have a movie cut scene for which I used the library 'moviepy'. I couldn't get that to work either, so I replaced the movie with a slide show I could do in 'pygame'. Works well enough for the game, but it would have been nice to have movies working in future games too. I'll expect that I will get there some time.

Finally, executables sets that Bubbles.py is the game-file that setup should use. There is also a flag that the exe-file should be compiled as a win 32 game and that the exe-file should use “bub64.ico” as an icon. It is important that it really is a ico-file. Just renaming a png will not work. If you have GIMP you can use that to export to ico.


So what we got is a folder holding the exe-file, a lot of images and sounds and some sub-folders.
Finding the exe-file in there is not that easy. There are different ways to handle this situation. I've picked an easy one.

I've put everything inside the main folder inside a new folder called 'content'. In the main folder I've made a bat-file named StartBubbles.bat.

The bat.file holds just two lines.

cd content
start Bubbles.exe


The file uses the terminal, first to change directory to 'content' and then to start the exe-file in 'content'.

This way the player don't have to go looking for the exe-file among all the other files.



Linux and Mac

You might also or instead want to make packages for Linux or Mac.

I don't have any personal experience of this. From what I briefly read you can create a Linux package using the 'distutils module' in the Python standard library to make 'tarballs' or RPM files.

In Mac you can use cx_Freeze to create Mac disk images.

You make a setup-file the same as for the exe-file, but you should of course not use  base="Win32GUI" and I think that the icon="bub64.ico"-part might not be good either. But other than that, the same setup-file should work... as far as I understand.

The command to convert to disk image is

python setup.py bdist_dmg
More Journal Entries

Deviants

Group Info

This group is about animations, comics, games and illustrations.
The purpose is to give the members an area to show their work and to find other creators for collaborations or exchange of ideas.
Open to all ranges of artists and relevant media types.
Group
Founded 8 Months ago
Jul 24, 2018

Location
Global

Group Focus
Art Creation

30 Members
32 Watchers
1,585 Pageviews
Daily Pageviews

Admins

Founder


:iconpekj:

Comments


Add a Comment:
 
:iconechodino:
EchoDino Featured By Owner Mar 14, 2019  Student Digital Artist
There is lot of softwares to make games with high quality and two of them are Game maker studio (2d) and UDK (3d) They let you to work easily. But I'd love to know python tutorials too :D
Reply
:iconpekj:
PeKj Featured By Owner Mar 14, 2019
There are indeed a lot of different nice game making software :)
Reply
:iconechodino:
EchoDino Featured By Owner Mar 14, 2019  Student Digital Artist
:). Looks fine. I'm working on a little game. But it really likes kid games and I don't know why XD
Reply
:iconpekj:
PeKj Featured By Owner Mar 14, 2019
So what kind of game are you making?
Reply
(1 Reply)
:iconrapxic:
rapxic Featured By Owner Dec 2, 2018  Professional Digital Artist
thanks for having my game here man 
Reply
:iconpekj:
PeKj Featured By Owner Dec 2, 2018
I'm very happy to have it here :)
Reply
:iconlucas5672:
lucas5672 Featured By Owner Sep 5, 2018  Hobbyist Digital Artist
Hey, I want to join. :)
I am interested, since I am actually creating a game.
Reply
:iconpekj:
PeKj Featured By Owner Sep 5, 2018
Great. Sent you an invitation.
:)
Reply
:iconbintobax:
BintoBax Featured By Owner Aug 29, 2018  Professional Traditional Artist
I want to join
Reply
:iconpekj:
PeKj Featured By Owner Aug 29, 2018
You are welcome.
I have sent an invitation to you. :)
Reply
Add a Comment: