December 2007

So, Xbox LIVE Arcade…

So, Xbox LIVE Arcade is now home to not one, but two really cool marble maze games, one being Switchball which is more methodical and puzzle like, and the second being Marble Blast Ultra which is more race oriented. Marble Blast isn’t particularly appealing graphically, but it’s a good showcase for the Torque graphics engine. Switchball has excellent physics and allows for real creativity in how you solve puzzles. Both games have a great deal of my attention lately, and are well worth the $5-$10.

general

Comments (0)

Permalink

Best show title I have ever seen on Diana’s Tivo:

When Surgical Tools Get Left Behind… 2.

general

Comments (0)

Permalink

Thread.pass…

zyps_demo is locking up the interface so that it won’t respond to window close events until the demo is done. The zyps executable itself will presumably lock up as well. But via a Google search, Alex Fenton has (inadvertently) helped me out a second time…

“using Wx::Timer + Thread.pass + evt_timer inside App#on_init seems to work well on OS X (dev, not 0.0.39), GTK (both) and Windows (both).”

The problem is present in my brief wxRuby test as well, so here’s a revised version of that, which plays much nicer…

Continue Reading »

Ruby
Zyps

Comments (0)

Permalink

This is a test post…

This is a test post from my Jott journal link. listen

Powered by Jott

general

Comments (0)

Permalink

http://diana.mcgavren.com

general

Comments (0)

Permalink

I’m having a very productive day today. Panic will do that to you.

general

Comments (0)

Permalink

Here we go… ruby-prof said wxRuby was spending a lot of time initializing memory device contexts (canvases to draw on)…

 %self     total     self     wait    child    calls  name
 45.42      5.63     5.63     0.00     0.00      120  Kernel#sleep
  8.85      2.05     1.10     0.00     0.95    28440  WxRubyStyleAccessors#method_missing
  5.16      0.64     0.64     0.00     0.00     9520  Wxruby2::MemoryDC#initialize
  4.42      5.14     0.55     0.00     4.59     9520  Wxruby2::Bitmap#draw

That would be because I was doing so before each line I drew.

	def draw_line(options = {})
		buffer.draw do |surface|
			surface.pen = Wx::Pen.new(
...
		end
	end

So as a quick fix, I’m queueing my shapes and drawing everything at once. This brought me about in line with Ruby-Gnome2, speed-wise:

	def draw_line(options = {})
		@line_queue << options
	end

	def render_lines
		buffer.draw do |surface|
			while options = @line_queue.shift do
				surface.pen = Wx::Pen.new(
...
			end
		end
	end
 %self     total     self     wait    child    calls  name
 69.41     11.27    11.27     0.00     0.00      240  Kernel#sleep
  4.24      1.83     0.69     0.00     1.14    30600  WxRubyStyleAccessors#method_missing
  2.96      4.17     0.48     0.00     3.69      480  Wxruby2::Bitmap#draw
  2.41      0.39     0.39     0.00     0.00    40640  Regexp#===

Though I made a pretty big memory structure to do it. I’ll have to slim that down at some point.

Now it says it’s spending a lot of time initializing colors (Colours?) and pens. Will I have to cache those? Hope not.

Ruby
Zyps
development

Comments (0)

Permalink

The Tivo gets a lot of tech podcasts, and I told Lenny I wanted to pick the next show after his cartoon was done.

Lenny (sincerely): “You mean that show where they talk about a lot of cell phones? Like nerds?”
Me (laughing): “Yes, that show.”

general

Comments (0)

Permalink

Mario Steele from the wxRuby list solved my problem - I was creating an extra device context and then not even using it. draw_bitmap works a lot better, too.

It’s working within Zyps as well, but it’s about 50% slower than Ruby-Gnome2. :( Now to find out if that’s my fault or the library’s.

general

Comments (0)

Permalink