Spherical forums

Sphere Development => Engine Development => Topic started by: Eggbertx on February 15, 2015, 08:58:03 pm

Title: JavaSphere Redux
Post by: Eggbertx on February 15, 2015, 08:58:03 pm
So for those of you who remember the original JavaSphere engine attempt, the main reason it failed was because Oracle (for the most part) seems to have driven the concept of Java applets into the ground. Way to go, jerks. That being said, I've been thinking about bringing it back, since Java is very cross platform and runs on almost every OS under the sun, without too many hoops of fire.
I don't know if I still have what little code I had written for it still, but even if I do, I'll probably end up trashing it anyway, since I was a horrible coder, and have at least slightly improved. This  time, I'll focus on having it run directly on the user's computer, making things much easier (think Minecraft)
Another goal for it will be for it to be as compatible as possible with the different versions, from Sphere 1.x to all of the forks and offshoots
Eventually when I figure out how and most of it is stable, I'd like to add Android support as well, since as far as I know, you can write straight Java code for apps.


So what do you guys think? I saw the HTML5 project, but that looks like it's going nowhere fast.
Title: Re: JavaSphere Redux
Post by: Radnen on February 15, 2015, 09:02:54 pm
If you focus on Android, and make a "Sphere-droid" I'm all for it bud.
Title: Re: JavaSphere Redux
Post by: Eggbertx on February 15, 2015, 09:42:54 pm
I'll be focusing on desktop mostly at first, since that would be much easier, but when that's all good, I'll focus more on the Android platform.
Title: Re: JavaSphere Redux
Post by: Flying Jester on February 15, 2015, 10:19:51 pm
So, this would properly be an entire Sphere engine, written in Java? I support this idea!
Title: Re: JavaSphere Redux
Post by: Eggbertx on February 18, 2015, 12:06:23 pm
Does anyone know how Minecraft works without requiring a Java installation on someone's computer?
Title: Re: JavaSphere Redux
Post by: DaVince on February 18, 2015, 02:52:09 pm
It doesn't (as far as I'm aware, anyway... The Linux and Mac versions are literally just a JAR file). The game needs Java to run.
Title: Re: JavaSphere Redux
Post by: Eggbertx on February 18, 2015, 11:29:07 pm
Well yeah, I know about Linux, and I figured with OS X. If I can figure out how to get Java packaged with it in Windows, that'll be fine, and I don't know about OS X, but Java is way easier to install in Linux than in Windows. Good freaking god, Windows Java default folder setup is completely stupid.
But enough about that nonsense.

