Search found 90 matches

by cag
Wed Apr 15, 2020 6:13 am
Forum: Expansion Pack
Topic: script tool: Exception traceback
Replies: 0
Views: 314

script tool: Exception traceback

Using JavaScript's try ... catch statement, a primitive form of call stack traceback is possible. this._initOptions = function initOptions( oxp ) { try { registeredOxps[ oxp ] = ... ... } catch( err ) { log(this.name, ws._reportError( err, initOptions, [oxp, registeredOxps, decodedChoice], 1 ) ); if...
by cag
Fri Mar 20, 2020 8:40 pm
Forum: Expansion Pack
Topic: [Release] Space Crowds
Replies: 45
Views: 22760

Re: [Release] Space Crowds

Both "cargopod" and "1t-cargopod" are roles and you'd need to check spawnedShips[i].roles.indexOf('cargopod') < 0 But roles are problematic, as different oxp's make their own, eg. "[ups-barrel]", "[barrel]" (not sure why these have brackets). If you want to preserve splinters, isRock will fail (they...
by cag
Mon Mar 09, 2020 3:11 am
Forum: Expansion Pack
Topic: [Beta] Release of Telescope 2.0
Replies: 8
Views: 5485

Re: [Beta] Release of Telescope 2.0

The autolocking makes getting a lock to a dockable to ask for docking clearance very hard, if not impossible, when there are other ships flying around/behind the dockable... The autolock feature is part of telescope's 'Navigation Mode'; just toggle your weapons on ('_' key) and you leave navigation...
by cag
Wed Jan 08, 2020 12:45 am
Forum: Expansion Pack
Topic: [WIP] new GUI for debug console
Replies: 4
Views: 1502

Re: [WIP] new GUI for debug console

after building the application, I get the Tk icon on the console window rather than the "correct" one I'm unable to reproduce on my rig (Windows 10 Pro - 1809) either by running the .exe or the script via pythonw.exe. I see the provided icon on the console, taskbar and dialog windows (Tk's "feather...
by cag
Mon Jan 06, 2020 1:18 am
Forum: Expansion Pack
Topic: [WIP] new GUI for debug console
Replies: 4
Views: 1502

[WIP] new GUI for debug console

Built using OoDebugConsole1.5 as a starting point, this version is functionally the same, just with less typing. The one exception is the 'alias' function in Options menu. Basic-debug.oxp provides a few, eg. 'PS' for player.ship, but I wanted more (and in lower case!). As with Basic-debug.oxp, these...
by cag
Thu Aug 08, 2019 7:33 am
Forum: Expansion Pack
Topic: OXP Performance tips
Replies: 82
Views: 62282

Re: OXP Performance tips

I've updated the Resources-Scripts with some minor housekeeping. The link remains: https://www.dropbox.com/s/cudwuq8d56epcm2/Resources-Scripts.zip?dl=0 The highest count before the log statement was removed: ship died, __handler_reuse = 1261, __comms_reuse = 57 ship died, __handler_reuse = 1361, __c...
by cag
Sat Apr 20, 2019 5:16 am
Forum: Expansion Pack
Topic: [Beta] Release of Telescope 2.0
Replies: 8
Views: 5485

Re: [Beta] Release of Telescope 2.0

[*]What's the status of this rewrite? Stable, pending any evidence to the contrary :) [*]Is it already good enough for regular players to use it? I believe so, but with any Beta, you should backup your saved games, just in case. It should work fine going forward but if you decide to revert back to ...
by cag
Fri Oct 19, 2018 5:00 am
Forum: Expansion Pack
Topic: OXP Performance tips
Replies: 82
Views: 62282

Re: OXP Performance tips

1) that seems involved (!) Could you be more specific? 2) shouldn't compilers take care of this sort of thing? Except, hold on, it's an interpreted language. But perhaps there is some sort of JIT (as I believe it is called) . . Perhaps, maybe; I don't really know. We're not using the most up to dat...
by cag
Thu Jul 19, 2018 4:34 am
Forum: Suggestion Box
Topic: Reverse up-down control when looking astern?
Replies: 72
Views: 43069

Re: Reverse up-down control when looking astern?

I've updated it to be version aware (d'Oh)

IF it checks out, you won't have to continue with 2 versions ...

https://www.dropbox.com/s/4609bj3d2btwz ... l.oxz?dl=0
by cag
Wed Jul 04, 2018 3:04 am
Forum: Suggestion Box
Topic: Reverse up-down control when looking astern?
Replies: 72
Views: 43069

Re: Reverse up-down control when looking astern?

There is something about the reverse control thing that doesn't feel right.. (I play on keyboard. I guess this is not really an issue when using a joystick?) When you dive/climb or rotate (diving/climbing is really also rotating) and then let go of the keys, you don't stop rotating immediately. Thi...
by cag
Fri Jun 29, 2018 1:35 am
Forum: Expansion Pack
Topic: OXP Performance tips
Replies: 82
Views: 62282

Re: OXP Performance tips

The tip I gave phkb, and I realized then that although it is implicit in what was already exposed, it is not obvious: From: this.$rand = function(max) { return Math.floor((Math.random() * max) + 1); } To: this.$rand = function $rand(max) { var that = $rand; var floor = (that.floor = that.floor || M...
by cag
Thu May 10, 2018 12:04 am
Forum: Expansion Pack
Topic: OXP Performance tips
Replies: 82
Views: 62282

Re: OXP Performance tips

By itself, there's no real difference (~40 nanosec). It stores a 1 hop property reference in another 1 hop reference. If you're going to reference the player's ship more than once in a function, use var ps = player.ship; so you save one hop everytime you use it (ps.target, ps.speed, etc.) The saving...
by cag
Sun May 06, 2018 3:42 am
Forum: Expansion Pack
Topic: OXP Performance tips
Replies: 82
Views: 62282

Re: OXP Performance tips

The new version of Telescope is about 35% faster than 1.13 (14% faster than 1.15) and garbage production was decreased by over 70% vs 1.15 (1.13 & 1.15 have similar rates). Here are some of the techniques I used to improve performance: Take out the garbage We've talked recently in this thread about ...
by cag
Sun May 06, 2018 1:43 am
Forum: Expansion Pack
Topic: OXP Performance tips
Replies: 82
Views: 62282

Re: OXP Performance tips

I've ported some of the core vector & quaternion functions into JScript. ... You can DL the file here: https://www.dropbox.com/s/sojm6ulor13s0kz/vector_fns.zip?dl=0 I've updated vector_fns to add 2 variants on 'angle_between', namely '_angle_between_unitV' and '_angle_between_two_unitV'. [DL link i...
by cag
Fri May 04, 2018 3:34 am
Forum: Expansion Pack
Topic: [Beta] Release of Telescope 2.0
Replies: 8
Views: 5485

Re: [Beta] Release of Telescope 2.0

(Although it says shipData, I actually think it's effectdata that's to blame) You're quite correct, it is the effectdata. If you look inside the oxz, there is an entire folder devoted to the subject (/effect data). The tl;dr version is that oolite cannot create visual effects from shipdata, so I ha...