Skip to main content

News

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Fat Cerberus

2806
Yeah, Radnen just switched over to .NET 4.0.  It was originally using 2.0, but we both figured it was time to upgrade.  Win8 won't run .NET 2/3 apps out of the box anyway (needs a separate download), so we weren't saving anybody any time by sticking to the old framework version. :p
2807
Doesn't the old Sphere 1.5 editor use Scintilla? Unless the Scintilla.NET API is drastically different, maybe you could take some hints from there.  I'd look into it myself but I'm not near a computer right now.
2808
Yeah, I'm fickle, currently I'm using 4-character tabs almost exclusively but I've been known to switch between 2, 4 and 8 depending on my mood.  A lot of developers like to use spaces for consistency (the code looks the same for everybody), but tabs are better for me because I change my coding style so much! :-)

The Scintilla editor looks much better now, by the way.  The only suggestion I have, and I don't even know if this is possible, is some sort of indication that a block of code is collapsed, you know, other than the plus box changing to a minus.  Visual Studio has that "[...]" indicator, and even the old Sphere editor put a vertical line under the fold...
2809
Haha, I did a trial run with the VS2012 blue theme, ended up going back to default gray one.  Too much color drew my eyes away from the code. :)  I guess that's the reason they went with those flat icons, too... yeah, it's harder to find stuff initially, but once you know where the necessary commands are, the lack of distractions is refreshing.

But that's odd with the fonts, so if you change the font in the Scintilla control programmatically, it renders the text differently than if the same font were used by default? Seems like weird behavior.  And yeah, I noticed that about the plugin registration.  I bet I know what it is: The plugin isn't actually being unloaded because the garbage collector still sees references to it--it still has the editor events hooked.  Let me try something...

Edit: Yep, that fixed it.  You have to unregister your event handlers in the Destroy() method, otherwise the previously-selected plugin still gets TryEditFile first, and once that's matched everybody else ignores it):
Code: (csharp) [Select]
host.TryEditFile -= host_TryEditFile;


I sent a pull request.
2810
There's definitely a difference between the look of Consolas 10 in the Scintilla box versus the new one.  To be honest, though, I think I liked the thinner look better.  The FastScriptPlugin makes the text a bit more bold, almost identical to the way VS renders it, actually.  But now I feel like I'm going to get lost in a wall of code (and it's my own code, so that's saying something)... Maybe it's just that I have to get used to it, though.  It never bothered me in Visual Studio, no reason it should be any different just because it's JS instead of C#.

For what it's worth I say stick with the Scintilla editor as the default, at least for now, and provide the new one as an optional download.  If it were just lag when scrolling that wouldn't be a big deal, but I also noticed it when just entering text, there was a noticeable delay between when a character is typed and when it appears on-screen.  That would be quite distracting in day-to-day scripting, I'd wager.  But wow, I didn't realize the Scintilla control you were using was that old. Scintilla itself is still an active project, it was last updated (v3.3.1) only a month ago, but I just looked up Scintilla.NET and that's still only on version 2.5.2...

Edit: So what it looks like is that the Scintilla control is rendering the text with only standard anti-aliasing, whereas VS and the FastTextBox are rendered with full ClearType.  This is a great example of what a difference ClearType can make!
2811
Well, the new plugin certainly looks nicer... but it also feels a lot more sluggish compared to the old Scintilla control.  I probably wouldn't have noticed it on my i7, but the all-in-one desktop in my living room only has a crappy AMD E2 dual-core processor (pretty much the AMD equivalent to a Celeron) and the new editor is noticeably laggy--enough to be distracting.  The Scintilla editor--and even Visual Studio's editor for that matter!--is smooth as butter on the same machine.

Edit: It also seems to be converting all the tabs in my JS files into spaces on load. Not nice.  Good thing I discovered that before I edited any Specs files, I would have had to go back and put all the tabs back... :)

Edit 2: The performance difference is even noticeable on the i7.  It's at least usable there (only barely noticeable when scrolling), but I should not be able to perceive scroll lag on a 3rd gen Core i7 (nope, not even if I'm specifically looking for it! ;) ).  Are they really sure this is a FastColoredTextBox? :D
2812
Libraries / Re: [Script] Tweens
Yes, my isFinished() method is implemented to return true if elapsed >= duration.  When I was using yours though, it didn't have a method like that so I had to check against the actual value, which revealed the aforementioned bug.  You do have that onComplete option, but that's very unwieldy to use in a lot of situations, hence my redesign.

