Skip to main content

News

Topic: neoSphere 5.9.2 (Read 523843 times) previous topic - next topic

0 Members and 18 Guests are viewing this topic.
  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.4.0
Reply #660
Yeah, I personally don't like a lot of things about CS.  Postfix if/unless, for one, confuses me to no end, and indent-based scoping... Ugh.  I prefer to write pure JS.  I still added CS though because I like to give people the option. :). I try not to impose my own preferences on others.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: minisphere 1.4.0
Reply #661
http://chadaustin.me/2015/05/coffeescript/

I certainly think that the syntax can be just a little ambiguous. I tend to be OK with ws-awareness, it's just a choice, and one I don't mind.

I've only used a little bit of Coffeescript. On the whole, it just seems to be a different syntax for JS (not too much better or worse). The only feature I thought was really nifty was how constructors could put named parameters directly into fields. That would be really nice to have in JS.

  • FBnil
  • [*][*]
Re: minisphere 1.4.0
Reply #662
minimally rewrote agrapher to run with minisphere. It requires the system scripts typeof.js and colors.js (this one is updated with more things).
It draws functions and creates an image of that. See png attached.

So far, although similar at first glance, the grid and lines are offset a little, thus the image is not the same. I'm still investigating what exactly is different.
(s7.png is sphere 1.6 generated and ms.png is minisphere generated).

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.4.0
Reply #663
Just for future reference, you can put system scripts in (game dir)/lib and RequireSystemScript() will find them. :)
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • FBnil
  • [*][*]
Re: minisphere 1.4.0
Reply #664
looking at it with gwenview reveals that the grid (which are transparent blue lines), are not the uniform color they should be, where, a lighter dot should be produced at intersections. This could be because of the way primitives are composed now. While irfanview does not show this difference. (the offset, is viewable in both image viewers, thus a real difference)

The sphere editor image viewer shows even more contrast in the grid produced by minisphere.

@L.E.: Thanks for the tips

edit: I know what it does now: minisphere, when printing a semi transparant color over the black canvas, actually makes the black canvas transparent, instead of blending, then leaving the alpha alone.
  • Last Edit: June 21, 2015, 07:47:49 pm by FBnil

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.4.0
Reply #665
I should be able to fix that offsetting easily enough.  I'll take a look at it later.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.4.0
Reply #666
I fixed the offset.  I just had to add 0.5 to the coordinates passed to Allegro.  Standard off-by-one error.

As for the colors, I think ultimately, with minisphere you're at whim of the hardware when using the legacy primitives.  A screenshot of my result is posted, and as you can see it's actually darker than the image produced by Sphere 1.5.  Which is the exact opposite of the result you got.
  • Last Edit: June 22, 2015, 12:50:02 am by Lord English
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.4.1
Reply #667
1.4.1 fixes the off-by-one rendering for Line() as well as a CoffeeScript scoping issue.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • FBnil
  • [*][*]
Re: minisphere 1.4.1
Reply #668
Ah, it is darker because it is transparent blue, over black, which makes it very black, then rendered as non-transparent pixels (alpha 255).  It seems the transparency of a pixel also affects the RGBA of the destination, while this should only happen when it blends colors.

  • FBnil
  • [*][*]
Re: minisphere 1.4.1
Reply #669
yay! I can segfault minisphere!

1. Run pianola
2. Press pageup twice (changes instrument)
3. press a key, for example q, twice.

Not sure why it doesnt segfault with the other sounds.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.4.1
Reply #670

Ah, it is darker because it is transparent blue, over black, which makes it very black, then rendered as non-transparent pixels (alpha 255).  It seems the transparency of a pixel also affects the RGBA of the destination, while this should only happen when it blends colors.


Thanks, I'll have to look into that, I may have screwed up the blend modes for surfaces.

Not sure what's causing that segfault though, and I'm not near a computer to run it through the debugger at present.  I'll look at it tonight.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.4.1
Reply #671
Hm, I can't get it to segfault following your directions.  I did notice however that the pitch doesn't change with different notes, they all sound the same.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.4.1
Reply #672
Well, the monotone notes are now fixed at least.  I forgot to reapply the gain, pitch, etc. when restarting the stream.

Somehow you keep finding the best testcases for minisphere, uncovering so many obscure bugs.  It helps me out a lot. ;)

Now to take another look at that grid.

edit: I figured it out, Allegro by default does blending for all components, including the alpha channel.  I have to use a different function to set a separate blendmode for the alpha channel:
https://www.allegro.cc/manual/al_set_separate_blender

Surprising I didn't notice this before, as I do some blending with surfaces myself.  I'll see about a fix.
  • Last Edit: June 23, 2015, 01:18:47 am by Lord English
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: minisphere 1.4.1
Reply #673

Surprising I didn't notice this before, as I do some blending with surfaces myself.  I'll see about a fix.


Well, full screen consistency can obscure it. I mean, unless you tested with Sphere 1.6 side-by-side you might have not just seen it. ;)
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.4.1
Reply #674
@FBnil
The output of your grapher is, for all intents and purposes, identical to Sphere 1.5 now.  See screenshot. :)

The fix will be in 1.4.2.

edit: Dammit, my fix isn't right, I ended up breaking other stuff (like the startup game, and Spectacles).  And just as I was about to release 1.4.2 too... oh well.  Back to the drawing board...
  • Last Edit: June 23, 2015, 02:40:21 am by Lord English
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub