Semi-transparency not working?
I've created a new MMF2 project file today with the Java Runtime Beta, and there are active objects which have semi-transparency that changes over time. When I run the MFA in MMF2, it works perfectly. When I compile the JAR, every object has no transparency (i.e. fully visible) from the start.
Why is this?
Re: Semi-transparency not working?
Francois mentioned something in another thread.
It was either
1 - He needed to work on it and try some other ideas
or
2 - Java doesn't support this so he was not sure if he could do anything about it
I can't remember but you might dig thru old threads to find out.
Re: Semi-transparency not working?
If anyone's interested, here's the MFA. You'll need 7-Zip to open it:
http://outlawstar.co.uk/files/placeholder_clickteam.7z
I won't be hosting it for much more than a day, so grab it while you can if you want to try and figure this out. I'll search Francois's posts now to see if I can find what Jeff mentioned.
Re: Semi-transparency not working?
Found it.
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=68828&#Post6882 8
Now I'm going to have to figure out the best way to change the alpha values. Never done it before in MMF2.
Edit: Odd, that link won't work anymore. Try this one. http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Board=60&Number=68828& Searchpage=1&Main=9902&Words=transparency+Francois &topic=0&Search=true#Post68828
Re: Semi-transparency not working?
Okay, I can do it with the alpha channel object, but that isn't supported. :( (I can set the global opacity with it.) So basically, what I'm trying to do is impossible with java?
Re: Semi-transparency not working?
The question would be is the alpha channel object not yet converted or does Java itself have restrictions on this?
You must remember objects are still being converted as we speak.
Java is not yet finished so the final feature set is not set.
If an extension can be converted it will be converted.
If Java doesn't allow something then we are stuck, not sure if we can do something about it.
Hopefully it can be converted but I don't have any idea if Java support semi-transparency or not.
Re: Semi-transparency not working?
It supports alpha channels, so yes, it does support semi-transparency. I think ink effects were disabled because Java doesn't support the ink effects that aren't related to transparency. (e.g. XOR, AND, inverse.) If you want confirmation that Java supports alpha channels, I'm sure you've already seen this Java applet made with MMF2: http://www.phaedra-passwords.com/
I guess for now I'll have to use Flash for my website, as much as I dislike it. :(
Re: Semi-transparency not working?
Regular active objects support alpha channels..
Re: Semi-transparency not working?
Aha! Set Alpha Blending coefficient. Sorry, I didn't see that. Oh well, I used Flash in the end anyway. The jar was 750KB~ as opposed to the 248KB SWF I made. I redid it in flash if you look at www.outlawstar.co.uk.
Sadly, that's the real letdown about Java. I know Clickteam can't help it, but other than games, I think I'll have to use Flash as the runtime is just too large.
Re: Semi-transparency not working?
I set semitransparency in PNG graphics, imported them in MMF2 and works fine with java.
Shaun, the small footprint of Flash is because of the Vector graphics. If you use Flash using only bitmap graphics too, it takes much more. Flash has its own downsides, animating many objects with gradients is also a hell for slow machines.
MMF2-Java is surprisingly small and ultra fast considering that it is like a runtime running inside a runtime! Its a work of pure art to achieve that, dude.
Re: Semi-transparency not working?
Quote:
Originally Posted by Shaun
You might want to add a note to that saying that Outlaw Star is copyright of whoever it is, because I doubt this is an official website :)
I'm a fan of Outlaw Star myself, and I don't want to see you issued with a takedown notice.
Re: Semi-transparency not working?
The footprint of flahs is so small because the flash runtime is installed on the machines. Whereas the Java runtime is included in the Jar.
Re: Semi-transparency not working?
Quote:
Originally Posted by Dynasoft
Quote:
Originally Posted by Shaun
You might want to add a note to that saying that Outlaw Star is copyright of whoever it is, because I doubt this is an official website :)
I'm a fan of Outlaw Star myself, and I don't want to see you issued with a takedown notice.
Yes, I should have probably done that by now, though it's only been up for a day or so. Thanks for the tip - I'll get round to that now.
Also, regarding Jamie's mention of creating alpha in active objects, I think that requires creating a separate alpha frame which will take up much more memory. It would be better if the Java Runtime could create this frame itself in real-time, though correct me if I'm off track here.
Don't get me wrong - I love MMF2 Java. It's just that 750KB~ is rather large for an "under construction" page as opposed to 240KB~, and there's also the fact that Flash has more attention than it deserves and is thus installed on most machines, whereas Java is not. I'll use Java for other purposes, no questions asked. I appreciate all of the effort Yves and Francois have put into it.
Off-topic: Though, is there any news regarding the mobile java support?
Edit: Sigh, it seems my hosts are playing around with me again and the pages have been replaced with advertisements. If this happens again I'm jumping ship. Update: It was a problem with the nameservers. It should be resolved soon.
Re: Semi-transparency not working?
I saw this "rumor" over at TDC about Java mobile
http://www.create-games.com/newspage.asp?id=3016
Re: Semi-transparency not working?
Holy cow. That's fantastic if it's genuine. Thanks for posting. :)
Re: Semi-transparency not working?
Well the blackberry in the picture sure looks like the one thats on my desk :)
and no I didn't send these to TDC - its a mystery how they got them.
Re: Semi-transparency not working?
Would you give any little details? Such as the average frame rate. (Don't expect too much as it's Java.) Also, what audio formats will the mobile Java runtime support? MIDI and WAV, I'm guessing.
Re: Semi-transparency not working?
It supports WAV (8khz, mono) and MIDI.
The frame rate depends on the phone, but it usually is not too bad. And with timer based movements, the games run fine.
Re: Semi-transparency not working?
Last but not least, probably a question without an answer - will we see the mobile runtime this year?
Re: Semi-transparency not working?
Quote:
Originally Posted by Shaun
Last but not least, probably a question without an answer - will we see the mobile runtime this year?
Very good question and one I, and most likely a large portion of forum members, are eagerly waiting for a response on. This is especially fantastic to me, because I had no idea that the Mobile Java runtime was being worked on, because my understanding was that it would be started after the Blu-Ray runtime was finished, which wouldn't be for a while. So this came as a total shock to me because not only is the Mobile Java runtime being worked on, it is actually functioning, and quite well from what I can read. This is very interesting indeed.
Re: Semi-transparency not working?