Every time I see someone's off-piste raytracer project, I feel compelled to link my own silly contribution to that diaspora: https://github.com/chunky/sqlraytracer
Curses does not exist on Windows, but this could be done easily using Windows's console API or ANSI escape sequences. Wouldn't be nearly as fun, though.
Curses also uses escape sequences, and curses outputs are supported by the Windows Terminal (not CMD.exe however). Curses doesn't do anything fancy, just convoluted.
Love this though I have to ask, wouldn't getting the HWND of the Edit Control via WindowFromPoint and sending WM_SETTEXT be easier than digging through memory?
I guess the point may be to learn how Cheat Engine can be used in a practical way to hook things which is definitely more along the lines of some of the author's other posts!
Great write up! Building a memory scanner and using that to inject text into notepad seems like a fascinating journey and it sounds like you learned a lot. Keep up the good work!
They are really historically the same thing, but I think ray casting has come to mean ray tracing a lower dimensional thing like a map and representing the results in a higher dimension, like 3d space.
For those who don't understand the significance of this I highly encourage you to learn about ray tracing and the complexity of it. If combining something that complex with something so simple (Notepad.exe) is not art I don't know what is.
> For those who don't understand the significance of this I highly encourage you to learn about ray tracing and the complexity of it.
Ray tracing, at it's core, is actually beautifully simple.
Also, ray tracing is absolutely not the interesting (or "significant") part of this article. I highly encourage to RTFA first.
As for combining the two: having read on Raymond Chens blog about all the optimization that went into Notepad over the years, I'd guess Notepad is the real complex part here.
Do you think it might be a little patronizing to assume people don't understand that text inside notepad is being used as a display when there is a video showing it off?
Exactly. The idea is neat but it's no different than the mini ray tracer you write in graphics 101, with the twist that the output "frame" buffer is the text buffer of notepad
I was referring to possibly not knowing about Ray Tracing which is a technique and a subset of the field of computer graphics and thus possibly not understanding its computational complexity, I don't know why you're upset at me.
Even kids know what ray tracing is these days, it's used in video games to sell graphics cards. Teenagers write ray tracers in undergrad classes.
This example is a cube and plane with one light. It is lines from the camera checked for collision against triangles then a line from the collision point checked against a light. Checking for collision against a triangle is just checking collision against the infinite plane and checking if that point is inside the triangle.
What is the "significance" you are talking about? This is something common with an uncommon display.
I often considered the lure of raytracing as a project was that it was rather simple to get really good results. Of course there is no limit to how complicated you can make one, you don't have to put much time in to get really nice images.
Note that if you actually want to do something like this, you'd probably need to deactivate the Edit window from rendering anything, sending WM_SETREDRAW will probably work.
A quick check of Windows 11 notepad reveals that it is still creating child windows. Text editor is of class RichEditD2DPT, status bar is msctls_statusbar32, menu bar is Windows.UI.Composition.DesktopWindowContentBridge.
As long as they are actual win32 Windows, then you can still interact with them using the system's API functions.
Other fun fact, Direct3D has interfaces inside of GDI32.DLL, look at all the D3DKMT functions there.