Code Monkey home page Code Monkey logo

pl3d-kc's Introduction

PL3D-KC

PiSHi LE + FW LE Public Domain Source Release by EMMIR 2018-2022

alt text

PiSHi LE (PL) is a subset of the 3D graphics library used in King's Crook. FW LE is a subset of the windowing library used in King's Crook.

Just like King's Crook, this code follows the same restrictions:

  1. Everything must be done in software, no explicit usage of hardware acceleration.
  2. No floating point types or literals, everything must be integer only.
  3. No 3rd party libraries, only C standard library and OS libraries for window, input, etc.
  4. No languages used besides C.
  5. No compiler specific features and no SIMD.
  6. Single threaded.

================================================================ Feature List:

  • N-gon rendering (not limited to triangles)
  • Depth (Z) buffering
  • Flat polygon filling
  • Affine texture mapped polygon filling
  • Near plane clipping
  • Viewport clipping
  • Back face culling
  • Immediate mode interface
  • Matrix stack for transformations
  • Code to generate a box
  • King's Crook DMDL format importer

================================================================

Compiling for macOS/Linux:

  cd PL3D-KC

  cc -O3 -o pl *.c fw/*.c -lX11 -lXext

  ./pl

or use CMake for Linux, macOS or Windows -- tested with GCC, Clang, Intel oneAPI, Visual Studio, NVIDIA HPC SDK, AOCC, ...

cmake -B build
cmake --build build
build/main

macOS requires an X-server such as XQuartz running in the background. Prerequisites for macOS can be installed via Homebrew:

brew install libx11 xquartz

Don't forget to compile with max optimization!

If you have any questions feel free to leave a comment on YouTube OR join the King's Crook Discord server :)

YouTube: https://www.youtube.com/c/LMP88

Discord: https://discord.gg/hdYctSmyQJ

itch.io: https://kingscrook.itch.io/kings-crook

pl3d-kc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pl3d-kc's Issues

Overlay API

Hi,

I'd like to add an overlay API. Something that you can have a callback for, like the display() and update() functions, and that allows you to overlay pixels on the rendered 3D view. This, so you can have crosses through the middle, inventory sidebars, indication of available lives / heart points / whatever. I've created this, and have a diff for, this API in Linux. I'm not that well versed in the Windows API. Suggestions? Or is this already possible, and have I just overlooked it?

Thanks,

KJ

Not an issue, just some usage questions.

Hello, sorry to waste an issue, i just had some questions about your library.

Is it possible to use your code on a platform that’s not really made for it, like Arduino IDE. I planned to use this library on a strong microcontroller for 3D game development.

I wanted to create my own display driver and input device myself. I may need to modify the model importer code to work with my platform. My display only uses 16-bit graphics instead of the standard 24-bit, so do i need to make some modifications to the library myself to achieve this goal?

How easy is it to port this code to an unusual platform? Thank you for the help and taking the time to read this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.