Lookie lookie!
(https://dl.dropboxusercontent.com/u/10266670/js%20error.png)
Don't worry, the error is a good thing in this case. Although no Sphere specific functions have been worked on yet, the error means the Javascript engine is working perfectly. Not very far, granted, but it's a start. And it's already organized much better than the original JavaSphere.
Title: Re: JavaSphere Redux
Post by: Eggbertx on February 19, 2015, 12:28:05 am
Well crap, it looks like I'm going to have to cut out a lot of the Slick2D (OpenGL wrapper/game engine) and replace it with straight OpenGL, because it doesn't have the functionality to generate images, needed for things like fonts, maps, character sprites, etc rendering. Bugger.
There's a good chance I'll be cutting that out, and going with another package which is a much thinner wrapper around OpenGL since that appears to be more powerful, and looks like it has the ability to generate graphics.
Title: Re: JavaSphere Redux
Post by: Radnen on February 19, 2015, 01:34:57 am

There's a good chance I'll be cutting that out, and going with another package which is a much thinner wrapper around OpenGL since that appears to be more powerful, and looks like it has the ability to generate graphics.


I found that the best solution is not to rely on an existing sprite or image drawing API. For example, SFML has pre-made Sprite and Shape classes so I could draw sprites and graphic primitives easily to screen. But then I saw it also had the ability to just push raw vertices and a texture pointer to OpenGL and so now I exclusively use that for everything. So if you do use a light-weight OpenGL library, make sure it exposes this kind of feature, because pushing vertices, texture-coords, and textures to your graphics card is where 100% of the graphics functionality really stems from.
Title: Re: JavaSphere Redux
Post by: Eggbertx on February 19, 2015, 02:38:53 am
It looks like it's supposed to do that, but I'm trying to figure out exactly where. Slick2D doesn't expose that, so I'm dumping it.
Title: Re: JavaSphere Redux
Post by: Flying Jester on February 19, 2015, 01:12:14 pm
Good freaking god, Windows Java default folder setup is completely stupid.


...OS X is worse ;_;

Maybe have a look at (I think it's called) LWJOGL?
Title: Re: JavaSphere Redux
Post by: Radnen on February 19, 2015, 04:53:25 pm

Maybe have a look at (I think it's called) LWJOGL?


That'll be the LWJGL: The Light Weight Java Game Library. I've used it before, it seems decent, I'm unsure of its GL options tho.
Title: Re: JavaSphere Redux
Post by: Flying Jester on February 19, 2015, 06:21:13 pm
That's the one I'm thinking of. It has OpenGL, OpenAL, and some input library I believe. I compiled it for Solaris once to make Minecraft work.

I would be inclined to either use that, or to poke at the GL and GLX/EGL/CGL/WGL libraries directly using JNI.
Title: Re: JavaSphere Redux
Post by: Eggbertx on February 20, 2015, 05:14:33 am
I figured I may as well go with JOGL, straight up Java OpenGL, which seems to just be a very thin OpenGL wrapper, and I want to stay as close to the main stuff as I can
Title: Re: JavaSphere Redux
Post by: Eggbertx on March 03, 2015, 05:47:22 pm
So I'm working on the most important part of the engine: the icon. This is still sort of a rough idea, but what do you guys think?
(http://pinkie.ponychan.net/chan/files/src/142541773466.png)

I was thinking of putting the Java logo there instead of the J, but that might be a branding issue.
Title: Re: JavaSphere Redux
Post by: Flying Jester on March 03, 2015, 07:08:20 pm
I like the idea, and reusing the swords. For once the logo actually has a sphere in it!

I believe the old, Sun-era Java logo is CDDL licensed, so there wouldn't be issues with that. It's older...but it's also Sun...
Title: Re: JavaSphere Redux
Post by: Fat Cerberus on March 03, 2015, 07:14:06 pm
You could always use Duke, the Java mascot.  The character is open-source, just like Tux for Linux.
Title: Re: JavaSphere Redux
Post by: Eggbertx on March 04, 2015, 01:34:01 am

I like the idea, and reusing the swords. For once the logo actually has a sphere in it!

That was the idea. I never understood why the logo had nothing to do with a sphere.



You could always use Duke, the Java mascot.  The character is open-source, just like Tux for Linux.

I had no idea what its name was. Would most people associate that with Java? I've always thought of Java's main logo as being the cup. I mean even the Wikipedia page still has it. If licensing isn't an issue though, I might just go with that.
Title: Re: JavaSphere Redux
Post by: N E O on March 05, 2015, 01:06:25 am
Sphere has a logo and you may put swords on it if you like: (http://wiki.spheredev.org/images/5/5b/Sphere.svg) (http://wiki.spheredev.org/images/5/5b/Sphere.svg)

I made a version that has simulated lighting using gradients, but I don't have access to the vector of it at the moment.
Title: Re: JavaSphere Redux
Post by: DaVince on March 05, 2015, 10:56:13 am
Maybe you could put the swords over a stylized round coffee cup.
Title: Re: JavaSphere Redux
Post by: FBnil on June 07, 2015, 10:55:25 am
The J in the icon with swords should be fatter and more prominent. Maybe even centered, and behind one of the swords? Also the font is too plain, use something more epic (but keep it readable).
I like the colour. Not too screamy, blends in with the soft grays.