And yes, the easing functions are what's doing most of the work, haha.  I actually found more of those in the jQuery Easing Plugin project and incorporated them into my version: Bounce, Elastic and Back (that last one is neat--it purposely overshoots, then backs up).
2813
Libraries / Re: [Script] Tweens
Thanks for the fix, I ended up reimplementing my own version of it in Spectacles though, since yours was a bit clunky to use alongside my custom threading library.  I guess it would have been easy enough to add a few lines to the file to make it play along, but I figured for such basic functionality it was better if the API was consistent with the rest of the Specs core.  I'll still be sure to give you credit anyway, since I'd be lying if I said I would have thought of this on my own! ;)

Mine is used like this:
Code: (javascript) [Select]
var tween = new Tween(obj, 2.0, 'easeOutQuad', {
    x: newX,
    y: newY
});


// in update method:
if (tween.isFinished()) {
    // change state...
}


I do have one question, though: How do you handle multiple active tweens on the same object? I don't have any checks in place right now, so if somebody tries to tween the same property in opposite directions simultaneously, this could result in a deadlock. I was curious how you handled that, since yours didn't deadlock when I played that trick on it.
2814

When you make a new plugin, how do you get it to automatically move the DLL to the correct folder? It does it for all existing plugins, but not for any news ones. I'm right now in the process of actually creating a different script editor, using this.


Add the plugin as a project reference of the editor so it copies it to the output directory first. If it's not named ending in Plugin, you'll also have to modify the move command under Project Properties -> Build Events.
2815
Libraries / Re: [Script] Tweens
Found a bug: When using some easing methods, it never seems to reach the final value.  I noticed it when converting my menustrip class, doing an expoOut ease between 0.0 and 1.0 it got stuck at around 0.9998 and never budged after that.  This caused the menustrip to get stuck in the fading-in phase since I had it set not to change state until visibility >= 1.0.  Some of the easers work fine, others cause this bug.
2816
Yeah, the IDE is ugly as hell.  I get that they were going for an Office 2013 look, but Office did it better (I do like the Office 2013 look).  You will get used to it, though. Note I didn't say you'll ever LIKE it, just that you'll get used to it. Because it really is a nice IDE other than that--I love the new Start screen, for example.

I understand what they were going for, at least--minimize distractions so you can concentrate on the code instead of clicking around fiddling with other stuff (something I was guilty of with older versions of VS, more than I'd care to admit).  Which is an admirable goal for a programming environment.  The problem is that the total lack of contrast destroys all visual separation between things, so if you do have to look anywhere other than the code window, you get lost.  The idea was good, but the execution is all wrong.

Edit: Wow! The conversation was worth it, though: VS compiles the project much faster now, I wonder why .NET 2.0 took longer to compile... So um, am I allowed to fix bugs/implement features again? :)

Edit 2: Hm, looks like Microsoft was listening.  If you install SP2 (actually I think they call it "Update 2" now, but same thing), they added a "Blue" theme to the preferences that makes it look more like VS 2010.  The 2-bit icons are unchanged unfortunately, but at least there's a clear separation (a thick dark blue line, ala VS2010) between dock panes now.  Much more usable.  Unless that's the theme change you were talking about...?
2817
Engine Development / Re: TurboSphere
Windows Update always gets the real Intel drivers automatically for me (annoying tray icon and all), so that's not the issue.  Of course, that may not be the latest version all the time, so I'd have to look into that...  I find it hard to believe the GPU wouldn't support it at all.  Integrated or not, the i7's GPU isn't a slouch by any means--the Windows benchmark gives it a 6.8 for gaming graphics!
2818
That's odd, I know I originally had it explicitly search the sounds directory, but I could have sworn I changed that later in development... Oh well.  I think I must have had to revert my changes for some reason and then forgot to make the edit again.

But yeah, I'll leave the code as-is for now while you upgrade the project.  It'll give me a chance to do more work on Specs.
2819
Eesh, Lisp code always makes my head spin.  I mean, I can kind of figure out what it does if I study it hard enough, but I don't find it intuitive to read at all.
2820
I think you killed the sound test plugin.  I'm getting directory not found exceptions now on launch...

I see what it is, you're trying to manually search the "sounds" and "music" directories (the latter of which doesn't exist).  That's why I just had it search the whole project recursively, this way it picks up files whereever they happen to be.  The Sphere engine itself doesn't really care where you put stuff, so I figured the editor and plugins shouldn't either in most cases.