GLBasic forum

Main forum => Announcements => Topic started by: Kitty Hello on 2011-Aug-02

Title: Update
Post by: Kitty Hello on 2011-Aug-02
Fixes issues with the Palm Pixi device (you have a new "platform" called "PALM_PIXI" that is compatible with any iOS device). Please use the "WEBOS" platform for 2.x distributions, only.

I hope the pixi market share might bring a few bucks for you. The Pixi-AppCatalog is quite empty, so there's a fair chance IMO.
Title: Re: Update
Post by: Crivens on 2011-Aug-02
Cool. I only have a Pre2, so what are the differences? Can I just flag it as Pixi compatible now with my Pre2 tested and working code, or do I need to take a few things into account? Importantly if resolution has to be accounted for, and I know my code works on my Pre2, then will testing on a PC at Pixi resolution be enough to be confident that it should be fine on the Pixi?

Cheers
Title: Re: Update
Post by: Ian Price on 2011-Aug-02
Palm Pixi is a slower machine than Pre/Pre2, so you can't guarantee that an app that works on the Pre will work on the Pixi at the desired standard.

It's only officially supported to WebOS 1.4.5. You will have to mark your app as minimum 1.4.5, not 2.XX. The Pixi can be made to work on 2.X, but it's not officially supported.

The biggest difference though (as you've mentioned) is that the screen resolution is 320x400 (not 320x480 like the Pre).

Good work Gernot. Many thanks =D
Title: Re: Update
Post by: mentalthink on 2011-Aug-03
new Update?¿,
well I try to install it, and Glbasic tell me it´s updated yet.
I dowload the last version from server, and the same...

Perhaps I´m very tired, and I confused reading.  :blink: :blink:  :noggin:

Title: Re: Update
Post by: erico on 2011-Aug-03
Great! it´s almost a new platform! great work! :good:
Title: Re: Update
Post by: hardyx on 2011-Aug-03
Thanks Gernot for this "new" platform. In Spain Palm phones was distributed by Vodafone, but now they don't sell Palms anymore. :(

BTW, where (URL) can I see the available apps for Palm?
Title: Re: Update
Post by: MrTAToad on 2011-Aug-03
Its a bit tricky without a device as the general store isn't available.  However, this https://developer.palm.com/content/showcase/app_showcase.html should let you search for things.
Title: Re: Update
Post by: MrTAToad on 2011-Aug-03
Metalthink - I dont think it he has released it yet...
Title: Re: Update
Post by: MrTAToad on 2011-Aug-03
Could PLATFORMINFO$("") be updated so that it returns a different value for HP Tablets ?
Title: Re: Update
Post by: Hatonastick on 2011-Aug-05
Quote from: MrTAToad on 2011-Aug-03
Metalthink - I dont think it he has released it yet...
You still using 10.057 as well?
Title: Re: Update
Post by: MrTAToad on 2011-Aug-05
Yes, indeedly doodly...
Title: Re: Update
Post by: Kitty Hello on 2011-Aug-18
another quick update, that fixed the X_world2screen and adds the getscreensize for usescreen surfaces.
I also might have changed the buffer size for the android sound system. Can you please test if it's working better now?
Title: Re: Update
Post by: Qube on 2011-Aug-18
Sorry, Kitty, X_WORLD2SCREEN still not working on the iPad (but fine on PC) with the latest 10.084  :(
Title: Re: Update
Post by: Kitty Hello on 2011-Aug-18
Darn. What could that be then... I've got to turn the Mac on then.
Title: Re: Update
Post by: Minion on 2011-Aug-18
Sadly no change in sound on Android either ;(
Title: Re: Update
Post by: Kitty Hello on 2011-Aug-24
OK, sound problem was solved with a different approach, I heard.
New update brings smaller bug fixes.
Title: Re: Update
Post by: Qube on 2011-Aug-25
I see the log file says 10.090 is available but when checking for updates it still says 10.084 is the latest?  :S
Title: Re: Update
Post by: Kitty Hello on 2011-Aug-25
Oops. Fixed.
Title: Re: Update
Post by: Kitty Hello on 2011-Sep-21
New update is online. You must get a new setup for the Caanoo support.
Please uninstall the old version to be safe.
Title: Re: Update
Post by: bigsofty on 2011-Sep-21
I've always liked the line numbers within an IDE, dunno why, I suppose there handy for knowing where you are and of course the nostalgia factor!  :good:
Title: Re: Update
Post by: MrTAToad on 2011-Sep-21
A uninstall and re-download are a must for caanoo compilcation - otherwise you get a compiler error message...
Title: Re: Update
Post by: Kitty Hello on 2011-Oct-29
The new update is online. It should fix a lot of problems, and I hope it won't break anything, since I really changed a lot.
Title: Re: Update
Post by: Hatonastick on 2011-Oct-29
Want the bad news or the bad news? :)

All the test programs I had working on my Android tablet and Samsung Galaxy Mini no longer work.  They compile and install just fine, but when you run them they seem to exit pretty much straight away.

Edit:  Finally got one program to work but has a majorly corrupted display.

Edit:  Ok maybe its not all bad news.  Id say this doesnt happen on all Android devices.  I can compile (so far) for the Galaxy Mini just fine, but nothing runs properly on my Tablet.   On the Tablet it either doesn't run at all or it has a corrupted display.  The Tablet runs Android 2.2, while the Galaxy Mini runs 2.3.4.

Hmm ok just found something that doesnt run on the Galaxy Mini now.  Is there any way I can get a bug report that would be useful to you Gernot?
Title: Re: Update
Post by: bigsofty on 2011-Oct-29
Over the last couple of days, I was getting similar results (when I got the compile to do the odd compile that is), instant exit form an Android app... I assumed it was my sucky Andoid first setup, as I'm new to Andoid but maybe not? Could a new Java SDK version or installing the latest Android SDK be the culprit?
Title: Re: Update
Post by: Hatonastick on 2011-Oct-29
Gernot or me?

In my case definitely not.  These were all programs that were compiling, installing and running mere minutes before I upgraded to the latest GLB release.  After that almost nothing worked.  They all compile fine still, but only one ran (sort of) on one device after the update.  I didn't update anything else other than GLB.  Of course it could still be something my end.  Maybe with this release I need to update something in the SDK or something.
Title: Re: Update
Post by: bigsofty on 2011-Oct-29
Ooh, might still be me then, my Android setup is funky to say the least.  :S
Title: Re: Update
Post by: Hatonastick on 2011-Oct-29
Yup, no problems on windows for me either, but Android is definitely not working for me.  Of course, it could be just me though.  Need to know if any other Android developers are getting similar problems since the update.
Title: Re: Update
Post by: Kitty Hello on 2011-Oct-29
Use the trash icon once. Helps?
Title: Re: Update
Post by: mentalthink on 2011-Oct-29
About the command X_Object set frame, how it´s works, I try to find in the help the explanation but don´t appears... I think only load in memory a only one frame, what we dessire in a 3D object animated?¿....

Thanks
Title: Re: Update
Post by: Mikele on 2011-Oct-29
Quote from: Kitty Hello on 2011-Oct-29
Use the trash icon once. Helps?

I have the same problem on Android. Cleaning the project doesn't help.

M.
Title: Re: Update
Post by: Hatonastick on 2011-Oct-29
Quote from: Kitty Hello on 2011-Oct-29
Use the trash icon once. Helps?
Well it certainly helped it compile and run when it wasn't for me before, think I might start routinely clicking on that before I compile any project in the future.  Thanks didn't even realise that button was there.

The downside is that although it now runs, the FPS for the demo I'm running (the 3D shadow test) has dropped through the floor when it used to run at about 30fps on my tablet.  Going to play and see if theres something I should set that I didnt need to do before.

Edit:  Hmm no it's not just a massive drop in FPS, it does look odd.  Sort of majorly faded.  Previously when I compiled and ran it on this device it was 30FPS and didnt look a whole lot different to when I ran it on my desktop.

Edit: I got another of my projects to compile and install after cleaning as you suggested.  It runs, however unlike others it has a FPS counter and that has definitely dropped.  Before when I ran my game it was getting 34FPS or so, now it's around 26-27.  Not a massive drop maybe, but enough to make a difference.  Wow, drops to 15 if I touch the screen -- but I think I read somewhere something you can do to help that.  Maybe.

Edit: My third program compiles, and runs but when you do run it all you get is a white patch on the screen where previously you got buttons, plus if you compile and run it for windows everything works fine.  This is really weird.

Going to look at this again tomorrow (I need sleep!).  Hopefully by then other guys using Android can say yay or nay as to whether it's working ok for them.  Currently it doesn't seem to be for me but I'm not ruling out user error on my part just yet.
Title: Re: Update
Post by: Mikele on 2011-Oct-29
I can't get to work any of my programs on android (with or without CLEAN PROJECT)  :(. Compiling passes without errors but I have just a blank screen for a few seconds. It did work in the previous version of GLB.

EDIT: After reinstalling (back to 10.118) everything seems to be ok. Any suggestion what I'm doing wrong? I have just one android device (galaxy s  sys. 2.3.5)
Title: Re: Update
Post by: Hatonastick on 2011-Oct-30
Interesting.  That's what was happening with mine after the update, but cleaning did seem to make a difference.  The only thing is although I don't have your problem anymore, there's definitely odd things going on with the display from reduced speed to not displaying all the graphics.  This is on Android 2.2 though.  Today I'm going to try Android 2.3.4 and see if it's the same.

Edit:  Ok so far I'm getting the same results on 2.3.4 phone that I've gotten on the 2.2 tablet.  Reduced speeds and weird problems with graphics.  Take the GLB 3D example Shadows.  I had that compiled and running mostly fine (except for z order issue) on both devices before the update.  Now they both run it extremely slowly and the lines that mark the axis (red blue and green) are all bent and kinked.  Very odd stuff.  The Mobile device Keyboard that Ampos came up with run fine (sort of, there was a scaling issue) on both devices before the update, now all you get is a white screen.  I'm getting similar results with everything I'm trying that worked before the update.  Will be interested to see if someone has no problems compiling and running on Android after this last update.
Title: Re: Update
Post by: caffeinekid on 2011-Oct-30
My game runs about 10 times slower and the graphics are not centred now for some reason, when they were before. Oops.
Title: Re: Update
Post by: MrTAToad on 2011-Oct-30
Will have to try it on mine later :)
Title: Re: Update
Post by: Kitty Hello on 2011-Oct-31
oh no :(
I needed an image format with an alpha and a Z-buffer. Does this really impact framerates so hard?

The clean is required to copy the new libs in the distribution dir. If you get strange scalings, the manifest.xml might have been altered. You can try to keep a copy of the old one.

Title: Re: Update
Post by: Hatonastick on 2011-Oct-31
Unfortunately yes it seems as if it has.

Would that affect 3D as well?  Just that it's really odd what happens to the axis lines in the Shadow example.  Before the update it looked fine (other than z order) but now x, y,  and z lines are wiggly instead of straight.
Title: Re: Update
Post by: Kitty Hello on 2011-Oct-31
the scaling of the app has been changed in the manifest file then. I think. Can you post an image?
Title: Re: Update
Post by: Hatonastick on 2011-Oct-31
Well it's so faded it looks completely grey, you can only just tell there is a torus in the background (on screen, not this screenshot which is awful) and the bent lines.  The white is from the white background of the GLB logo.  This is of course, not that anyone can tell, Shadows sample running on my Android tablet.  Looks pretty much the same on my phone too.  Oh, and it would be running around 5FPS or so which is a lot less than it did before.

[attachment deleted by admin]
Title: Re: Update
Post by: Kitty Hello on 2011-Oct-31
OK, new update fixes some Android errors. I can test on my HP Touchpad now and everything's running quickly. (GRABSPRITE might fail -> use Createscreen).
Title: Re: Update
Post by: Mikele on 2011-Oct-31
Quote from: Kitty Hello on 2011-Oct-31
OK, new update fixes some Android errors. I can test on my HP Touchpad now and everything's running quickly. (GRABSPRITE might fail -> use Createscreen).

Is another update online? Now I've tried to update and GLBasic Update Manager crashes just after downloading part. :\
Title: Re: Update
Post by: MrTAToad on 2011-Oct-31
Not yet it seems - I still have the latest version...
Title: Re: Update
Post by: Mikele on 2011-Oct-31
Quote from: MrTAToad on 2011-Oct-31
Not yet it seems - I still have the latest version...

Ok thanks. Hmm but now I can't update 10.118 to 10.156 anymore.
Title: Re: Update
Post by: Ian Price on 2011-Oct-31
Quote from: Mikele on 2011-Oct-31
Is another update online? Now I've tried to update and GLBasic Update Manager crashes just after downloading part. :\

Same here.
Title: Re: Update
Post by: MrTAToad on 2011-Oct-31
10.156 I thought was the latest version before this update  :S
Title: Re: Update
Post by: caffeinekid on 2011-Oct-31
I try to update and it says I'm already using the latest version. Is today's update not live yet?
Title: Re: Update
Post by: msx on 2011-Oct-31
Quote from: Ian Price on 2011-Oct-31
Quote from: Mikele on 2011-Oct-31
Is another update online? Now I've tried to update and GLBasic Update Manager crashes just after downloading part. :\

Same here.

Same here too
Title: Re: Update
Post by: Ruidesco on 2011-Oct-31
Quote from: caffeinekid on 2011-Oct-31
I try to update and it says I'm already using the latest version. Is today's update not live yet?
+1
Title: Re: Update
Post by: Crivens on 2011-Oct-31
On a side note since the last update using build-multiplatform it no longers remembers the last device for compile. I thought it was just a highlight thing but compiling doesn't work correctly.

Cheers
Title: Re: Update
Post by: Kitty Hello on 2011-Oct-31
My fault. 10.158 online now.
Title: Re: Update
Post by: msx on 2011-Oct-31
all right, now  :good:
Title: Re: Update
Post by: Hatonastick on 2011-Nov-01
Wow...  Mate it works brilliantly.  Just ran the 3D Shadows demo on it and I swear it's up around 30FPS and displays every bit (well close enough) as well as it does on my desktop.  Thanks!

What was the issue with GRABSPRITE btw?
Title: Re: Update
Post by: Mikele on 2011-Nov-01
Great! Now my all programs work on Android again! Thank you!

M.
Title: Re: Update - Oh No!
Post by: Qube on 2011-Nov-01
Gernot, since updates after 10.118 alpha is a tad broken using polyvector (2D on top of 3D) :S - It leaves funky coloured edges. If needed I can post example images of this issue but it may be a couple of days. Just wanted to bring that to your attention :)
Title: Re: Update
Post by: Qube on 2011-Nov-01
Quote
Qube, on what platform did you observe this?  On Windows I do exactly that with one of my apps.  I noticed nothing of what you describe.

Windows & iOS.

To replicate the issue (will post example when I have time) :

1.. Draw a dark yellow (or blue, red etc) circle in your favourite image editor (must be antialiased and 50% opacity)
2.. In GLB have a simple 3D skybox (darker the better)
3.. switch to 2D and using POLYVECTOR draw that circle on the screen at different random location. You'll notice that it's not perfect as pre 10.118 versions were.

LOL, having read that back it seems a little overkill to show something broken so I'll whip up an example with screen shots later :)   
Title: Re: Update
Post by: MrTAToad on 2011-Nov-01
Are you using SMOOTHSHADING ?
Title: Re: Update
Post by: Qube on 2011-Nov-01
Quote from: MrTAToad on 2011-Nov-01
Are you using SMOOTHSHADING ?

Yes :)

I'll have to whip up a simple example and post on here with screenshots of older version vs latest version of GLB. It's hard to explain and may not be easy to spot unless you've been staring at the same images for months on end which is the only reason I spotted it.
Title: Re: Update - Weird stuff going on.
Post by: Qube on 2011-Nov-01
No example code yet as I'm not posting the source for Galaxix, lol. Have a nosy at the image below taken with GLB 10.118 and the latest 10.159 (10.156 also did the same).

You have to look carefully and this is probably why it would be easily missed if it wasn't for the fact I've seen seen nothing but these images, every day for months now :S - One last buggette of 10.159 is that saveBMP appears to freak out my Windows 7 and 90% of the time crashes  :noggin:

Look closely now  =D

(http://www.galaxix.net/images/G10.1159.png)
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-02
totally strange. As if the coordinated were off by 1 pixel or so?
Title: Re: Update
Post by: Qube on 2011-Nov-02
Quote
totally strange. As if the coordinated were off by 1 pixel or so?

It is a strange one. Luckily no major show stopper or anything you'd really notice if you weren't familiar down to the pixel level, lol.

My first thought when coming across it was reading in the changelog that some changes were made to the z-buffer / RGBA? - It says for Android but?

Obviously I can't ever code in GLB again until this show stopping issue has been fixed and I shall have to post daily complaints and all that  :nana:
Title: Re: Update
Post by: Albert on 2011-Nov-06
I find a problem with the update, whenever I use strecthanim, I got a magenta outline (the transparent color) where I'm using drawanim, everything is ok.
(http://dl.dropbox.com/u/292449/img/stretchanim.png)
the sprites that walking to the right are drawn with DRAWANIM, the one with the santa-hat is drawn with STRETCHANIM, also the bucket on the top stretched with STRETCHANIM.
Title: Re: Update
Post by: ampos on 2011-Nov-06
Do not use magenta, just create them as PNGs with transparency.
Title: Re: Update
Post by: MrTAToad on 2011-Nov-06
Or use SETTRANSPARENCY
Title: Re: Update
Post by: Albert on 2011-Nov-06
PNG with transparency won't work on some reaqson (don't remember why) But I definitely remember, that this worked a few weeks ago, and now it's wrong.
Title: Re: Update
Post by: MrTAToad on 2011-Nov-06
Are you using SMOOTHSHADING ?
Title: Re: Update
Post by: erico on 2011-Nov-07
Strangely, I use drawanim and get the magenta outline too.
When smoothshading false, they go away.

Luckly I want it false, no interpolation.

Another thing is that I used grab sprite/zoomsprite to upscale 2x my screen while testing things, and probably will use something like that on final release for desktops, original res is 320x240. Even with smoothshading off, there are some antialiase going on, very little, but noticeble, no sharp blocks.
Title: Re: Update
Post by: Ruidesco on 2011-Nov-07
It's normal that you get magenta outlines if you resize something with smoothshading, because the colours of the sprite border will mix with the magenta background and create something that is not (255,0,128) therefore displayable.

If smoothshading is a must then the sprites must have a transparent background instead of a magenta one.
Title: Re: Update
Post by: erico on 2011-Nov-07
mine are png with transparencies, I don´t use the magenta way.
But an outline shows up.
Title: Re: Update
Post by: Wampus on 2011-Nov-07
I'm late to this party but I thought I'd try updating to the new version on another machine to see what the issues were. I can confirm that any sprite or polyvector operations that use textures with transparent areas have the same problem. If smoothshading is on and scaling or rotation are used then I'm seeing unusual edges. Anything other than a 1 to 1 texture mapping seems to do it. Curious.

[attachment deleted by admin]
Title: Re: Update
Post by: MrTAToad on 2011-Nov-07
Its probably due to anti-aliasing...
Title: Re: Update
Post by: Falstaff on 2011-Nov-07
I'm also noticing weirdness, with my game it's more noticeable with the fonts. I created them with the font tool, and used GIMP to turn them into transparent background pngs. Unfortunately while it looked fine in previous versions, after the update it's looking "off" somehow, around the edges of the letters. Doesn't look pretty.. I'm probably going to have to go back to the old version until something is done..
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-09
Fals
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-09
Falstaff - please send me a tiny example project that worked before, but has the red outline now.
Title: Re: Update
Post by: Minion on 2011-Nov-09
Speaking of the update, I finally got round to updateing here. Sadly, 1 feature I did love has gone AWOL :( When I click on compile for multi platform (Shift+F8) It used to pop up with the last selected platform so all I had to do is hit enter. Now it doesnt select anything and I have to use the mosue to select the platform Im compiling too. Any chance of getting it reinstated ?
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-09
Huh!? The selection should be stored. Can someone confirm this?
Title: Re: Update
Post by: Ian Price on 2011-Nov-09
I can confirm that the selection ISN'T stored. minion is indeed correct, as I noticed this too - I'm doing a lot of compiling for webOS and have to keep selecting it all the time.
Title: Re: Update
Post by: Minion on 2011-Nov-09
Quote from: Ian Price on 2011-Nov-09
I can confirm that the selection ISN'T stored. minion is indeed correct, as I noticed this too - I'm doing a lot of compiling for webOS and have to keep selecting it all the time.

That goodness its not just me....I thought I was going (more) madder than normal.
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-09
can you please attach a proejct file (.gbaP) after you selected the platform of choice and pressed "Save All" button?
It's really weird, because it works here and I didn't touch a thing.
...unless it might have problems with hidden platforms!! AH, I think I have a trace!
Title: Re: Update
Post by: ampos on 2011-Nov-09
Yes, every time you press que MULTIPLTFORM COMPILE button, the target platform is not selected.
Title: Re: Update
Post by: Crivens on 2011-Nov-10
 This doesn't happen on every computer. I reported it about a week ago before I went on holiday. My laptop has this bug but my desktop doesn't.

Cheers
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-10
fixed in next update.
Title: Re: Update
Post by: Nathan on 2011-Nov-14
Is the "image off by 1 pixel" being looked into, could it be the reason I'm having this problem, which is basically seems like some image corruption when drawing a sprite to the screen when using polyvector.  As demonstrated with the attached image.  The sprite on the left is rendered using ZOOMSPRITE, the one on the right is using POLYVECTOR, notice the corrupt around the edges.

If it isn't this problem then does anyone have any suggestions as to what it could be?



[attachment deleted by admin]
Title: Re: Update
Post by: Ian Price on 2011-Nov-14
If you are sure that your polyvector sprite co-ords are OK, have you made sure that you are using SMOOTHSHADING FALSE to turn off interpolation (smoothing)? It could be smoothing of the sprites on each side of the plane that's causing the problems.

I've not noticed this problem with any of my apps.
Title: Re: Update
Post by: Nathan on 2011-Nov-14
I tried smoothshading with TRUE and FALSE and didn't make any difference.  I think my polyvector coords are correct, but then it's always worth having it double checked.
*But* I've just tried it now and it's working, at least in this test application I've created here, in my main "game" it still gives corruption, even though, to be safe, I copy and pasted my polyvector command from here to it.  But I don't know why this test would go wrong and then 10 minutes later start working.

Code (glbasic) Select
// --------------------------------- //
// Project: polyvectorTest
// Start: Monday, November 14, 2011
// IDE Version: 10.159
// --------------------------------- //

SETCURRENTDIR("Media") // go to media files
LOADSPRITE "bomber.png", 0
GLOBAL screenWidth%
GLOBAL screenHeight%
GLOBAL x
GLOBAL y
GLOBAL mouseX
GLOBAL mouseY
GLOBAL mouseB1
GLOBAL mouseB2
GETSCREENSIZE screenWidth, screenHeight
SMOOTHSHADING TRUE

x = screenWidth
y = screenHeight / 2

WHILE x > 0
MOUSESTATE mouseX, mouseY, mouseB1, mouseB2

STARTPOLY 0, FALSE
POLYVECTOR x,      y,      0,   0, RGB(255, 255, 255)
POLYVECTOR x,      y + 16, 0,  16, RGB(255, 255, 255)
POLYVECTOR x + 16, y + 16, 16, 16, RGB(255, 255, 255)
POLYVECTOR x + 16, y,      16,  0, RGB(255, 255, 255)
ENDPOLY
DEC x, 1
ZOOMSPRITE 0, mouseX, mouseY, 1, 1
SHOWSCREEN
WEND
END


So excuse me while I hurl my PC out the window onto the street outside. :'(
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-15
attache the image, too. I'll have a look then. Something seems different with the new update and polyvector.
Title: Re: Update
Post by: Nathan on 2011-Nov-15
Okay thanks Gernot, I'm at work presently and don't have the image to hand, so I'll do it tonight if you don't mind.
Should have uploaded it to google docs or something, maybe I need to find a way of having all my stuff on a remote network which I can develop from, does anyone else do this?  Having said that, it's probably a bit cheeky to do GLB stuff during work hours.   :whistle:
Title: Re: Update
Post by: Slydog on 2011-Nov-15
I use Dropbox (http://www.dropbox.com/ (http://www.dropbox.com/) to host my project files.
They have a free 2Gb account, which is plenty for me.

What I love about Dropbox is it works by keeping a certain folder in sync with your account.
Any changes you save to this folder are synced to all computers connected to this account.
Great for groups working on a project, or sharing resources.
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-15
So... we could use dropbox for a community project? (how) does it resolve issues where 2 people changed something at the same time?
Title: Re: Update
Post by: Slydog on 2011-Nov-15
For a community project, where more than one member can update the SAME source code file, you would need a Source Control manager such as:

TortoiseHg
http://tortoisesvn.net/about.html (http://tortoisesvn.net/about.html)

This is a tool related to Tortoise, not sure what it does, but I had it bookmarked too:
http://tortoisehg.bitbucket.org/about.html (http://tortoisehg.bitbucket.org/about.html)

In theory, two people can edit the same file, and the manager will merge the two changes together as best as it can.
If you limit each person to only edit one file at a time (manual process), you don't need any of this, but can be dangerous.
Title: Re: Update
Post by: Nathan on 2011-Nov-15
Yeah we use SVN and Tortoise Shell extensively at my work for our Source Control, but not over community based projects, it's just local to us on the LAN.  The programmers who use SVN and Tortoise for the backend code use Tortoise Merge to replicate the changes through the branches, but the first time I used it, it completely buggered up my .XSL file, so I haven't used it since?!  :)
But I was more thinking of perhaps opening up my router so I could connect to it from anywhere I like, I know a couple of people who've done this, but seems dangerous to me.  Maybe a solution like GotoMyPC or something is worth looking into.

Anyway, back to the original problem, attached is the sprite image that is causing the problem above.  But I've just had a rare brainwave, basically the image displays okay when using

DEC x, 1

... but if I change it to

DEC x, 0.5

... then that's when the image corruption starts appearing.  So I don't know if this is a problem or not?  Actually I've just changed the code slightly, the image is now displayed twice again, 1 with POLYVECTOR and one with DRAWSPRITE and the DRAWSPRITE doesn't have the problem.

Code (glbasic) Select
// --------------------------------- //
// Project: polyvectorTest
// Start: Monday, November 14, 2011
// IDE Version: 10.159
// --------------------------------- //

SETCURRENTDIR("Media") // go to media files

LOADSPRITE "bomber.png", 0
GLOBAL screenWidth%
GLOBAL screenHeight%
GLOBAL x
GLOBAL y
GLOBAL x2
GLOBAL y2

GETSCREENSIZE screenWidth, screenHeight

SMOOTHSHADING FALSE

x = screenWidth
y = screenHeight / 2

x2 = screenWidth
y2 = screenHeight / 2 + 32

WHILE x > 0
STARTPOLY 0, FALSE
POLYVECTOR x,      y,      0,   0, RGB(255, 255, 255)
POLYVECTOR x,      y + 16, 0,  16, RGB(255, 255, 255)
POLYVECTOR x + 16, y + 16, 16, 16, RGB(255, 255, 255)
POLYVECTOR x + 16, y,      16,  0, RGB(255, 255, 255)
ENDPOLY
DEC x, 0.5

DRAWSPRITE 0, x2, y2
DEC x2, 0.5

SHOWSCREEN
WEND
END


[attachment deleted by admin]
Title: Re: Update
Post by: Crivens on 2011-Nov-15
I use the Box iPhone app for backing up my apps. Register from the iPhone and you get 50gb for free. Easy then to transfer and archive (on an encrypted 7z). Nicely shows a version number against each upload too.

As for shared projects I wouldn't over think things. I'm betting 99% of us here are on solo bedroom coders, possibly with an artist.

Cheers
Title: Re: Update
Post by: MrTAToad on 2011-Nov-15
The top image uses 0.5 and the bottom one uses 1.0

As you can see the top image has something odd added to it

However, SMOOTHSHADING FALSE does solve it, so its some sort of anti-alias problem...

[attachment deleted by admin]
Title: Re: Update
Post by: Nathan on 2011-Nov-16
Oh yeah, good point.  I should have RTFM because I didn't realise SMOOTHSHADING is reset after every SHOWSCREEN.
Title: Re: Update
Post by: r0ber7 on 2011-Nov-16
If you want to keep SMOOTHSHADING on, perhaps you could increase the sprite width & height so that there's a transparent border. Seems like SMOOTHSHADING in the above example takes the shading of the airplane's tail and throws it on the first pixels column.
Title: Re: Update
Post by: Crivens on 2011-Nov-16
Out of interest when it comes to sharing projects did Gernot ever implement a special encrypted gbas file so you can keep some code secret from team mates? Especially good if want to test code on other devices that you don't own yourself. Gernot mentioned it a while back but I'm not sure what happened

Cheers
Title: Re: Update
Post by: Ian Price on 2011-Nov-16
QuoteEspecially good if want to test code on other devices that you don't own yourself.
Why not just compile for that machine and pass the executable to someone else?

If you don't want someone to view the source code, then don't give it to them. Or am I missing something (I've only just got up after working night shifts, so I'm a tad braindead at the mo!).
Title: Re: Update
Post by: Nathan on 2011-Nov-16
Aren't you describing above a .GBAL file?  I'm not sure how to create one myself, but looking at the Userlibs Forum section, the first post has discussion on a GBAL and it looks like you can create a library, that you can share with people who can compile it in their own project, but cannot change it.  (Or view it)
Title: Re: Update
Post by: erico on 2011-Nov-16
I have been using drawsprite and drawanim and came into issues similar to yours (sprite related).
So far I managed to go around and solve all of them.

There is still one thing that eludes me.
I load a background into the back buffer(loadbmp) and draw things over it.

The game is 320x240 and on higher systems I wanna scale that up to the 640x480.
So I used a cheap routine to copy and paste everything just before showscreen, using grabsprite/zoomsprite.

Everything goes on scalled perfectly, smoothshading off as I want hard(core) pixels.
Except for the background, this one gets a little antialiase, even with smoothshading off.
It resoults between the smoothshading on and the off. Like smoothshading 50%.

All other elements drawn goes ok, so if you take a look at the attached img(the red arrow mark), you see that even my masks go fine, just the pure loadbmp background gets this effect. the upper part of the trunk is drawn later over the background to so cover the moving clouds, so there you can see the difference as the lower part of the background is the loadbmp.

Another thing, it seems the caanoo id for buttons changed to, I get other results now, and can read the pause button too (nice :good:)

edit: Notice I still have to use my older caanoo projects (CAANOOTEST) since creating a new project will not compile a working version for it. really strange. no problems at all for pc though...


[attachment deleted by admin]
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-16
Is that background error there with 320x240 already? I mean before the grab?
Title: Re: Update
Post by: erico on 2011-Nov-16
Let me see if I understood...

Everything is running on 320x240 and designed for that, the grab happens just before the showscreen.
Running on output to 320x240 (normal) everything is ok
Running on output to 640x480 is where it happens. Notice on this case, I start the game with SETSCREEN 640,480,0 an run with it using the 320x240 portion of it only and scalling at the end.

Like this:
Code (glbasic) Select
// SET MACHINE TYPE
GLOBAL comp
comp=1

IF comp=0
SETSCREEN 320,240,0
ENDIF
IF comp=1
SETSCREEN 640,480,0
ENDIF


And this is what I´m doing just before the showscreen:

Code (glbasic) Select
// SCALE 2X desktops

IF comp=1
GRABSPRITE 50,0,0,320,240
SMOOTHSHADING FALSE
ZOOMSPRITE 50,160,120,2,2
ENDIF

SHOWSCREEN


edit: strangely, all other sprites scaled don´t suffer this, just the background.
edit2: the LOADBMP "BKG.png" happens after the SETSCREEN command whichever resolution.
Title: Re: Update
Post by: ampos on 2011-Nov-16
grabsprite was not working on some devices. Try createscreen, just for higher resolution devices.
Title: Re: Update
Post by: erico on 2011-Nov-16
thanks ampos, I will give a try on that.

Now I understood what kitty said,
yes, the error is there before the grab and scalling.

like on the following pic

edit: strangely enough, running setscreen 320x240 on the pc gets to the same effect. down on caanoo it dosen´t happen.
So my guess it has something to do with the gfx card? and it´s on the loadbmp.

[attachment deleted by admin]
Title: Re: Update
Post by: Crivens on 2011-Nov-19
It could be gbal that I'm thinking of. The reason for not sending the executable to someone is un-jb ios devices. Gbal libraries would sort that out allowing the user to test on someone elses device without giving away code. Will have to look into when back off holiday.

Cheers
Title: Re: Update
Post by: Ian Price on 2011-Nov-19
You can still send the compiled app to non-JB iOS owners, as long as they have a Mac - they can then run the compiled app on their device. Of course with the next major update, this won't be necessary (hopefully it's sorted by then) =D
Title: Re: Update
Post by: mentalthink on 2011-Nov-21
HI I Updated the 10.179 Glbasic version, and the log file put this:

ASC has optional index parameter,

sorry, but I don´t understand... this mean we can use strings into the index array?¿, for calling some index?¿...

Thanks in advance...
Title: Re: Update
Post by: MrTAToad on 2011-Nov-21
Its for returning the ASCII value of the character of the specificied index

Instead of

Code (glbasic) Select
DEBUG ASC(MID$(test$,4,1))

You can do

Code (glbasic) Select
DEBUG ASC(test$,4)
Title: Re: Update
Post by: mentalthink on 2011-Nov-21
 :happy:

Thanks Mrtatoad  :nw:
Title: Re: Update
Post by: Qube on 2011-Nov-21
10.179 still draws wrong with polyvector (fuzzy stuff as detailed earlier)  :rant:
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-22
Yes. I had no time to check that, yet. But, can you try if it's just a matter of SMOOTHSHADING FALSE after each SHOWSCREEN?
Title: Re: Update
Post by: Qube on 2011-Nov-22
Quote from: Kitty Hello on 2011-Nov-22
Yes. I had no time to check that, yet. But, can you try if it's just a matter of SMOOTHSHADING FALSE after each SHOWSCREEN?

Unfortunately not :'( - I tried adding SMOOTHSHADING TRUE after each SHOWSCREEN plus after every X_MAKE2D and it made no difference.

It's not a big problem as I can continue to use 10.118 as that was the last version that worked perfect :) - I will start complaining when I come to putting my game onto Android  =D
Title: Re: Update
Post by: MrTAToad on 2011-Nov-22
Did you try SMOOTHSHADING FALSE too ?
Title: Re: Update
Post by: Qube on 2011-Nov-22
Quote from: MrTAToad on 2011-Nov-22
Did you try SMOOTHSHADING FALSE too ?

No, because it was originally with 10.118 & SMOOTHSHADING TRUE and it worked :nana:

*EDIT*

I added SMOOTHSHADING FALSE after each X_MAKE2D command and it works as it should do if using SMOOTHSHADING TRUE at the beginning of your App :good:

I guess this mean that SMOOTHSHADING FALSE is currently working in reverse? + after each SHOWSCREEN this is being reset?

*EDIT 2*

The above works fine for static images but rotation is not aliased.
Title: Re: Update
Post by: Ruidesco on 2011-Nov-23
SMOOTHSHADING is indeed reset to TRUE after every SHOWSCREEN or X_MAKE2D in your code.
Title: Re: Update
Post by: Qube on 2011-Nov-23
Quote from: Ruidesco on 2011-Nov-23
SMOOTHSHADING is indeed reset to TRUE after every SHOWSCREEN or X_MAKE2D in your code.

There's more going on than just a state change :S - If I use SMOOTHSHADING TRUE it will display a little fuzzy but rotate properly without jaggies.  If I set to SMOOTHSHADING FALSE then it'll display fine but then the rotation shows jaggies.

I used to set SMOOTHSHADING TRUE at the top of my code and POLYVECTOR would display and rotate perfect. After 10.118 that changed. It's like half of SMOOTHSHADING (static / rotated) works for the opposite state.

I'm sure Gernot will fix for a future update :)
Title: Re: Update
Post by: Wampus on 2011-Nov-30
*nudge*

Smoothshading problem still occuring. Been a month. Getting worried. Its kind of a big deal.
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-30
I can't reproduce it. Can you please assist?
I will make SMOOTHSHADING ALSE the default for new updates. Might draw sprites a bit quicker then, too.
Title: Re: Update
Post by: Qube on 2011-Nov-30
Quote from: Kitty Hello on 2011-Nov-30
I can't reproduce it. Can you please assist?
I will make SMOOTHSHADING ALSE the default for new updates. Might draw sprites a bit quicker then, too.

It's not just backward, it's also wrong ::) - Currently if set to FALSE it displays "better" when static but terrible for rotating. If TRUE it displays "worse" when static but better when rotating. There's definitely something wrong with it beyond being reversed.

Title: Re: Update
Post by: Kitty Hello on 2011-Nov-30
An example would be great.
Title: Re: Update
Post by: MrTAToad on 2011-Nov-30
This is what it looks like with SMOOTHSHADING FALSE and TRUE

[attachment deleted by admin]
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-30
looks right. Only the red border is wrong.
Title: Re: Update
Post by: Kitty Hello on 2011-Nov-30
It's inside your PNG!!!
Here's the RGB information for that image with alpha forced to 1.0:
(http://www.glbasic.com/pix/tn_support_3_.png) (http://www.glbasic.com/pix/_support_3_.png)

So, when you create images, please be sure to specify the transparent colour's RGB values as well. In Corel Draw that's:
(http://www.glbasic.com/pix/tnsnipping_tool_4_.png) (http://www.glbasic.com/pix/snipping_tool_4_.png)
Title: Re: Update
Post by: Wampus on 2011-Nov-30
You're totally right! Thanks so much.  :)

Photoshop sucks when it comes to this. I couldn't find any suggestions that worked when it comes to changing the background colour for transparency. I had to use the free IrfanView (http://www.irfanview.ca/) to do it. After that I saw my grey edges go away.

Cheers. How can I buy you a beer?  :booze:
Title: Re: Update
Post by: MrTAToad on 2011-Nov-30
Yes - that was the problem...  :nw:

Obviously the artist was using it as a mask, which my PhotoImpact didn't detect/cope with...

Normally I use BMP files and then convert to PNG, but I didn't this time as I had assumed they were just normal graphics...  :whistle:
Title: Re: Update
Post by: Wampus on 2011-Nov-30
Oh! But there is still a difference in how the edges are handled. Gernot, have a look at this:-

(http://i904.photobucket.com/albums/ac242/wheeethefibble/webpics/aliasing-example.jpg)

You can see that in the left image there is a black edge. The background PNG colour was set to black so that is why it is there and GLBasic is anti-aliasing to that colour. However, in the right image, which is output from GLBasic version 10.118, the edge is antialiased to transparency. The older version is more visually preferable since it blends in right angle edges with a smoother finish.

The same texture atlas was used for both images and that image had black as the background PNG colour. The only difference was the version of GLBasic used to compile.

I have attached the routine I used to get this output to this post. If you compile with difference versions of GLBasic, 10.118 and later, you should see the difference.

You see, I'm not crazy. There really was a difference :)

[attachment deleted by admin]
Title: Re: Update
Post by: MrTAToad on 2011-Nov-30
Thats odd - my Windows mine are anti-aliased to a white border.  Anti-aliasing to the transparency would be better though as most of the time you dont want borders (it usually doesn't look good).  However using ALPHAMODE -1.0 does deal with that...

By the way, anti-aliasing on my android machine decreases the FPS by half :)

[attachment deleted by admin]
Title: Re: Update
Post by: Crivens on 2011-Nov-30
QuoteYou can see that in the left image there is a black edge
Are you using DRAWSPRITE or ROTOZOOMSPRITE/STRETCHSPRITE? I noticed in the latest version DRAWSPRITE does not have a black outline (unless you give it one obviously) but ROTOZOOMSPRITE/STRETCHSPRITE does. At least on a PC.

I use PSP9, mainly because I bought it for like £10 years ago, but also because PSP8 cocks up the transparency and anything newer than PSP9 is bloatwaretastic.

Cheers
Title: Re: Update
Post by: MrTAToad on 2011-Nov-30
I think using ALPHAMODE -1.0 should sort it...

I do see that ALPMODE with a value > 0.0 works fine now :)
Title: Re: Update
Post by: Wampus on 2011-Nov-30
Quote from: MrTAToad on 2011-Nov-30
By the way, anti-aliasing on my android machine decreases the FPS by half :)

Jeez. So, turning off smoothshading would make a big performance difference for your Android device then. Hmm.

I guess its worth allowing smoothshading to be turned off by a user for a performance boost, if they needed it.

Quote from: Crivens on 2011-Nov-30
Are you using DRAWSPRITE or ROTOZOOMSPRITE/STRETCHSPRITE? I noticed in the latest version DRAWSPRITE does not have a black outline (unless you give it one obviously) but ROTOZOOMSPRITE/STRETCHSPRITE does. At least on a PC.

*nods* Anything involving rotation or stretching where the original sprite isn't a 1:1 copy of its source image will have the anti-aliasing coloured edges. It doesn't matter if its ROTOZOOMSPRITE/STRETCHSPRITE or POLYVECTOR. The same effect is visible for both.
Title: Re: Update
Post by: Crivens on 2011-Nov-30
Actually I noticed using ROTOZOOMSPRITE/STRETCHSPRITE without any changes (ie. so sprite is outputted 1:1 identical to the original) also causes a black outline.

Cheers
Title: Re: Update
Post by: MrTAToad on 2011-Nov-30
It should be noted that my  Android phone is a generic Chinese piece of rubbish - it is slow all the time :)
Title: Re: Update
Post by: ampos on 2011-Nov-30
I think the problem is really because you are using sprites with magenta as background/transparent color.

Instead, use PNGs files with alpha channel. It is easier as it sounds. There is 2 methods:

1.- If you have layers in PSD, and the background is magenta, just disable it. You will get your sprite over the checker-background. Then, save as PNG. Photoshop will merge all visible layers as a single layer with alpha mask.

2.- If you have the image yet as a single image/layer, just select menu "selection/mask" (sorry, my PS is in spanish) -> color range -> tolerance 0 -> pick on magenta color -> OK. Then, reverse mask (mask -> reverse). Now, layer -> new layer -> using copy.  You will end with a new layer that has your picture. Disable the background layer and save as png.

The best is the first method, as you have the borders aliased  and the layer effects (as shadows) are saves also as part of the image. Also, you can have different parts of your image as semi-transparents, that is great with alphamode -1.

Here is a sample image I have.

This works great with font pngs, as you can have your fonts with real smooths borders.




[attachment deleted by admin]
Title: Re: Update
Post by: Wampus on 2011-Nov-30
Nope Ampos, not in this case. The sprite background was black. I drew a magenta rectangle as a background as a test to see if the edge colour would blend. It didn't. Check the code and see the difference from GLBasic version 10.118 and upwards.
Title: Re: Update
Post by: MrTAToad on 2011-Dec-01
This is a blow-up from your test program - as far as I can see it is alpha blending to transparency.

