[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Raycasting question for pygame



Hi Ian,
Thanks for your reply. As a fact, I need to complete my project by May, but other than the pygame part I also have to add in an AI later on. I haven’t really used pyOpen GL yet though, so im not really sure as to how the library operates and whether it is compatible with the ai i plan to use.(I’ll try though) Thanks for your help!
Cheers,
Cravan

On Wed, 4 Mar 2020 at 1:58 AM, Ian Mallett <ian@xxxxxxxxxxxxxx> wrote:
Hi,

You probably don't want to use raycasting. Raycasting is a specific graphics technique which is more-complicated, harder, and slower on modern hardware, though people still use it sometimes for the aesthetics it can produce. The two methods people mainly use today are "rasterization" and "raytracing".

You should understand that 3D graphics programming is fairly difficult. It's certainly doable by a complete neophyte in a semester-/year-long project, though. I recommend using raster graphics via PyOpenGL; this is, in fact, how I got my start in graphics. Here's some basecode that should get you started drawing a 3D triangle:
https://geometrian.com/programming/tutorials/OpenGL%20Program%20Shell.py.txt

Ian