PyWeek #23 challenge: “The Lesser of Two Evils”

To play the games listed here, you may need to install Python (typically 2.5+).
PyGame, pyglet or
PyOpenGL. See the game's
README file for specific requirements. Windows or OS X users
downloading the versions of games specific to them shouldn't need to install anything.

python27, numpy, pysdl2 and some of the libraries it uses (SDL2, SDL2_ttf, SDL2_mixer, SDL2_image)

I tested it on Linux, Windows and Mac, so as long as you have the libraries installed, there should be no problem.

The game:

You're the Good Green Blob who tries to survive being chased by the Evil Red Pathogen (ERP). You can move jumping from cell to cell through the channels that connect them by clicking on the cell you want to jump to. Whenever you move, a channel is consumed (unless you're using a power-up). You gain points by removing channels.

You can use a power-up whenever you have consumed two or three channels in a row. The difference between the two is, the first powerup leaves the number of channels intact, and the second powerup creates a new channel, actually subtracting points from you. (Another thing that subtracts points is every time the ERP consumes a channel). Regardless, you'll find sometimes it will be preferable to choose that second power-up, even if it will end up taking away points from you. The longer the channel, the more points get added or subtracted. Oh, I almost forgot! you can activate either power-up by hitting enter or space.

The ERP only has one power-up: it can jump to any cell once it has consumed three channels.

The easiest way to die is by being on the same cell as the ERP, either because it landed on your cell or you landed on its. Another way to die is by running out of points.

You finish a level successfully whenever you and the ERP can't move anymore. Notice, though, that the level doesn't end until it ends... if you can move, you must move. Running the game:

From the same directory where run_game.py is, you can run the game either by typing:

ThePhantomRacer_PyWeek.zip
— My entry - tested with Python3, should work with python2. Please just run main.py
(2.66 Mbytes
on 2017/02/26)

The Phantom Racer : rised from the death. This is a racing game using procedurally generated tracks - you have to maintain your vessel in order to win the Tntergalactic Championship. You start from a national, noob cup, then you try to reach the top level.

Shooter game.Two coloured teams interact, and by attacking one of them, you will change your diplomacy level.When "enemy", the units will have higher probability to target you then other enemy units, and their damage will be proportional to the enemy level.When "neutral", the units will target you around as often as they do for other units, depending on the diplomacy level.When "friend", the units will still target you, but way less often.

Fix for one possible bug:If you have: "TypeError: Cannot cast ufunc add output from dtype('int16') to dtype('uint8') with casting rule 'same_kind'"it is due to new behavior of latest numpy version (unfortunately, I was not aware of that and I did not checked with the latest numpy version).You can fix this bug really easily by changing the following lines 371, 372 and 373 in game/op_display.py (in fct medal_paint):"arr[:,:,0] += l[1][0]-255" becomes "arr[:,:,0] = arr[:,:,0]+l[1][0]-255""arr[:,:,1] += l[1][1]-255" becomes "arr[:,:,1] = arr[:,:,1]+l[1][1]-255""arr[:,:,2] += l[1][2]-255" becomes "arr[:,:,2] = arr[:,:,2]+l[1][2]-255"

Few tips:- The diplomacy level for team A will increase if you kill an unit of team B. But it will change more in case of number of units imbalance (if there is 10 units of team A and 1 unit of team B, or if there is 1 unit of team A and 10 units of team B).- When an unit of team B is killed, the diplomacy level for team B will decrease, independently of the number balance. - The diplomacy level is always slightly decreasing with time. It will decrease faster and faster as long as you don't hit an opposite team unit. It decreases also faster for the team with the highest diplomacy level.- The amount of firing will slowly increase with time. The bonuses will also get more rare. Eventually, the game will be harder and harder. - The achievements and high scores are separated for each difficulty setting.- There are 2 difficulty settings with more than 2 teams. It is basically "normal" with extra teams. In this case, the diplomacy level increase is divided into the non-hit teams.

