Chunky
A chunking system for game development
Using the library
Installation
run pip install hamolicious-chunky
Implementing
# import necessary modules from library
from chunky import World as BaseWorld, Chunk, Vec2d
# setup library
BaseWorld.render_dist.set(3, 3) # how many chunks to load
Chunk.size = Vec2d(300, 300) # size of chunks in pixels
# override the `generate_chunk()` method
class World(BaseWorld):
def generate_chunk(self, pos:Vec2d) -> Chunk:
chunk = Chunk(pos)
chunk.objects.append() # add objects the chunk should hold
return chunk # should always return chunk
# create player
player_pos = Vec2d(500, 500)
# instantiate class
world = World(player_pos)
while True: # main loop
world.update(player_pos) # update to generate new chunks and update the loaded chunks
chunks = world.get_loaded_chunks() # gets the chunks inside the render distance
chunks = world.get_active_chunk() # gets the current chunk the player is in
Metadata
Release files for hamolicious-chunky 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hamolicious-chunky-1.1.1.tar.gz | 3.1 kB | Without provenance | Details for hamolicious-chunky-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hamolicious_chunky-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for hamolicious_chunky-1.1.1-py3-none-any.whl |
Total release size: 7.1 kB
Release files / hamolicious-chunky-1.1.1.tar.gz
| Download URL | hamolicious-chunky-1.1.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3854da4469bf23d0a41d3fbdd1b194f8b4f0dbb8f0dd248fef4726a8d75fb76
|
|
BLAKE2b-256 checksum How to use checksums |
9b2919b5b14f5fb92a141da584b0ea7622d09e1079c7dd11b8c8afa56f3cbe83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Release files / hamolicious_chunky-1.1.1-py3-none-any.whl
| Download URL | hamolicious_chunky-1.1.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83f03f501f118f5d069736cc4b2e3f77f2c195bf2eb2b3d53a15ef62984ebe7f
|
|
BLAKE2b-256 checksum How to use checksums |
86bb61abe1621727a28f1ec5e8a2657bf8f0b8b5efbce71917b50a42a234fc60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Security for hamolicious-chunky 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.