Skip to main content

A simple 3D Ray Caster for pygame.

Project description

Pygame 6DoF Ray Caster

PySiDoCast is a Python module that allows you to render 3D scenes using Pygame images.

Warning There is no GPU support for the moment: The rendering is made on the CPU only.

Installation

To install PySiDoCast, simply use pip:

pip install pysidocast

Screenshot of example

Usage

Here is a basic example of how to use PySiDoCast to render a 3D scene:

import pygame
from pysidocast import Scene

# Initialize Pygame
pygame.init()
screen = pygame.display.set_mode((480, 480))

# Load an image using pygame
image = pygame.image.load(".\\img.png").convert_alpha()  # using ".convert_alpha()" is MANDATORY

# Create a new Scene
scene = Scene()

# Add the image into the scene
scene.add_wall(image, (-1, 2, 3), (1, 0, 1))

# Main Loop
while True:

    # Render the scene
    scene.render(screen, (0, 1, 0), 0, 90, fov=60)

    # Update the screen
    pygame.display.update()

    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            exit()

Example

Features

  • Create 3D objects with basic shapes
  • Multiples Scenes support
  • Render to Pygame Surface
  • Simple Camera movement
  • Customizable lighting
  • Transparency using Dithering

Contribution

Any contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome.

License

PySiDoCast is licensed under the MIT license.

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

pysidocast-1.3.3.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysidocast-1.3.3-cp312-cp312-win_amd64.whl (27.4 kB view details)

Uploaded CPython 3.12Windows x86-64

File details

Details for the file pysidocast-1.3.3.tar.gz.

File metadata

  • Download URL: pysidocast-1.3.3.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for pysidocast-1.3.3.tar.gz
Algorithm Hash digest
SHA256 32f5a1f33ece01a74430b1048c0a6e5cda2b8cbb27367601e77442e0dfa97585
MD5 a530825b3d577d70ec39da981d63618e
BLAKE2b-256 9aed4508e69da94d5478bab0cf5ed12de37f6fd49646d6c6164d4b9ef9bdb583

See more details on using hashes here.

File details

Details for the file pysidocast-1.3.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pysidocast-1.3.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for pysidocast-1.3.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6b2d748097c0f8bc95f155115e52d255f0a65f5f5aa72bc429476e4497bef254
MD5 594ef4a3736b4671ea1bc9898b5a1e5d
BLAKE2b-256 f7239876239fb2e1c8d5a55c17dcc40c12b4c035bb24818ffbebe9b46f3813ec

See more details on using hashes here.

Supported by

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