Progress

General discussion for players of Oolite.

Moderators: another_commander, winston

User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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).
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

Excellent, wd and a spcial hapy xmas to you
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
Captain Hesperus
Grand High Clock-Tower Poobah
Grand High Clock-Tower Poobah
Posts: 2312
Joined: Tue Sep 19, 2006 1:10 pm
Location: Anywhere I can sell Trumbles.....

Post 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
The truth, revealed!!
Image
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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.)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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.
User avatar
Star Gazer
---- E L I T E ----
---- E L I T E ----
Posts: 633
Joined: Sat Aug 14, 2004 4:55 pm
Location: North Norfolk, UK, (Average Agricultural, Feudal States,Tech Level 8)

Post by Star Gazer »

:shock: :lol: :lol:
Very funny, Scotty, now beam down my clothes...
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1878
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

deploy slower dhan light parashute!
Riding the Rocket!
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Great!

And welcome back, SGA! :D (But what did awake you so rudely? And do you feel very hungry now? :wink: )
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post 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...
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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.
Post Reply