Skip to main content

A party car racing game

Project description

Tempo120

License: BSD PyPI version Downloads Downloads

A racing game written using Python/pygame during the bpb (Bundeszentrale für politische Bildung) game jam 2023. The game jam's topic was mobility.

You may download an executable from the releases page. The latest version is 1.8.0.

About

Tempo120 is a very simple car racing game. You may control your vehicle using the cursor keys or WASD.

The higher the speed the more difficult it is to control the vehicle. You do not need to accelerate all the time. The speed stays same unless you brake or drive besides the road.

How to...

Install

The most recent compiled version can be found on the releases page. This repository includes the source code and assets needed to build / extend the game.

Build own levels/tracks

The game stores its tracks in .png-images. In theory, the images may have an arbitrary size, but you may encounter memory issues if they get too big.

Each pixel in the image represents a field within the game.

The track's background should be in (100, 255, 0, 255) green what is interpreted as grass. The track itself should be drawn on it using grey. I used (139, 139, 139, 255) as color and a plain, round brush with a size of 14 pixels. The track is surrounded by "tires" (0, 0, 0, 255) which stop the vehicle completely. In the default track, tires are placed in a distance of 7 pixels around the track.

A plain white (255, 255, 255, 255) line indicates the end of the track - when reaching it, the round ends and you may insert your name which may occur in the high scores.

There is a single plain red (255, 0, 0, 255) pixel on the track which defines the vehicle's starting position.

If you build your own levels, don't forget to share them!

Build a standalone executable

You can build an executable using

pyinstaller --onefile tempo120.py

If you have pyinstaller installed...

You must then copy the assets folders (gfx, muzak) and optionally the scores into the generated dist folder, rename it to "tempo120" and zip it.

The executable runs on the type of machines you have executed pyinstaller at.

Possible extensions

The first version of the game was written on a single day during a game jam. That's why the current version has only a limited functionality - driving along a race track, trying not to get off the road.

Possible extensions could be:

  • adding other field types (water, obstacles)
  • adding other vehicle types
  • introducing something to avoid cheating (you can basically drive backwards...)
  • introducing more rounds
  • adding further tracks
  • some kind of an integration of further tracks
  • multiplayer mode

I like the game and may port it to c++ once.

Change Log

v1.8.0 (28.07.2024)

  • adding pygame to setup requirements
  • better handling of leaving the game using ESCAPE
  • cleaning
  • image correction
  • renamed main branch to main

v1.4.0 (06.08.2023)

  • Loads assets both, when installed from PyPI and from the zip.

v1.0.0 (03.08.2023)

  • adding missing assets to the Python release

v0.8.0 (02.08.2023)

  • included track debugging from MapleMonarch
  • added a setup script, you may now download the current release from PyPi

v0.6.0 (23.07.2023)

  • added tires to disallow cheating
  • patched the engine noise (repeating, volume in dependence to speed)
  • some smaller improvements

Notes

  • I tried to use bitmap tiles instead of simply filled polygons - the game gets much slower. One would have to move to using openGL in this case...

License

The game is licensed under the GPL 3.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tempo120-1.8.0.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

tempo120-1.8.0-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file tempo120-1.8.0.tar.gz.

File metadata

  • Download URL: tempo120-1.8.0.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for tempo120-1.8.0.tar.gz
Algorithm Hash digest
SHA256 934639563d0d8d0d944296c2fd5d9d976ab617c6ff2098682d52a3def27d9056
MD5 b59ab0139c3656508b227e7fa5ada99b
BLAKE2b-256 619d35994dd0cd2c157dbc12e53e81faf72071bb5dfbf995bccc82fd9d20a8ff

See more details on using hashes here.

File details

Details for the file tempo120-1.8.0-py3-none-any.whl.

File metadata

  • Download URL: tempo120-1.8.0-py3-none-any.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for tempo120-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e09fdf3551901e3b7faec8a156154789a42c825806dd5a078da0549ecd478366
MD5 ba2e7c6cf2a3fa919ee66ac790cd6e23
BLAKE2b-256 b97a1cb46cf6cd7a33537703036fa4074d3e4e536421dea76572c6eebacdbbc5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page