RubyCube progress
March 26th, 2007 by proj
I got some more time to hack on RubyCube so from my original almost ready post I got the following done:
- Finished the stress test
- Finished first pass of documentation (rubydoc)
- More test cases for basic functionality
- Perspective transform is working
- Object destruction had to be optimized a bit. This is a bit tricky due to multithreading issues. Basically once the ruby script calls the registered free callback the object is marked for cleanup. The graphics/update thread handles reclaiming the actual memory in the main loop.
- I couldn’t find an effecient way to do game timers in ruby. This code looks nice but creates too many Time objects:
stopTime = Time.now() + 60 while(Time.now() < stopTime) do puts "thinking" endSo a custom solution has been cooked up. This ties into the existing low level events system used in rubycube (uglier but fast):
timerId = RubyCube.settimer(10, -1) # interval 10 seconds, repeats forever
loop do
event = []
while(RubyCube.readevent(event)) do
if(event[0] == RubyCube::TIMER && event[1] == timerId) then
puts “hit timer”
end
end
end
- I cut the number of animation types supported and am still working on a test that exercises all of them.
- Animation tests
- Timer tests
- Proper lighting support. This really limits the usefulness of perspective mode.
- Physics support. The APIs are there but not tested or supported for now.
- Lighting support
- Texture/Material support
- Physics support
- Any user suggestions
Related posts:






