Originally Posted by Snerlin - taco advocate Java is slow. Use C++.
Java has the advantage of being runnable in a web browser. (you could compile the game as a plug-in BUT using a virtual machine like Java does is much safer for the end user)
Speed is not really an issue. C++ is faster than Java, but either one is much faster than MMF.
- Ok, you must admit that was the most creative cussing this site have ever seen -
"Java is now nearly equal to (or faster than) C++ on low-level and numeric benchmarks."
Yes, it is fast in simple computations, but when you get to graphical programming it's really slow. I've had first hand experience with this in one of my labs. We had to make a GUI with a background image and a simple bus moving across the screen(made of a bunch of ellipses and rectangles). It could go no faster than 1 fps! I tried lowering the timer delay to 20/100 seconds but there was no change.
Originally Posted by Snerlin - taco advocate Yes, it is fast in simple computations, but when you get to graphical programming it's really slow. I've had first hand experience with this in one of my labs. We had to make a GUI with a background image and a simple bus moving across the screen(made of a bunch of ellipses and rectangles). It could go no faster than 1 fps! I tried lowering the timer delay to 20/100 seconds but there was no change.
Key question: When?
- Ok, you must admit that was the most creative cussing this site have ever seen -
it wasn't my coding slowing it down. Most of the lab content was already made. I guess the image generating method the professor used for the background was inefficient.
I'll try making a Java game engine on my own and see how it comes out I guess.
--------------
Anyone have any idea on how to set a transparent color to an image though? .gif images work automatically, but I can't find a method to set a certain color in, say, a bitmap image to transparent.
Also, what are some efficient ways to do fine detection?
One theory I have is to have several 2-color graphics contexts (not shown) that are generated when two objects are in proximity to each other. The graphics contexts will have a dark image of the object formed from the nontransparent parts of the object's image. The rest will be a single lighter color. It will then loop through the collision images of both objects pixel by pixel. If it detects a dark color at the same pixel for both objects, it returns true for the collision.
Edited by the Author.
n/a
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
1st February, 2008 at 06:21:19 -
PNG files can have 256 levels of transparency on pixels, did you try using that and a library to open PNGs in Java perhaps?
There's a bug in the uploaded version. If you make a combo that destroys gems beneath the column you placed that in turn cause a second combo, you will still see the column where you originally put it. I've fixed it but not got around uploading it yet. Want to do some other stuff first.
Originally Posted by Snerlin - taco advocate impressive. Looks like something easy for Java that MMF would loath to do.
Java > MMF
Thank you!
- Ok, you must admit that was the most creative cussing this site have ever seen -