- For color-blind people, you can change the color scheme in the options to "white, blue and red". As far as I know, they are distinguishable for everyone. You can also edit the save.cfg file with the line "col [[255,255,255],[255,0,0],[0,255,0],[0,0,255],[255,255,0],[0,255,255],[255,0,255]]" to choose specific colours.

Strategy:- One strategy is to maintain a low level of unit all the time.- One strategy is to target one team, getting a large number imbalance of your ally team. But when the ally becomes too big (increasing the risk you get hit), you can suddenly attack it and reverse the situation (the large imbalance will make you switch side quickly)

"My Enemy's Enemy is my Friend" is a 3D tactical space shooter using pygame and numpy to generate 3D flat shaded graphics. When an oppressive Earth government attacks insurgents on your asteroid colony, your family is killed and you are recruited by the insurgency, "The Brotherhood of Free Men", to work for them. You control a spacecraft and must follow the ship's on-board AI "Leila" as she directs objectives for you to complete on behalf of the "Brotherhood". Will you discover a sense of closure along your path of vengeance, or will the fighting only lead to more pain?

Solar | FlairSolar Flair is a quirky, fun, interesting, and surprisingly difficult take on a platformer. Rather than horizontal motion, everything is vertical! You'll have to focus on two different evils: managing characters and the delicate balance between jumping and switching. Try to run away from the sunrise below.

Prerequisites

Python 2.7.x and Pygame 1.9.1 are required. Everything else should work as is. We are in the process of preparing redistributable packages for Windows users.

Running the Game

Headphones Recommended!

Install prerequisites above, then open a command prompt or terminal in the game directory, and type python main.py to execute it. That's it!

Settings

Settings can be changed in the config.py file. One of the challenges I wanted to address was display-resolution-independent rendering, so the default screen setting is RESIZABLE. Go ahead and resize the window however you like, the game will capture the events and resize it! However, if you would like to play full-screen, open up lib/config.py and change screen_setting to FULLSCREEN. Depending on your machine, you may be able to also use FULLSCREEN | HWSURFACE | DOUBLEBUF - use some combination of these flags and experiment for best performance!

If the game is running slowly on your machine, you can change the resolution to 1600 x 900 by changing width and height - please do not modify GAME_WIDTH or GAME_HEIGHT as these are used to calculate the game board and are not used for the display resolution.

How to Play

You are the orange star. The enemy? The vast, unending space and sunrise below. Don't fall into the pit! Switch between the parallel universes to make your way as high as possible before burning out like the beautiful.

Up arrow - Switch universe

Space - Jump

Left + Right Arrows to move

If you do not like this key configuration, feel free to change the keys in lib/config.py.

Team

Solar | Flair was coded by Luke Paireepinart. I am a professional C# developer who started life out as a Python developer many moons ago. Since Python was my O.G. language, and my wife Courtney has recently gotten into art, we decided Pyweek would be a good candidate for a quick game to test our mettle before we get into making a more epic game.

Version 0.2

Features that we'd like to have implemented but didn't have time:

Multiple background tracks with random selection

High Score splash screen that lets you enter your initials

Settings page

Controller support

What's next for Solar | Flair? We want to release it on mobile devices and cross-platform, and the Python tools for that are just not great right now. We may try to run it under Kivy, but since we want to continually develop the game, we may decide to migrate to Unity as I am more familiar with the C# ecosystem.

Martin and Roger on their daily patrol around space station "Lunar 1". Never knowing what could happen today. Sometimes meteroids, sometimes space pirates, sometimes both. Due to limited resources on ammunition, oxygen and fuel, they have always to take care how far they can go when in struggle. In the worst case they have to decide between the lesser of two evils: A colliding maneuver with an enemy to drag at least this last enemy still into death or staying alive in space avoiding any collision until all resources on board are exhausted.

Shoot-em-up bullet hell meets Mass Effect. Play as a starship captain faced with a series of unpalatable dilemmas: help people you find along the way and potentially jeopardize your own quest, or leave them to their fate. This game is much shorter than our typical entries, designed to be played multiple times. Features three endings (bad, good, and best).

See the README for details about options like setting the resolution, graphics level, and gameplay orientation. See help.png for info on your ship's features.