I’m really fascinated by AqeeAqee’s raycasting extension. It’s over 700 lines, and I’m trying to understand how it’s structured at an engine level. I know how to use the blocks, but I’m not just here to call functions—I want to understand how all those lines work together efficiently.
I’m trying to build my own accurate isometric grid demo, and I want to understand the engine logic itself. Seeing the code helps, but just reading it doesn’t explain why certain patterns or structures were chosen. I want to learn how to organize hundreds of lines of engine-level logic so it’s maintainable and scalable.
Specifically, I’m curious about:
- How geometry is generated and tiles are rendered efficiently.
- How movement and controls are handled while keeping everything flexible.
- How the engine separates core logic from game logic.
I’m not asking for a line-by-line explanation—just guidance on how someone approaches building an engine at this scale. I want to know what techniques or design patterns help move between functions without getting lost in hundreds of lines.
I’m also applying this to my own extension, like building a “War 2” engine. I often spend a long time planning before coding, but I feel there’s more to learn about efficient engine structure, multi-line functions, and deep integration with MakeCode Arcade.
Here’s the raycasting file I’m studying: engine_raycasting.ts
I don’t want to just use the functions—they’re useful, but I want to understand what makes them work behind the scenes. The Render class is especially confusing; it uses multi-line functions and internal state that isn’t obvious at first glance. I want to understand the “why,” not just the “what.”
Some specific questions I have:
- How does the engine efficiently loop through tiles to decide what to render each frame?
- How does it avoid duplicating work when multiple objects or tiles need updates?
- How is control input integrated without cluttering the rendering logic?
My goal isn’t to copy the engine. I want to design my own engine-level systems, like in War 2, where functions, classes, and rendering logic are deeply connected but still readable. Any advice on:
- Planning multi-line functions before coding
- Structuring a large engine for maintainability
- Moving between functions logically like MakeCode does
Here’s my War2 extension (still feels like a base class/skeleton): War2 on GitHub
I’m also trying to make a “tiles hop” render game, but scaling alone isn’t enough. I need an advanced structure so the ball can hop with actual depth—not just using sprite.z
, but true 2.5D Z. Here’s a screenshot of what I mean:
I tried scaling, but MakeCode only has width and height, so jumping with x and y is still 2D. I need true 3D vectors and structure to make the tiles hop properly.
Clarification on Z-depth:
When I say Z, I’m not talking about 2D layering (sprite.z
) or fanmade perspective tricks. I mean actual 3D depth. For examples:
- Gameplay demo: YouTube playlist
- Using Z-depth in MakeCode: Forum post
I’ve tried some constants and tricks, but I still don’t know what the proper engine structure would be to make it all work. Any guidance on engine-level structure, Z-depth handling, and tile hopping would be hugely appreciated.