Nov 23 2007
Distractions
Filed under Game development by Jussi Lepistö
I immersed myself in a couple of distractions from the relatively boring work on the C header parser. After the last post, I started thinking more about the task scheduler and how to implement it. Originally I was thinking of somehow integrating the main loop with it, but decided that was nonsense and instead created a new module called “reactor” for implementing different main loops. There’s currently only one called GameReactor, but a dedicated server or a tool with a normal GUI interface will probably need different kinds of main loops, and thus reactors. I put the task scheduler I was talking about earlier on the back burner, waiting for the moment I’m actually going to need it, and threw away my old task scheduler after converting code using it to the new reactor interface.
I’m not going to write any new entries this weekend, but if there’s interest, I might talk about implementation details next week, for the first time in this new blog. A single acknowledging comment will suffice, considering the (still?) relatively tiny reader base of the blog.
Would you be interested in details on reactors, and/or semi-regular posts about implementation?
Here’s a sneak peek (and a test of the code-highlighting plugin):
# Do the steps step_time = self._step_time step_size = self._step_size steps = int(frame_time / step_size) for i in range(steps): step_time += step_size logic_signal(step_time, step_size)
I also implemented a really simple HTML logger, or rather an HTML log handler for the Python logging module. I will probably extend it in the future to make the logs easier to read and maybe provide extra details with Javascript-powered hiding by default.
Comments Off