Tweets

Entries in OpenGL (3)

Flocker - New Version

I have been having a lot of fun with LUA lately, expanding the Flocker program to create a better 3D display experience. :)

Get the latest version here.

Updates and additions in this version include:

  • Added configurability of 8 lights covering the gamut of OpenGL controls, including diffuse, ambient, and specular colors, and omnidirectional light position (directional-at-infinity lights are not yet enabled). You also can choose to make any omnidirectional light a spot source and set its direction, beam width, etc.
  • Expanded the bird avatar to use 3D geometry and surface material properties.
  • Added preconfigured, programmatic generation of bird placement (accessed through the menu).
  • Added independent load, save, and delete of lighting configurations.
  • Updated tooltips and added some help buttons that open Wikipedia pages describing the topic.
  • Extended the bird-space partitioning to 3D (a performance enhancement for flocking calculations).
  • Updated LuaGL to version 1.4 so I could use some additional GLUT functions.
  • Factored the OpenGL related code out into a separate module.

Note: the OpenGL Testing tab is just there for fun. You can watch it but not interact with it. :)

-Eric

Flocker Code Cleanup

LUA code *can* be compiled into bytecode chunks. However, it is normally distributed as plain text because, let's face it, bytecode is easily decompiled. Because I am providing Flocker as plain text code I thought I would go ahead and clean up the comments and remove some dead and unused stuff. I mean, someone might actually look at it. :)

I also added a few minor graphics tweaks, reorganized my color definitions to conform to the OpenGL style throughout, and got prepped for the next round of modifications. :)

The new FLocker version is 2.01.

Cheers!

-Eric

Flocker - My LUA Programming Playground

Flocker started as a way for me to learn LUA ( http://www.lua.org/ ). I thought, "Hey, I've never implemented that bird flocking thing, so why not try that while I learn a new language?"

Things never stop changing when we play with software. I had to add expanded UI controls and database snapshots of the simulation state (implemented using SQLite). Next I wanted to see some statistics on who was in what state, so I moved UI stuff around into a tabbed configuration and added a data display. Most recently I expanded the display to default to OpenGL, removing the flicker (the vanilla display doesn't frame sync) and making the graphics significantly higher quality. You can switch the display tabs to see the differences.

I'm still playing with expanding the behavior of the birds (adding states) but I thought now would be a good time to make something available for other people to have fun with.

You can download the package with documentation here.