Skip to main content

NSEV3D

A new, stable and efficient 3D game engine built on vpython.

Installation

pip install NSEV3D

Quick Start

from NSEV3D import create_scene, Sphere, Box, Color, Camera

# Create scene (use fullscreen=True for borderless)
scene = create_scene(width=900, height=600, title="My Game")
scene.set_background(Color.rgb(0.1, 0.1, 0.15))

# Create 3D objects
ground = Box(size=(30, 0.2, 30), pos=(0, -1, 0), color=Color.rgb(0.2, 0.2, 0.2))
player = Sphere(radius=0.5, pos=(0, 0.5, 0), color=Color.red)

# Create camera (parent must be an Object3D)
# mode: "first_person" or "third_person"
# invert_x / invert_y: flip mouse axis
cam = Camera(player, scene.scene, mode="third_person", invert_x=False, invert_y=False)

# Toggle camera mode at runtime: cam.toggle_mode()

def update(dt):
    cam.update(dt)

scene.run(60, on_update=update)

Controls

Action First-Person Third-Person
Move W A S D (follows parent)
Look Mouse drag Mouse drag
Toggle mode cam.toggle_mode() cam.toggle_mode()

API

Scene

  • create_scene(width, height, title, fullscreen=False)
  • set_background(color)
  • set_title(title)
  • set_size(width, height)
  • run(FPS, on_update=None)

Colors (Color)

  • Constants: red, green, blue, yellow, orange, purple, cyan, magenta, white, black, gray
  • Color.rgb(r, g, b) — values 0.0–1.0
  • Color.rgb255(r, g, b) — values 0–255

3D Objects (all inherit Node)

  • Sphere(radius, pos, color, opacity)
  • Box(size, pos, color, opacity)
  • Cylinder(radius, length, pos, axis, color, opacity)
  • Cone(radius, length, pos, axis, color, opacity)
  • Arrow(pos, axis, color, opacity)
  • Methods: show(), hide(), add_child(), remove_child()

Camera

  • Camera(parent, scene, mode, invert_x, invert_y, sensitivity, move_speed, third_distance, third_height, crosshair)
  • update(dt) — call every frame
  • toggle_mode() — switch first/third person
  • is_pressed(key) — check if a key is held

Node (scene graph)

  • Node(parent=None)
  • add_child(child)
  • remove_child(child)
  • update(dt)

Download files

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

Source Distribution

nsev3d-0.4.3.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

nsev3d-0.4.3.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file nsev3d-0.4.3.1.tar.gz.

File metadata

  • Download URL: nsev3d-0.4.3.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for nsev3d-0.4.3.1.tar.gz
Algorithm Hash digest
SHA256 6dc079aca94c85a4b329677b73c6da65d1c64897d8445b919e08c544add1039a
MD5 42f4fef526aeb07c20f132e291b9048b
BLAKE2b-256 6ac70d65aff3a4fc8b9bc5429a1bfb2a2417c9003f3814cefb8e211afba1bfee

See more details on using hashes here.

File details

Details for the file nsev3d-0.4.3.1-py3-none-any.whl.

File metadata

  • Download URL: nsev3d-0.4.3.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for nsev3d-0.4.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e495be03e3ab7af68202b5be6fe1e4d26cb205eb572db323e8bb0804504c213
MD5 df2197c10e35402a9efd770da499d340
BLAKE2b-256 24ae89f7e137e1af91e8ac3df4db711467fc3f5437f909b2ef8166fc7aea3485

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.3.1 This release

2 files

0.4.2.1

2 files

0.4.1.2

2 files

0.4.1.1

2 files

0.4.0.1

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page