Page 13 of 138

Posted: Mon Dec 24, 2007 1:02 pm
by JensAyton
Wow, Instruments really is awesome. It’s like the best Christmas present ever, except I got it a few months ago and barely looked at it because it was unusable on my old system.

Fixed leaks in:
  • Expanding description strings.
  • Loading shader-based materials.
  • Loading smallish sounds (Mac OS X only).
  • A JavaScript implementation support method used primarily in logging.
The first one appears to have been the primary issue for the short-range chart screen; I’m not sure why yet, since it’s not obvious that it needs to be happening much there.

Posted: Mon Dec 24, 2007 2:55 pm
by JensAyton
Reason identified: string expansion is carried out for system data generation, which is done for each system on the chart every frame. This ought to be cached, but fixing this specific problem is barely worth it given the general horribleness of the GUI code. Anyway, this was probably the biggest leak in Oolite (it’s triggered from lots of places), but I’ll go through more aspects of the game for leaks once I have more memory (it’s spending Christmas in a post office logistics centre).

Posted: Mon Dec 24, 2007 7:47 pm
by TGHC
Excellent, wd and a spcial hapy xmas to you

Posted: Sat Dec 29, 2007 5:35 pm
by Captain Hesperus
TGHC wrote:
Excellent, wd and a spcial hapy xmas to you
Obviously, the above message was written while the inestimable Commander's brain was fair floating in Christmas Beer!

Anyway, great work Ahruman!

Captain Hesperus

Posted: Sat Dec 29, 2007 10:48 pm
by JensAyton
Got Python implementation of JavaScript debug console working. Well, working under OS X. Under Windows, you can have input or output, but not both. I can’t get my Linux virtual machine talking to the intertubes at the moment, so I haven’t tried it there. (And Parallels is still painful, but my box of Moar Gigglebytes is now at the post office, waiting to be picked up. Whee.)

Posted: Sun Dec 30, 2007 5:22 pm
by JensAyton
Tried to implement sane display management (in dribs and drabs throughout December). Have temporarily given up because SDL only provides insane options.

Un-gave-up, found barely-acceptable work-around for insane SDL junk.

Posted: Sun Dec 30, 2007 9:25 pm
by Star Gazer
:shock: :lol: :lol:

Posted: Thu Jan 03, 2008 12:49 pm
by Arexack_Heretic
deploy slower dhan light parashute!

Posted: Sun Jan 27, 2008 11:41 pm
by JensAyton
Rudely awakened from hibernation. Found another_commander had done a bunch of work on making Oolite localizable (moving more text into descriptions.plist, making it easier to override parts of descriptions.plist). Twiddled text engine to support eight-bit text encodings, and load font metrics from a plist.

Image

Note: this is limited, 1990s tech text rendering. You can’t mix languages, or do fancy stuff like Chinese or Arabic. But it’s better than the 1970s stuff we had before.

Posted: Mon Jan 28, 2008 7:30 am
by Commander McLane
Great!

And welcome back, SGA! :D (But what did awake you so rudely? And do you feel very hungry now? :wink: )

Posted: Sun Feb 03, 2008 2:20 am
by JensAyton
JS sound code.
Supports looping or repeating a specified number of times. Sounds are played through sound sources; any number of sound sources may exist (they’re very lightweight), any sound may be played by any number of sound sources at once, but each sound source can only be playing a given sound at any time. A script is responsible for keeping its sound sources around; if a sound source is garbage collected while playing, the sound will stop.

Image

Posted: Sun Feb 03, 2008 3:49 pm
by JensAyton
Broke music control out into a new class, in preparation for JavaScript music interface. As a side effect, mission music should work on SDL builds, and the theme music should loop. I hope. As another side effect, it’s now possible to add a music/sound file, “OoliteDocked.ogg”, to be automatically played when docking. Music played from JavaScript will override this.

The behaviour of Ootunes (OS X only) and the docking music key will be changed. Previously, the Ootunes setting was stored on a per-file basis, while the docking music setting was a global preference which was toggled each time you pressed the key. In 1.71, Music Mode (Off/On/iTunes, with iTunes being available only on OS X) will be a global setting, and the docking music key will start/stop music in the On mode only.

Edit: implemented JavaScript interface. (Gosh, that was quick.)

Code: Select all

Sound.playMusic("name.ogg") // If name.ogg is already playing, does nothing. Otherwise, stops currently playing music (if any) and starts name.ogg.
Sound.stopMusic("name.ogg") // stops only if name.ogg is playing
Sound.stopMusic() // stops any playing music

Posted: Sun Feb 03, 2008 6:13 pm
by Kaks
Very, very nice! :D

That mythical stable release might not be all that mythical, if you keep coming up with stuff like this! :)

Just a very minor point<me hides>: are those methods going to be available via the global Sound as opposed to sound? I'm asking because all the other global interfaces have got lower case names...

Posted: Sun Feb 03, 2008 6:21 pm
by JensAyton
Sound is capitalized because it’s a prototype object (much like Number, Array or Entity). All prototype objects (which act more or less as classes) are capitalized.

Posted: Sat Feb 16, 2008 10:16 pm
by JensAyton
Fixed bug where space compass would show the way to the station, but using the planet icon, after launching from a station. This has probably been there since before 1.0. Doesn’t anyone ever look at the compass? :-)

…Hmm, the fix probably does the wrong thing when launching from a secondary station.