Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.

Bullet, more entity handling and UI struggling.

This last week I have successfully integrated the Bullet Physics Simulation system with our application. The entity manager can create a rigid body, insert it into the dynamicsWorld and the simulation takes over from there. ¬†They’re not rendered yet, but that is coming along as well. The entity manager has also been extended to alllow for the selection of multiple agents at the same time. This allows for attribute changes to be applied to several agents at once, which is useful for testing and observations.

I’ve been scouring the web for a way to make the window decorations show on my embedded widgets, but alas, nothing helps. It seems like it might be a bug in Windows 7, but there are not enough people with the same problem for me to be able to corroborate that. Also, all the examples I’ve tried have showed the decorations, which only heightens my confusion. I will continue trying to pass window flags with appropriate names, but I don’t think that’s the problem.

Anyway, the project’s making headway and we’re all having fun. It’s impressive how much juice you can squeeze out of the circuits if you just try. ūüôā

// Joel

Entity handling.

Some entity handling has been implemented. You can now shift-click on an agent to select it and change its goal by shift-right clicking somewhere on the grid. In the picture, ¬†I’ve ¬†changed the goals of several agents, which is made apparent by the fact that they are outside of their crowd. The different colored ones inside a crowd have simply had their goal changed and reached their new goal, thereby making them strive toward the next goal in the loop.

The guy in the middle is the result of the joint (no pun intended) effort of Simon and Gustav, who are working with rendering and joints respectively.
Agent's seen having travelled outside their group.


Basic UI.

The grounds for the UI has been set up. It’s based on the Qt Graphics View Framework that uses a custom QGraphicsScene and QGraphicsView with a regular QGLWidget as a viewport, as opposed to a MainWindow with a custom QGLWidget in it. It makes it easy to add UI widgets and controls as needed. Every UI item is cached as an OpenGL texture, which makes it easy on the rendering. Also it looks pretty. Right now there’s an instruction box for the camera movement and the box with the numbers is a FPS counter.

The little black dots are all AI agents that Johan and Johan are trying to get to behave.


Research and planning.

The previous week was dedicated to reading up on data-oriented design and researching some techniques that I might be able to use in the project. One of these was Immediate-Mode Graphical User Interface ( in which a GUI is handled almost completely inside an update loop, as opposed to being set up beforehand and updated as necessary with events and messages. Inside the loop, the GUI elements are rendered each frame and checks if they have been used (eg. clicked) and updates data as needed. I have not yet decided if I will implement the GUI this way, it depends on whether Qt’s Graphics View framework will allow me or not.

Other than that, I have made some plans in my head for how I want the game loop to look, but I’ll have to draw up a diagram to wrap my head around it. This week should yield a basic game loop that basically just calls the¬†scene graph¬†to render and updates a basic GUI. I also hope to start designing the entity system.