Shape Mesh Progress
Yesterday, I completed the code to generate triangle and circle meshes:
The triangle looks like it's too small, but it fits perfectly in the circle, and the circle fits perfectly in the square. Yay, geometry! Of course, when building a creature, they can be scaled to whatever size you like, and the algorithms can produce meshes at any level of detail. Eventually, I'll make it so the game automatically adjusts the level of detail based on the shape's size on the screen.
As I mentioned in the previous post, these aren't the only shapes that will be available, but they are enough to let me move on to other things. One of the core concepts of Ambienome is that I can program new shapes later, even after the game has been released. If I'm feeling really clever, I could probably leverage Lisp's power to allow users to program new kinds of shapes, too. That's not a high priority, though.
Today I'll start code-sketching the concept of components and creatures. A creature is built from one or more components, which are basically shapes with some associated behavior. Components can be grouped to move together, and groups can contain other groups, so it's essentially a "tree" (hierarchy) of transformation nodes, with each "leaf" being a shape. This is the same concept as grouping in SVG or Flash, or parenting in 3D software like Blender or Maya.
After weeks of just studying and debugging OpenGL, it sure is nice to be making visible progress again!
I know its been a good while since you posted this but reading your blog it seems I am following your footsteps! I'm new to Lisp and am having a tinker at converting the tutorials from http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Chapter-1:-The-Graphics-Pipeline.html to Common Lisp.
I'm using GLUT for now (as an exercise in writing the least lispy code imaginable it seems!) but will be looking to switch over to sdl soon.
There are precious few cl-opengl examples online and I was wondering if you could please put the code for this demo or the previous one up on your github. It would be a huge help to a newbie finding his feet!
Hope this finds you well, I'm looking forward to see what else you make!
Comments are closed.