I’ve been working on this for a while, but have finally rendered some blocks. There are no Controls yet, and the placing system is not going to use this one; it’s going to be in arrays, but here it is:
the game spins the blocks at light speed after a few seconds
I’m using a laptop, and the fps is 0.3 - 0.4. That is about one update every 3 seconds.
my comp renders this at 1 fps
It might not use arrays
Could someone help me increase the fps?![]()
VERY VERY LAGGY but good job on this!
If you contribute to the controls and camera, here is a list of stuff that I have planned:
- A (Pressed) = Jump
- A (Pressed) + A (Pressed) = Fly Toggle
- UP (Pressed/Hold) = Move Forward
- DOWN (Pressed/Hold) = Move Backward
- LEFT (Pressed/Hold) = Move Left
- RIGHT (Pressed/Hold) = Move Right
- MENU (Hold) + UP (Pressed/Hold) = Camera Up
- MENU (Hold) + DOWN (Pressed/Hold) = Camera Down
- MENU (Hold) + LEFT (Pressed/Hold) = Camera Left
- MENU (Hold) + RIGHT (Pressed/Hold) = Camera Right
- B (Pressed/Hold) = Crouch/Fly Down
- MENU (Hold) + B (Pressed) = Open Inventory
- MENU (Pressed) = Pause Game
- A (Hold) + LEFT (Pressed) = Scroll Hotbar Left
- A (Hold) + RIGHT (Pressed) = Scroll Hotbar Right
- MENU (Hold) + B (Hold) + A (Pressed) = Break Block
- MENU (Hold) + A (Pressed) = Place Block
thank you
me too
way more than mine
could you help me?
Sorry, no, I have NO CLUE how to do 3d like this.
add creepers and I will give my firstborn nothing
it Looks kinda like Crash Bandicoot
You might want a new laptop lol.
My phone is old and runs it at 18fps
When I rotate the blocks, sometimes I can see through them. If it renders using raytracing and the rays step by the same distance, then the rays are likely going through the cubes without detecting them. There is this algorithm called DDA stepping that makes the ray travel along the sides of voxels rather than a constant distance, making the rays never skip voxels. Another advantage is that it makes side detection easier. I believe you’ve already seen it but 3D voxel rendering engine I made with copilot, using https://github.com/DeadlockCode/voxel_ray_traversal as a guide. the main reason I used copilot was because I have no understand of rust (the programming language the github repo used). my project only renders actual voxels, it does not work with rotated cubes (like the entities in Minecraft).
now I’m confused, I don’t think it actually uses the DDA stepping I was talking about. I thought it did
oh! i didnt know you responed lol