Thursday, January 18, 2018

Contortions Follow Up

In my pevious article I discussed how miserably slow the inheritance step of game compilation is in my World Weaver project. It was nearly unusable. Performing this step of compilation took > minute. When coding, compiling, testing, repeat a delay of a full minute or three is surprisingly painful.

I had similar trouble when I first wrote the game compiler. What worked there was building SQL strings, one per table. Each string is a list of UNIONS. When a certain cap is reached the SQL is executed and the string cleared. This technique really helped. So I planned to do the same for inheritance.

I was pleasantly surprised to realize I could reuse the SQL strings and execute methods I had written for compiling. I went through and retrofitted inheritance. Then I went through my example game and finished updating every possible door to use inheritance. With that much inheritance the optimization would immediately be obvious.

And man it was.

With the batch statement update the inheritance step, even with ALL the doors inherited, that step in the process now takes a second or two.

Now on to the next problem - describing a room's connectors (doors etc) last and with a break before them. Easy enough? Not at all. More on that later.

No comments:

Post a Comment

From Shotcut to Kdenlive

So I've been using Shotcut for a while now, for my YouTube videos... and music videos. I love the application. Slicing clips, doing fade...