GLBasic forum

Main forum => GLBasic - en => Topic started by: MrPlow on 2014-Sep-17

Title: Mac OS Media
Post by: MrPlow on 2014-Sep-17
My compilation of the mac version of my app is not finding the media

Should I do a separate Media folder routine for Mac ?

I currently just see a FONT image instead of the main screen and graphics
Title: Re: Mac OS Media
Post by: spacefractal on 2014-Sep-17
Property a classic unix issue. Check your spelling on your filenames. Mac is case senative, unlike windows.

So pic.PNG is not the same as pic.png.

Ps. I'm did not spotted your name. You should been aware of this issue. Etc its could been in wrong png format (example using indexed mode), or id is the same.
Title: Re: Mac OS Media
Post by: erico on 2014-Sep-17
Are you using virtual screens? It is not working on Mac and usually displays a bugged first loaded image, which could be the font file.
It happens with my game.
Title: Re: Mac OS Media
Post by: MrTAToad on 2014-Sep-17
And dont forget to release all graphics before changing screen resolutions, otherwise they get corrupted.
Title: Re: Mac OS Media
Post by: spacefractal on 2014-Sep-17
Oh yes, is a issue with virtual screens on Mac, which is property that you see. Those screen dosent work on Mac.

This issue should been one of the most important to fix and then property the iOS 8 one.
Title: Re: Mac OS Media
Post by: Kitty Hello on 2014-Sep-17
Usescreen on mac fails totally? Does grabsprite work?

Gesendet von meinem GT-N7100 mit Tapatalk

Title: Re: Mac OS Media
Post by: spacefractal on 2014-Sep-17
not sure what its fails, but no graphics is drawing correctly on virtual screen. Im thinks Erico Resolution test for Android is a great cadicate to test it on MacOS, because its did happens with that test as well:
http://www.glbasic.com/forum/index.php?topic=9834.msg85756#msg85756

im have not have problems in my games, but im also diddent uses virtual screens at all. But im cannot release it to appstore due vsync issue (but no worry, hurry at all).
Title: Re: Mac OS Media
Post by: MrPlow on 2014-Sep-17
It is as Erico said... :sick:
I get a font displayed instead of any graphics so it is the virtual screen issue...

I did solve it before for Viking Invaders using something else instead of stretchsprite etc...

I will look into that method...


Title: Re: Mac OS Media
Post by: spacefractal on 2014-Sep-17
im diddent uses virtual screens, due perforcement, which was about half too slow. So can you avoid it and uses a sort of PaintImage() function im uses, that could also approve speed very much.

Howover on Mac, its should not been that much penaty anyway, so its better to get that one fixed.
Title: Re: Mac OS Media
Post by: MrPlow on 2014-Sep-18
Hi SF,

I just checked your PaintImage() - nice!

But is it different to what I do already..?

I currently use createscreen, usescreen 0, draw everything then  clearscreen then usescreen -1 stretchsprite etc..?

How is it faster that what I do already...just trying to get my head around it...
Title: Re: Mac OS Media
Post by: Ian Price on 2014-Sep-18
Switching between virtual screens can use precious cpu time - it's OK on some machines, but hits others really hard.
Title: Re: Mac OS Media
Post by: MrPlow on 2014-Sep-18
Ah, I think I see what you're doing...

So instead of using the virtual screen you are drawing full on the fixed screen size then grabbing it and clearing the screen then drawing it scaled down or up to fit on the current screen res without using a screen switch (USESCREEN -1)?
Title: Re: Mac OS Media
Post by: spacefractal on 2014-Sep-18
My game newer user scaled screens, but using ZOOMSPRITES/POLYVECTOR as well DRAWANIM (depend on image) directly to the backbuffer to avoid the virtual screen. The Assest files also often uses 2 size of the image, so im can choice the bigger or the smaller one to avoid using too much memory or scaling. But that can been a quite compliced sometimes.

You could eventuelly play and change the function to support DRAWANIM and/or POLYVECTOR, but that is not my job. PaintImage() showed in the codesnippet was a possible how scaling can been performed, but its can been used on other purphose as well.

But in the end im do not uses CREATESCREEN at all, due speed penaty. Im saw Genius Greedy Mouse performed in a half speed on a Android device with virtual screen, so im dropped that idea.