[attachment deleted by admin]
Title: Re: Update
Post by: Wampus on 2011-Dec-01
No, there is a white/grey outline. It is not anti-aliasing to transparency. Look carefully.

When the DRAWSPRITE (or similar) functions are being used there is a white/grey outline because I didn't change the background alpha colour to black with the images used for that. The POLYSPRITE textureatlas has a black outline.
Title: Re: Update
Post by: Qube on 2011-Dec-01
Here you go, a working of example of the issue in action (download the two attached files and place them in the same folder as the code).

If you look carefully you will see the outline of the sprite is not right as it rotates (the square part gets lighted edges). When it passes the rotating cube you can see the effect get better and worse. Setting smoothshading to false will correct this but bring in jaggies.

If you run this on 10.118 it will run perfect. Run it on a version greater than 10.118 and it is not.

Code (glbasic) Select

SETSCREEN 1024,768,1
CLEARSCREEN -1

LOADBMP "../background.png"
LOADSPRITE "../testSprite.png", 1
CreateCube(2, 30, RGB(200,200,0))

LOCAL phi% = 0
LOCAL x#, y#, z%, sx#, sy#, sz#
LOCAL sx1#, sx2#, sx3#, sy1#, sy2#, sy3#, sw%, sh%
LOCAL x1%, y1%, x2%, y2%, x3%, y3%, x4%, y4%, xcos#, ysin#

x = 0
y = 768 / 2
sw = 32
sh = 32

WHILE TRUE
X_MAKE3D 1, 2500, 45
X_CAMERA 0,0,120, 0,0,0
X_CULLMODE 1
X_AMBIENT_LT 0, RGB(255,255,255)
X_SPOT_LT 1, RGB(80,80,80), 0, 1, -1, 0, -1, 1, 180

X_MOVEMENT 0, 0, 0
X_ROTATION phi, 0, 1, 1
X_DRAWOBJ 2, 0

INC phi,1

X_MAKE2D
SMOOTHSHADING TRUE
ALPHAMODE -1.0
DRAWSPRITE 1, 50, 50

INC x, .5
IF x > 1023 THEN x = 0

STARTPOLY 1, 2
x1 = x
y1 = y
x2 = x
y2 = (y + sh)
x3 = (x + sw)
y3 = y
x4 = (x + sw)
y4 = (y + sh)

xcos = COS(phi / 4)
ysin = SIN(phi / 4)

x1 = x - xcos * sw - ysin * sh
y1 = y - xcos * sh + ysin * sw

x2 = x - xcos * sw + ysin * sh
y2 = y + xcos * sh + ysin * sw

x3 = x + xcos * sw - ysin * sh
y3 = y - xcos * sh - ysin * sw

x4 = x + xcos * sw + ysin * sh
y4 = y + xcos * sh - ysin * sw

POLYVECTOR x1, y1, 0, 0
POLYVECTOR x2, y2, 0, 0 + 64
POLYVECTOR x3, y3, 0 + 64, 0
POLYVECTOR x4, y4, 0 + 64, 0 + 64
POLYNEWSTRIP
ENDPOLY

SHOWSCREEN
WEND

FUNCTION CreateCube: num, sz, col
X_AUTONORMALS 1
sz = sz / 2

X_OBJSTART num
// Front Face
X_OBJADDVERTEX  sz, -sz,  sz, 1, 0, col
X_OBJADDVERTEX -sz, -sz,  sz, 0, 0, col
X_OBJADDVERTEX  sz,  sz,  sz, 1, 1, col
X_OBJADDVERTEX -sz,  sz,  sz, 0, 1, col
X_OBJNEWGROUP
// Back Face
X_OBJADDVERTEX -sz,  sz, -sz, 1, 1, col
X_OBJADDVERTEX -sz, -sz, -sz, 1, 0, col
X_OBJADDVERTEX  sz,  sz, -sz, 0, 1, col
X_OBJADDVERTEX  sz, -sz, -sz, 0, 0, col
X_OBJNEWGROUP
// Top Face
X_OBJADDVERTEX -sz,  sz,  sz, 0, 0, col
X_OBJADDVERTEX -sz,  sz, -sz, 0, 1, col
X_OBJADDVERTEX  sz,  sz,  sz, 1, 0, col
X_OBJADDVERTEX  sz,  sz, -sz, 1, 1, col
X_OBJNEWGROUP
// Bottom Face
X_OBJADDVERTEX  sz, -sz, -sz, 0, 1, col
X_OBJADDVERTEX -sz, -sz, -sz, 1, 1, col
X_OBJADDVERTEX  sz, -sz,  sz, 0, 0, col
X_OBJADDVERTEX -sz, -sz,  sz, 1, 0, col
X_OBJNEWGROUP
// Right face
X_OBJADDVERTEX  sz,  sz, -sz, 1, 1, col
X_OBJADDVERTEX  sz, -sz, -sz, 1, 0, col
X_OBJADDVERTEX  sz,  sz,  sz, 0, 1, col
X_OBJADDVERTEX  sz, -sz,  sz, 0, 0, col
X_OBJNEWGROUP
// Left Face
X_OBJADDVERTEX -sz, -sz,  sz, 1, 0, col
X_OBJADDVERTEX -sz, -sz, -sz, 0, 0, col
X_OBJADDVERTEX -sz,  sz,  sz, 1, 1, col
X_OBJADDVERTEX -sz,  sz, -sz, 0, 1, col
X_OBJNEWGROUP
X_OBJEND
ENDFUNCTION


[attachment deleted by admin]
Title: Re: Update
Post by: kanonet on 2011-Dec-01
Code (glbasic) Select
//    ASC hat optionalen Index Parameter.
I like this feature! But would it be possible to allow an Index of -1 to access the last char?
Title: Re: Update
Post by: Zapp on 2011-Dec-01
I've never encountered any issues with Sprites and Borders, but then I've not tried to do anything with coloured transparent layers either.

In my code after the background static layer is drawn i set the Alphamode to -1

All my sprites with Transparencies are made in layered PSD files in photoshop. I've always performed the following steps to create PNG files:

Select the layer with the sprite to save out, hide ALL other layers so the background is checkered.
File Menu : "Save for Web & Devices"
In the Window top right options: Preset - PNG-24
Sub Option: Transparency (Ticked)

Then hit save.

you can play around with the bicubic & bilinear settings if you want, but really with Alphamode set to -1 BEFORE you draw transparent sprites for each frame it should work just fine... Not had any issues with the limited Zoomsprite experience so far either.

Give that a try and let me know if you have any problems and where they occurred and I will try to assist.

-Zapp
Title: Re: Update
Post by: Kitty Hello on 2011-Dec-01
@Qube again, I think it's the background RGB of the alpha part of the image.
See attached image.

