Hi.
After reminicisng over the older Playstations, it inspired me to create my own inspired rendering! Hence, I have decided to open source my own module to help with this. It is no where near perfect, or do I think it should be used in a production game, however, there’s a lot of code in there which someone might find useful.
(new Baseplate with ambience set to 255, 255, 255)
You can grab the module here
API sorta
Objects
Renderer
→
- ViewportFrame: ViewportFrame (the viewport everything is being rendered in)
- WorldModel: WorldModel (the world model)
Functions
function pxl.new(resolution: Vector2?, fps: number?, defaultLighting: boolean?, skybox: Sky?)
Parameters:
- resolution: Vector2? (defaults to 320x240)
- fps: number? (defaults to 64)
- defaultLighting: boolean? (Dictates whether it should update its lighting from, Lighting, set this to false if you want custom lighting. Defaults to true).
- skybox: Sky? (Use this if you want a custom skybox, otherwise it’ll use the first one it finds from Lighting)
returns Renderer
function Renderer:Update()
returns void
function Renderer:Destroy()
returns void
Example
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local pxl = require(ReplicatedStorage.pxl)
local renderer = pxl.new()
RunService.RenderStepped:Connect(function()
renderer:Update()
end)
Caveats
- Anything you put in your map is then subject to the limitations of WorldModels and ViewportFrames (i.e: particles won’t render)
Depending on the reception this gets I might turn this into an actual library – but who knows what will happen.
Thanks for reading
thank you to XAXA for the cubemapped skybox