It would probably be good to use the method described here for optimization while using this 3D engine. Creating the most optimized Roblox game- runs at 6000+ FPS!
Yeah this would probably like make it 20% faster since there is no other rendering and stuff. The reason it is not running at its best is because I donāt know how to optimize the triangle processing like clipping and stuff more.
Not sure if this is a bug for just me but it seems that DynamicImage isnāt working for me. I am on the correct channel and everything and there are no errors. Because of this I cannot update the module until I find a way to fix this bug.
Edit: It seems roblox has removed access to beta channels, so weāll just have to wait for DynamicImage to come out I guess!
Thatās what happens when you mod an unreleased thing into a game, stuff will break.
I am gonna assume you also have the FFlag enabled, so that probably isnāt the cause of the issue.
switch to zIntegration channel, it got removed from LIVE again. also check beta features and try enabling it in there.
Wait, what?
Reading āRoblox 3D Engineā is super funny lol
Great work :^)
Well DynamicImage got removed completely DynamicImage - Roblox API Reference
read it you will find that it was removed in version 601
R.I.P DynamicImage
but donāt worry kids Roblox replaced it with EditableImage EditableImage - Roblox API Reference
although i prefered the DynamicImage Name.
Seems like nothing changed, just a name change. I feel like the engine doesnāt allow for classes to change their names, so thatās why they remove the instance and add a new instance with all the behaviors from the removed instance. Could be a theory.
@AsyncHero
I figured out how to change the FFlags, and iāve been messing around with EditableImage my self and I am now working on CanvasDraw 4.0!
Look at this 320x320 beauty on my raycaster engine.
20 FPS is not bad at all on my mid-range laptop while recording.
I bet I could make it even faster.
Nice! also if you are using EditableImage with looping that is going to affect performance
yes im aware, but I have to anyways. Itās a game engine. Updates every heartbeat
If it was like a paint program, i could easily get maximum performance with a really high res
Blockquote
yes im aware, but I have to anyways. Itās a game engine.
i am not sure how you do it but when i was experminting with RayMarching i found that doing
EditableImage:WritePixels(Vector2.zero,Vector2.new(128,128),ImagePixels)
is much faster and doesnāt cause lag spike
thatās what iāve been using anyways. If i did that per pixel my game engine definately wont run at 320x320 at 20 fps lol.
I use that method wrapped in :Render() function in my module.
function Canvas:Render()
EditableImage:WritePixels(Origin, Resolution, Grid)
end
and the :SetPixel stuff is separate from the loops
function Canvas:SetRGB(X, Y, R, G, B)
local Index = GetGridIndex(X, Y)
Grid[Index] = R
Grid[Index + 1] = G
Grid[Index + 2] = B
end
function Canvas:SetAlpha(X, Y, Alpha)
Grid[GetGridIndex(X, Y) + 3] = Alpha
end
Oh i though you were doing something like:
local index = 0
for x = 0,128 do
for y = 0,128 do
index += 1
EditableImage:WritePixels(Vector2.new(x,y),Vector2.one,{pixelArray[index],pixelArray[index],pixelArray[index],1}
end
end
As that what i was doing when i first started playing around with DynamicImage
oh god no lmao. I instantly knew I had to treat :WritePixels as like a DrawBuffer/final render method
oh lol. i was new to game development and overall i always felt i was doing something wrong.
ah, yeah iām the opposite. Iāve been making rendering engines on roblox like these since late 2021
Amazing! How were you able to get EditableImage to work? Is it on the current channel now?
I think I used the previous version of the Studio Mod Manager, which has the LIVE channel, and seems to work fine for me. I had problems with latest version
we could make a pixelated games with this one cuz u know roblox doesnāt have much properties to change like distortion like in old tv like the top edge is bend if u know what i mean and much more even making it looks like low quality like changing the pixels