This real-time raycaster engine you see was made entirely within roblox with no third party tools.
The engine currently runs at 100x100 at about 40 FPS (50 FPS when not recording)
This video is also a tech demo of my latest CanvasDraw rendering module for roblox which allows you to create a canvas and draw pixels to the screen at a desired resolution!
As far as potential future plans go for this project, my first goal is to optimse the pixel calculations used in the canvas so we can get at least 60 FPS at 100x100. Another goal of mine is to implement sprites, which are billboard objects (such as enemies, or items)
Feedback and opinions will be greatly appreciated as always!
That’s awesome. IDK how you reached 40+ FPS, bc when I tried make 2D game, it start lag when 64 imageLabels objects are moving (but you have 1000 frames, which are changing every time). Incredible.
the trick hidden under the hood here is a neat little frame compression method that uses UIGradients to represent 10 or more pixels in one frame. Instead of 1 frame for a pixel…
To put it in perspective, if you had 1 frame for every pixel at 100x100. That would be 10,000 frame instances. (Which is alot of instances to load and render every frame)
But with the UIGradient method, you can easily reduce that frame count down to at least 1,000 frame instances (which is waaay faster), and with a compression/greedy meshing algorithms, you can reduce that further to a minimum frame count of just 100 frames!
So yeah, special thanks to @repgainer3 that sparked these compression methods
Well, it’s a long story, but to put it simply, I basically reinvented computer graphics, but for roblox.
I had to make my own 2D pixel-based game engine and find out how to project the world in a 3D-like matter.
To do this, I had to chose how I would project a 3D world. I could use traditional polygon rendering and texture mapping, but that would be way to expensive to do in real time. So instead, I made a Raycaster Engine which allowed me to create this textured real-time beauty!
First and foremost, good to see you’re still very active since I last saw you in my script builder days, and secondly, looks great.
Your plans are pretty solid, optimization is optimization in this case and even micro optimizations add up when you’re dealing with a computational workload like this.
but I have just 64 frames which are changing their position, size and rectOffset. And they are lagging - when they are moving, FPS falling down to 5-10 for 0.2-0.5 seconds. And I tried make a lot of things, even check how much times per frame they are moving - each frame moved only once.
Ahhh I can’t resist posting it…
I must… Nah I don’t need to resist it.
Here’s some images from my Part-based Image loader. It only has Greedy compression on either Rows/Columns, not both (I honestly couldn’t find a way to do so practically):
Longest render time I ever experienced was a little over a minute? Typically though it’s well under a minute.
Most of those should have the chat on the side, which shows debug info, including the “Time to render”
Easiest to see is I believe the first image under “Random image someone sent me”
Just look at the chat in that one, and I’d like you to note the difference between its render time and the compressed one below it, as well as the finalized pixel count (Optimized pixel count) (Since the difference is very small, even though they differ greatly in pixel count)
wow that’s very impressive for something part-based compared to other ones that i’ve seen (that can take 2 minutes or more for something at 400 or 500p)
Incredible. I have a feeling some people in the comments don’t understand how impressive this is considering they may have never attempted this. We all know, me and Ethan and a few others, about the optimizations of occlusion culling, frustum clipping, and gradient meshing however remember everyone that we are working in a cpu environment! Try the benchmarks for yourself, the optimizations are actually slower in this serial environment! So the REAL question isnt askiung the fastest way to render, it took my rasterizer milliseconds to compute it but the real optimization comes and this goes with any rendering technique featured on roblox, the way to hack and exploit the roblox engine to output images performantly. I have tried using part caches but the problem is they use so much memory. It was impossible to add to my method as the image storing method I was using was taking up loads of memory aswell!