I have no idea why the old version was different here. I read all the code but found no difference :(



[attachment deleted by admin]
Title: Re: Update
Post by: Crivens on 2011-Dec-01
Yeah, try different paint packages. I ditched purple a long time ago because it was glitchy then I found PSP8 was having problems with the alpha channel too. Since switching to PSP9 and a decent icon package (I forget the name) alphas work brilliantly (when combined with ALPHAMODE -1).

Gernot, any thoughts on allowing us to be able to set the default ALPHAMODE value (which is reset a lot by different commands)? We mentioned it a while back but I don't think anything happened.

Cheers
Title: Re: Update
Post by: Kitty Hello on 2011-Dec-01
The new update sets alphamode only on showscreen.
Title: Re: Update
Post by: Crivens on 2011-Dec-01
But does it set it back to zero? And it is now 100% certain that once you set to -1 it will only reset to 0 on a showscreen? So we can without no worries put -1 at the start of the game loop, or possibly just after the showscreen?

Cheers
Title: Re: Update
Post by: Kitty Hello on 2011-Dec-01
That's the plan, yes.
Title: Re: Update
Post by: Qube on 2011-Dec-01
Quote from: Kitty Hello on 2011-Dec-01
@Qube again, I think it's the background RGB of the alpha part of the image.
See attached image.

I have no idea why the old version was different here. I read all the code but found no difference :(

All you've done is taken out the alpha'd edging and made it flat. You can see when it rotates that it now looks jaggy.

I made that sprite exactly like that to demo the issue. I can't say it any simpler than "It's all worked with 10.118"

OK, let's put this into simple terms :

With 10.118 AND previous version my example works perfect.. Versions above 10.118 since the Android RGB stuff do not work! - ergo, SOMETHING has changed and broken :S - Many sprites have alpha'd edges and taking these out results in hard edges, not good.

Gernot, you have to understand that the example worked perfectly and 100% as it should in version 10.118 and previous. What ever happened after 10.118 has broken something and it's not just a state change on the smoothshading command  :'(

Quote from: Crivens on 2011-Dec-01
Yeah, try different paint packages.

I use Photoshop and have done for years without issue. Also without issue from GLB 7 to 10.118.
Title: Re: Update
Post by: Kitty Hello on 2011-Dec-01
OK, I'll have another go. Maybe I enabled alpha testing .. or disabled it.
Can you compile the example with V10.118 and post it here for me to test? So I can see the differnce?
Title: Re: Update
Post by: MrTAToad on 2011-Dec-01
This is what its like with 118 and 179

[attachment deleted by admin]
Title: Re: Update
Post by: Qube on 2011-Dec-01
Thanks for doing the visuals MrTAToad.

As requested, here are the two exe's to match. SS10.118 (all ok) SS10.179 (not so).

Good luck Gernot, hope it's a super easy fix :)

*edit* these are just the exe files - the images are from this post (http://www.glbasic.com/forum/index.php?topic=6671.msg60789#msg60789)

[attachment deleted by admin]
Title: Re: Update
Post by: Qube on 2011-Dec-03
GLB 10.191 no fixy alpha issue  :'( - The new ALPHATESTING command doesn't help unfortunately it just ables you to knock out pixels :S

In order for sprite to show smooth and rotate smooth we need the full alpha to be used, not removed. Have you any idea what changed from 10.118 onwards to mess up alpha?
Title: Re: Update
Post by: MrTAToad on 2011-Dec-03
It should be noted that it only happens when the sprite overlays a 3D object - without the 3D object its okay...

I have also tried a different shape, and that too renders the 3D part as part of the anti-aliasing.

[attachment deleted by admin]
Title: Re: Update
Post by: Wampus on 2011-Dec-03
Qube, this was said before: -

Quote from: Kitty Hello on 2011-Dec-01
I have no idea why the old version was different here. I read all the code but found no difference :(

MrTAToad, I'm not sure what you mean. Do you have an example screenshot? As far as I can see the same fuzzy border thing impacts v10.191 and it doesn't matter what the sprite is drawn over, background or 3D object. The only time it would look perfect anti-aliased would be if the edge of the sprite's alphablending had the same RGB value as the background.

edit: The screenshot of the red object over the yellow cube shows the same anti-aliasing errors, no?
Title: Re: Update
Post by: MrTAToad on 2011-Dec-03
Thats right, it does.

But over a non 3D object, anti-aliasing is okay (discounting the extra anti-aliasing that Paint introduces).

[attachment deleted by admin]
Title: Re: Update
Post by: Qube on 2011-Dec-03
Quote from: MrTAToad on 2011-Dec-03
But over a non 3D object, anti-aliasing is okay (discounting the extra anti-aliasing that Paint introduces)..

Sorry, even with 10.191 and using the files I provided in my original post alpha is still wrong in plain 2D (no overlapping of 3D) :rant:

Using the example I posted with the original files, here's the result.

Here's 10.118 - Perfect

(http://www.syntaxbomb.com/images/Shot10.118.png)

Here's 10.191 - Duff

(http://www.syntaxbomb.com/images/Shot10.191.png)
Title: Re: Update
Post by: Wampus on 2011-Dec-03
My anti-aliasing is not okay. Example:-



[attachment deleted by admin]
Title: Re: Update
Post by: MrTAToad on 2011-Dec-03
Do you have anti-aliasing active in your graphic drivers control panel ?  I wouldn't be surprised if its caused by some setting there
Title: Re: Update
Post by: Qube on 2011-Dec-03
Quote from: MrTAToad on 2011-Dec-03
Do you have anti-aliasing active in your graphic drivers control panel ?

I do not, no. The messed up alpha shows up on the iPad too.
Title: Re: Update
Post by: MrTAToad on 2011-Dec-03
I have mine on - although I did try with it all off, but got more or less the same thing.

Dont know why yours is different to mine.  But if it does the same on the iPad then obviously its not just a Windows problem.
Title: Re: Update
Post by: Qube on 2011-Dec-03
Quote from: MrTAToad on 2011-Dec-03
I have mine on - although I did try with it all off, but got more or less the same thing.

Dont know why yours is different to mine.

Dunno, strange. Are you using my original test sprite or the one Gernot jiggled?. I see that setting smooth shading to false still fixes this issue but rotation naturally shows jaggies. So annoying  :P
Title: Re: Update
Post by: Wampus on 2011-Dec-03
I'm sure its not 3D card settings. The same thing happens on my Android, my iOS device and my other computers too. If I change GLBasic versions to 10.118 it doesn't happen, on any of those devices/computers. Settings like this on my graphics card can create a smoother look but the anti-aliasing to transparency still isn't happening in GLBasic:-

[attachment deleted by admin]
Title: Re: Update
Post by: MrTAToad on 2011-Dec-03
Ah yes, I was using Gernot's one rather than yours, which would it a bit...

Wonder if the glBlendEquation/glBlendFunc value has been changed

[attachment deleted by admin]
Title: Re: Update
Post by: Kitty Hello on 2011-Dec-05
I cant find any differences. I even dumped the opengl calls formthe old version.
With alphatesting 0.5 or even 0.7 the image should scale nicely thought. Did you try ma examlemwith alphatesting?
Title: Re: Update
Post by: Qube on 2011-Dec-05
Quote from: Kitty Hello on 2011-Dec-05
With alphatesting 0.5 or even 0.7 the image should scale nicely thought. Did you try ma examlemwith alphatesting?

I have tried alphatesting settings and it just knocks out alpha'd pixels. This is not the answer as you *need* the full alpha information as-is in the PNG file especially when using ALPHAMODE 1 to blend the nebula effects. Knocking out alpha info on those along causes a right mess.

Quote from: Kitty Hello on 2011-Dec-05
I cant find any differences. I even dumped the opengl calls formthe old version.

Try harder  :whip:  :nana:

Title: Re: Update
Post by: Wampus on 2011-Dec-05
Hmm. Maybe its not OpenGL at all. Maybe something has changed with the loading of sprites. Could that be a possibility?

Just in case it is that I'm going to run a little test to get 10.118 to save sprite information using SPRITE2MEM. Then I can read the data back using MEM2SPRITE in the most recent GLBasic update and see if the same problems occurs. I'll post the code and the results here as soon as I'm done.
Title: Re: Update
Post by: Wampus on 2011-Dec-05
Darn. There seems to be a bug with 10.118 when it comes to SPRITE2MEM that was consequently fixed. All sorts of nasty is happening when I use it om 10.118. I know it worked in older versions because sample code I have from back in version 8. The trouble is I can't find a download of an older version (8, ideally) and I've deleted my back ups of the old installers. Anyone know where I can get one?

EDIT: Its ok, I found one.

EDIT AGAIN: I don't think its the loading of sprites anyway since data saved in version 10.191 works fine when loaded into 10.118 via MEM2SPRITE.
Title: Re: Update
Post by: Wampus on 2011-Dec-05
SUCCESS!  :happy:  After testing I found that the loading of sprites is definitely not the problem. I was going to post the code but then I started a new test. What I found finally tracked down the underlying issue. I far as I'm concerned the antialiasing issue is finished with now and there was nothing wrong with GLBasic.

Thanks for trying to fix this Kitty. Whatever changed between 10.118 and later versions I don't think it matters. It seems 10.118 was alpha blending edges of sprites with a dark blue instead of white and that was the big difference. I know to some that might sound like it simply can't be all it was. Well, the attached code to this post demonstrates what I said is the case without doubt. Compile it in 10.118 and later and you will see for yourself.

What the attached code does is display 4 scaled sprites in turn with SMOOTHSHADING turned off and on for demonstration purposes. The first two sprites, box32A and box32B, show weird blue borders in 10.118 and white borders in versions beyond 10.118. The second two sprites, box32C and box32D, have RGB values as well as a little alpha value added to the empty areas around the edges of the sprites. The result is that they work perfectly in 10.118 and later versions.

Basically, to fix this you must create sprites to take into account that OpenGL wants to know what colour empty spaces around sprites should be. I don't know why it wants to know that, but it does. If you really want to have sprites scale or rotate with perfect alphablending at the edges then you have to make sure the pixels around the edges of your sprites have alpha channel information and an RGB value that would blend nicely. This goes for 10.118 as well as later updates. It works 100% in all alpha modes and with any kind of sprite. No problems occur and there is no need for the ALPHATESTING command.

A quick way to make the fix in Photoshop is to make a copy of your sprite and put this copy in the layer below your sprite. Next, apply a Gaussian Blur of 1.1 pixels to the copied sprite layer. Finally, reduce the opacity of the copied sprite layer to 1% (making it virtually invisible but retaining the blurred colour information. Save this as a PNG file and your alpha blending will work.

Please note that its a good practice to include an empty border of 2 pixels, 1 at the least, around each sprite if you're using a textureatlas. If you've done this then the above method will not cause any colour clashes with transparency of other sprites if applied to the entire textureatlas.

I know that is all probably clear as mud. If people feel they could benefit from it I could find time to create a short tutorial at some point, but that won't be before sometime next week because I am crazy busy.

[attachment deleted by admin]
Title: Re: Update
Post by: fuzzy70 on 2011-Dec-05
Nice one Wampus  :nw:

I have no idea what a textureatlas is but I understood the rest of it (am still playing with other things in GLB at the moment) :D

Lee
Title: Re: Update
Post by: Ruidesco on 2011-Dec-06
It's basically a big graphics file where you include a whole sprite set, instead of having them in separate smaller files.
A quick simile would be having the current standard GLBasic bitmap font file where every character is there, versus having each character in their own file.
Title: Re: Update
Post by: fuzzy70 on 2011-Dec-06
Quote from: Ruidesco on 2011-Dec-06
It's basically a big graphics file where you include a whole sprite set, instead of having them in separate smaller files.

Basically what I know as a "Sprite Sheet". I get it now, just never heard of it called a textureatlas before  :noggin:

Lee
Title: Re: Update
Post by: Qube on 2011-Dec-06
Excellent find, Wampus  :good:

Quote
A quick way to make the fix in Photoshop is to make a copy of your sprite and put this copy in the layer below your sprite. Next, apply a Gaussian Blur of 1.1 pixels to the copied sprite layer. Finally, reduce the opacity of the copied sprite layer to 1% (making it virtually invisible but retaining the blurred colour information. Save this as a PNG file and your alpha blending will work.

I've hundreds of layers in my games spritesheet :S... So, in photoshop I added a solid black layer as my background, set opacity to 1%, save the spritesheet as a PNG and it worked like a charm. Result :enc:

Once, more, excellent find  :booze:
Title: Re: Update
Post by: bigsofty on 2011-Dec-06
Maybe an OpenGL "GL_CLAMP_TO_EDGE" could help here? Just an idea.
Title: Re: Update
Post by: Kitty Hello on 2011-Dec-06
Clamp wont help fro atlases since there's not neccessarily an edge. 

Eampus, thank you so much. IOU1. 

I start to remember that older versions had black ( blue seems a bug;) ) for transparent pixels. But thats bad if you want to blend over white space. I'm using the Sprites rgb now. For images with cookie color I calculate a mix of the surrounding opaque pixels. 
Title: Re: Update
Post by: bigsofty on 2011-Dec-06
Quote from: Kitty Hello on 2011-Dec-06
Clamp wont help fro atlases since there's not neccessarily an edge. 

Oops, I miss-read, I assumed that people were using atlases as a fix for a single sprite image file.
Title: Re: Update
Post by: erico on 2011-Dec-06
Quote from: fuzzy70 on 2011-Dec-06
I get it now, just never heard of it called a textureatlas before  :noggin:
Lee

I guess this name (texture atlas)comes from 3d, I remember it first appeared when dealing with uv maps , It got stronger when people started using 3d engines to display 2d games. This, of course , is a wild guess out of personal knowledge...I could be wrong :whistle:
Title: Re: Update
Post by: Crivens on 2011-Dec-06
Nah never heard of it before. Always spritesheets. Still new words come along all the time. Textureatlas sounds pretty fancy though (like an American saying Titanium).

Luckily TLAs (Three Letter Acronyms) haven't taken off here. At work they have always gone nuts over them. I remember years ago consulting on, designing, quoting, programming, delivering, training, and supporting something I personally thought of and named "Tour performance report", and 2 months later I had to stop a customer in a meeting because I didn't know what the hell they were on about when they constantly referred to the TPR in a load of system diagrams. Little f**kers... ;)

Cheers
Title: Re: Update
Post by: fuzzy70 on 2011-Dec-06
To me these sound descriptive of what they are for

Sprite Sheet, Sprite Strip, Texture, Texture Map

However Textureatlas is not so clear & basically sounds poo to me, also to close to Texture Map especially seeing as Atlas is a form of Map.

Lee
Title: Re: Update
Post by: erico on 2011-Dec-06
sounds poo to me too.

texture atlas I guess came from the atlas UV projection, similar to sphere projection.
This uv was quite famous some time ago(2000) as it was one of the only automatic UV mapping technic available.
Atlas type textures are also used for light probe/projection, and skydomes.(this is different though, the image is distorted)

I remember 2d games done on 3d engines, the sprites were kept on textures and you would use 3d planes to display them.
At some point, using a single image with all related sprites and uv coordinate them into polygons came up, similar to polivectors.

Someone probably got this confused as "texture" means an image in 3d and sprite means an image too in 2d. but you don´t see people talking sprites into 3d unless they mean 2d sprites like particles.

So yah, probably someone got this all confused and end up with texture atlas, which for me, means the image you are going to apply on 3d as an atlas projection.
I guess the standard is sprite sheet and it contains players and objects images.
Now your set of backgrounds are images but are not usually a sprite sheet...although you could get your backgrounds into a sprite sheet... :P

Having been using these terms for so long, I never actually stopped to think of them. There is plenty to be confused.

Worst/funniest of all, are people from publicity agencies, who never had any experience with such but insist on using unknown terms on the most absurd of conditions. I guess they think using jargons like that make them look like they are working or they are wise or something. I usually hear so much absurd from them, Crivens you wouldn´t believe.

But the worst of all, you can´t laugh, people get offended :S

ps:. new terms are invented everyday, I could be wrong
Title: Re: Update
Post by: Crivens on 2011-Dec-06
I know what you mean. I've been a working professional programmer for nearly two decades now and the amount of stupid phrases is amazing. I just let it go over my head now.

It's always excellent to stop a customer in the middle of a meeting and bring them down to simple phrases and the like. It's almost shocking how easy and quick things go once you cut out the rubbish and talk in simple terms.

Now off to brush up on the new concepts that PCI has moved the goalposts on CCA, where my tokenised API is now being replaced by the CCA itself which is being replaced so that the 3DS system is external to the CCA and to the IBM FE and BE. Which is a shame as I only just got used to using the damn SML for logging purposes. Still at least my MD5 and TDes PCI password routines were implemented and the non-MD5 TF degraded as the AES. Heh, I didn't make any of that up either :)

Cheers
Title: Re: Update
Post by: Wampus on 2011-Dec-06
What about calling these things a Texture Mapped Sprite Atlas Sheet Strip? There, now everyone will know what is being referred to; its a TMSASS.
Title: Re: Update
Post by: fuzzy70 on 2011-Dec-06
Quote from: Wampus on 2011-Dec-06
What about calling these things a Texture Mapped Sprite Atlas Sheet Strip? There, now everyone will know what is being referred to; its a TMSASS.

:booze:
Title: Re: Update
Post by: erico on 2011-Dec-06
 :D
Title: Re: Update
Post by: MrTAToad on 2011-Dec-06
At least the riddle has now been solved :)
Title: Re: Update
Post by: Ian Price on 2011-Dec-06
I like your new avatar MrT :)
Title: Re: Update
Post by: MrTAToad on 2011-Dec-06
Thanks!  No idea where I got it from - but it came with a load of Linux logos too...
Title: Re: Update
Post by: Nobiag on 2011-Dec-10
so it will never be like before?
that photoshop workaround doesn't work for me. can i get an old glbasic version anywhere?
Title: Re: Update
Post by: Kitty Hello on 2011-Dec-10
Don't rely on a buggy version. You'll soon regret it. Fix your images and code.
Title: Re: Update
Post by: Nobiag on 2011-Dec-10
i tried to fix it, but it still looks different. or maybe i didn't understand this fix as it was supposed to. i almost always use sprites with a small border of halftransparent pixels anyway, but i still tried that thing with another layer and blur and 1% opacity in photoshop. it didn't help.
Title: Re: Update
Post by: Nobiag on 2011-Dec-11
i attached two pictures to show what i mean. the first one shows how it looked like before the update and the other one after.

on the play button i tried the photoshop fix. i copied it, pasted it in the layer below, used gaussian blur, set the opacity to 1% and saved it again. but as you can see, there is a shadow-like border around the button anyway. i use effects like this a lot.
in the newest version i can't get a smooth transition like in the older picture anymore and i tried everything code-related like smoothshading and alphamode as well as the photoshop thing.
this sprite is not scaled or rotated, but this definitely changed with the same update.

[attachment deleted by admin]
Title: Re: Update
Post by: Kitty Hello on 2011-Dec-11
try disabling alpha-testing here. (ALPHATESTING 1, IIRC)
Title: Re: Update
Post by: Nobiag on 2011-Dec-11
oh ooops... i missed that command. thank you, i think everything works fine for me now...  :whistle:
Title: Re: Update
Post by: Wampus on 2011-Dec-12
The problem with the method I first described is that it doesn't work so well for the outline of images which have a low alpha to begin with. Setting the opacity to 1% of a layer which is already very transparent can result in the colour becoming too faint to register in the final PNG. Its a peril of digital data.

So, there isn't really a catch-all way of ensuring the outline colour is correctly set. In many instances a bit of photo editing kung-fu is required for the perfect look.
Title: Re: Update
Post by: erico on 2011-Dec-12
Quote from: Wampus on 2011-Dec-12
So, there isn't really a catch-all way of ensuring the outline colour is correctly set. In many instances a bit of photo editing kung-fu is required for the perfect look.

kung fu photoshop hehe great. We have done a few playboy´s magazine around here other than products and so on.
You would not imagine how much kung fu is needed, specially to match what is to be a ´standard´ look of products(human or object) these days.

Once I was working on a playboy job and my father saw the raw images....he screamed in agony hehe :noggin:
Title: Re: Update
Post by: Ian Price on 2011-Dec-12
Quote from: erico on 2011-Dec-12
Quote from: Wampus on 2011-Dec-12
So, there isn't really a catch-all way of ensuring the outline colour is correctly set. In many instances a bit of photo editing kung-fu is required for the perfect look.

kung fu photoshop hehe great. We have done a few playboy´s magazine around here other than products and so on.
You would not imagine how much kung fu is needed, specially to match what is to be a ´standard´ look of products(human or object) these days.

Once I was working on a playboy job and my father saw the raw images....he screamed in agony hehe :noggin:
You lucky, lucky man. =D
Title: Re: Update
Post by: ampos on 2011-Dec-13
Really it is "Kung FutoShop"

I use it daily, 9 hours per day, with people.
Title: Re: Update
Post by: erico on 2011-Dec-13
Quote from: Ian Price on 2011-Dec-12
You lucky, lucky man. =D
Oh no, not quite....
...but welcome to peace and love inc! :S