Web technology posts - mostly tutorials about using and debugging Google App Engine python.
We use this web tech to run the enkisoftware website and distribute and sell our voxel editor and game, Avoyd.
Juliette Foucaut - 05 Apr 2019
I decided to write this post after reading about a very cool procedural NPC name generator and thinking that it might be of interest to show a much more basic example. This post is intended for people who have never used procedural generation and know very little programming. The examples are written in Python. I'll do my best to keep things simple and introduce the complexities progressively.
The algorithm is basic: names are generated by randomly assembling four syllables. First I'll explain how it's built, then the features I added to it to make sure the names are within an arbitrary size range, and more importantly, unique.
Juliette Foucaut - 31 Dec 2014 - edited 07 Jun 2021
[Update 07 Jun 2021 - In case you find this post whilst looking for a free IDE for Python 3 Google App Engine, we switched to an alternative to PyCharm CE: Visual Studio Code.]
Alongside PyCharm Professional Edition, JetBrains generously offers a free version of their IDE: PyCharm Community Edition. We've found that PyCharm CE can, with some effort, be made to work with Google App Engine (GAE). Although lacking in some features, it is still useful if all you're after is a python debugger and IDE for GAE.
This post details how to configure the free PyCharm Community Edition to enable debugging of python code destined to run on Google App Engine. Further, we explain how to enable smart code navigation and completion for GAE libraries. The final section explains how to use a PyCharm path variable to make the code more portable, which should help for distributed projects. Throughout the tutorial we'll attempt to use the PyCharm UI as often as possible, but we'll also explain how to do the whole configuration by editing the PyCharm files directly. The specific paths examples are from Windows, but they should also be applicable to other Operating Systems.
Note: Doug figured out the configuration settings described in this tutorial through trial and error, our experience with python GAE debugging with Visual Studio, and by looking at the open-source PyCharm CE code. If you want to enjoy the full power of PyCharm and save yourself some time, skip this tutorial and use PyCharm Professional Edition instead.
Juliette Foucaut - 14 Aug 2014 - edited 07 Jun 2021
[Update 07 Jun 2021 - In case you find this post whilst looking for a free IDE for Python 3 Google App Engine, we switched to an alternative to PyCharm CE: Visual Studio Code.]
[Update 12 Aug 2015 - The methods described below do not work in Visual Studio 2015 PTVS with GAE 1.9.17 or above. We haven't found a new workaround. We've switched to using the free PyCharm CE which works great. See our tutorial to configure it.]
For python code destined to run on Google App Engine, we needed an IDE with comprehensive local debugging abilities, i.e. breakpoints, step-by-step execution and variables watch. PyCharm Professional Edition does all this [Edit 31 Dec 2014: for PyCharm Community Edition GAE configuration, see our tutorial], but we chose instead to use a free solution from Microsoft called Python Tools for Visual Studio (a.k.a. PTVS or PyTools). [Edit 28 Nov 2014: now Microsoft Visual Studio Community]
Sadly, due to a bug, breakpoints don't get hit when debugging dev_appserver.py. After lots of searching and trial and error, we found out that an acceptable workaround is to configure Visual Studio as follows:
Once setup, using it is no different from normal debugging. The downside is that some newer GAE functionality won't work.
Juliette Foucaut - 20 Jun 2014
In this post I'll describe how to use Google App Engine to masked redirect a URL to a desired domain. Our proposed method of URL redirection involves a python script using the webapp2 framework running server-side on GAE. As a result of this setup, you can have visitors requesting content from one domain, say www.new-url.com, see content which is hosted on another such as www.old-url.com.
Juliette Foucaut - 23 Jan 2014 - edited 06 May 2017
[Update 06 May 2017 - We no longer maintain our presskit() for Google App Engine project. The Github repository is deprecated and the installer is no longer available.]
presskit() is a free, open-source tool that enables game studios to present information to the press in a unified format. However the current php implementation doesn't work on Google App Engine (GAE). Recently, Leonard Ritter started the ball rolling, showing it could be done and offering some code changes. After Rami Ismail mentioned that it would indeed be useful, and since we needed it ourselves, Doug and I decided to do the port.
If you would like to use presskit() on GAE, I'll explain in this post how to download and install our implementation. As an example see our presskit() at press.enkisoftware.com.
Warning: our code is in beta. We've only tested the installation ourselves, on Windows. Any feedback you can give us (use the comments below or email me), successful or not, would be very helpful: it'll enable us to fix remaining issues with the build or the documentation.
presskit() runs on Google App Engine
Juliette Foucaut - 23 Aug 2013 - edited 15 Apr 2019
A robust website that successfully weathers spikes in traffic is a must when trying to sell and support a game over the internet. Last July Picroma suffered temporarily when they released their game, Cube World, for purchase. They then had to deal with a DDoS attack. More recently, Oculus Rift's site stalled when they tweeted about John Carmack's involvement in their technology.
Whilst we can only dream of enjoying the same level of interest, we'd like to spare ourselves the worry. When Doug researched a web hosting solution, he spotted that Wolfire used Google App Engine. They list their reasons clearly on their blog, and given that they have years of hands-on experience on the matter, we decided to follow their lead. As an added bonus, this solution is free for low levels of traffic.