Skip to main content

News

Topic: Sphere 5.5.1 (miniSphere) (Read 412637 times) previous topic - next topic

0 Members and 2 Guests are viewing this topic.
  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: minisphere 4.3.8
Reply #1440
Looking at the code for cloneSection real quick, I think I might have an idea what causes that loss of transparency bug.  I'll check into it and fix it if so.
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: minisphere 4.3.8
Reply #1441
@Rhuan: I can't reproduce that transparency bug.  I have the following test code:
Code: (javascript) [Select]

const prim = require('prim');
var image = LoadSurface('Title.png');
var slice1 = image.cloneSection(0, 0, 300, 75).createImage();
var slice2 = image.cloneSection(0, 75, 300, 75).createImage();
while (system.run()) {
prim.fill(screen, Color.Chartreuse);
image.blit(0, 0);
slice1.blit(300, 0);
slice2.blit(300, 75);
screen.flip();
}


Which produces the screenshot attached.  As you can see, the image remains transparent even when sliced up (I didn't cheat by giving it a green chartreuse background ;)).
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Rhuan
  • [*][*][*][*]
Re: minisphere 4.3.8
Reply #1442
So I ran it on my mac build of miniSPhere and got two problems....

Firstly duplication of the text and secondly blue background.

Note the difference between the two screenshots;

This code produced the one with the duplication:
Code: (javascript) [Select]
const prim = require('prim');
var image = LoadSurface('Title.png');
var slice1 = image.cloneSection(0, 0, 300, 75).createImage();
var slice2 = image.cloneSection(0, 75, 300, 75).createImage();
while (!IsKeyPressed(KEY_ESCAPE)) {
        prim.fill(screen, Color.Chartreuse);
        image.blit(0, 0);
        slice1.blit(300, 0);
        slice2.blit(300, 75);
        screen.flip();
}


This code prodcued the one without the duplication:
Code: (javascript) [Select]
const prim = require('prim');
var image = LoadSurface('Title.png');
var slice1 = image.cloneSection(0, 0, 300, 75);
var slice2 = image.cloneSection(0, 75, 300, 75);
while (!IsKeyPressed(KEY_ESCAPE)) {
        prim.fill(screen, Color.Chartreuse);
        image.blit(0, 0);
        slice1.blit(300, 0);
        slice2.blit(300, 75);
        screen.flip();
}


In both cases the transparency is lost.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: minisphere 4.3.8
Reply #1443
In both cases the output is the same here.

One thing I do notice is that in your screenshots, the blitted image is also smaller than it should be.  I wonder if there's a driver bug at play here...

edit: Wait a minute... does your Mac have a Retina display?  I vaguely remember that you have to do something in XCode to make your app DPI-aware, otherwise Allegro doesn't render things properly (OS X sneakily scales everything up but OpenGL doesn't realize this).

edit 2: See here: https://github.com/liballeg/allegro5/blob/master/README_macosx.txt#L25-L50
  • Last Edit: December 31, 2016, 12:31:41 am by Fat Cerberus
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Rhuan
  • [*][*][*][*]
Re: minisphere 4.3.8
Reply #1444
Ok So the image size was a mistake I'd made - I's downloaded the thumbnail rather than the actual image... Adjusting to the proper image gives the following two results.

The one with the half duplicated image is the one with the .createImage() calls in it the one where the only issue is the loss of transparency is without the .createImage() calls.

I do have a retina display but that's not relevant - it's only meant to cause problems if you move a window between the retina display and another screen - I haven't been using a second screen so can't test how this would work at the moment.

Edit: Found another issue, though this one is kinda minor. Savefile support, in sphere 1.5 if you write a boolean to a savefile it writes it as 0 for false and 1 for true it detects that it's meant to be a boolean from the default value you give it when loading. Whereas minisphere will write true and false, so any savefile with booleans written by one is not readable by the other.
  • Last Edit: December 31, 2016, 04:26:47 am by Rhuan

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: minisphere 4.3.8
Reply #1445
This bug makes no sense. ???  On all platforms including Windows, minisphere runs Allegro in OpenGL mode.  So the behavior should be identical, and as you could see it works as designed for me.  For some reason though, it doesn't seem to like your mac.  I'm very confused.
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Rhuan
  • [*][*][*][*]
Re: minisphere 4.3.8
Reply #1446
Maybe I something I messed up in the compilation, seems super odd though yes.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: minisphere 4.3.8
Reply #1447
I'm going to invest in a MacBook sometime in the next few months, so then I'll be able to support minisphere officially on all 3 major platforms.  So if this issue isn't solved by then, hopefully I'll be able to get to the bottom of it myself. :)

The only other alternative for me is to go the Hackintosh route, and I'm really not up for all the headaches that apparently entails.
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Rhuan
  • [*][*][*][*]
Re: minisphere 4.3.8
Reply #1448
I hope you're not buying a macbook just for minisphere? They're a tad expensive...

I should be able to try and track down the bug at some point I haven't into it too much as I have ways of gettign around this - as said it may just be something I messed up on compilation - I built miniSphere and Allegro and most of the other dependencies from scratch using my own xcode project I didn't use any of the provided makefiiles so there's a lot of room for me to have got something wrong.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: minisphere 4.3.8
Reply #1449
Yeah, I'm aware the price tag is pretty steep.  But I'd like to learn OS X and iOS development in general.  The last time I used a Mac was back in high school, and that was with OS 9 (most of time running At Ease).  Believe it or not I've never actually used OS X before!
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: minisphere 4.3.8
Reply #1450
Is it possible to run OS X in Virtualbox or VMware? That might make things faster on the development side..
  • Last Edit: January 02, 2017, 12:53:05 am by Eggbert

Re: minisphere 4.3.8
Reply #1451
A Mac Mini is also a cheaper option. But MacBooks really are pretty nice. They feel very solid, they have very good screens, keyboards, and touchpads, and have very decent built in speakers for a laptop.

Re: minisphere 4.3.8
Reply #1452
It was pretty nice, but why shell out a bunch of money for a macbook when I can buy (and I did) a used thinkpad?
I have no idea why, but thinkpads seem to sell for crazy cheap on ebay. I got this one for $~80 after shipping. My only complaint is that it has two really tiny speakers.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: minisphere 4.3.8
Reply #1453

Is it possible to run OS X in Virtualbox or VMware? That might make things faster on the development side..


I thought of this a while back, but VirtualBox only allows OS X VMs to run on OS X.  Don't know if the same applies to VMware.
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: minisphere 4.3.8
Reply #1454
That's because as a part of the license for OS X, you may only run it on an Apple-produced computer. This includes under a VM. And since VMWare and VirtualBox require OS support, not having emulation to fallback on like Qemu does, they have to play nice with Apple to have OS X support at all.