I've made my share of 2D games on various platforms but I have never developed a 3D game.
I want to make a small "mmorpg". I already made my server in python and it works just fine with my flash 2D game but I decided I want to step it up and try out 3D. I want to make a 3D game for the web browser and I think Java might be a good choice for this.
So basically I'm just looking for a straight forward and well documents 'framework' to make LOW-END 3D games. Keep in mind that I will be targeting peoples with very low-end PC's (plus my 3d modeling skills aren't great so I wouldn't mind hiding it somewhat, haha)
If you care to develop your own software 3D engine, which is pretty cool, Developing Games in Java is a complete walkthrough, step-by-step, of developing a 3D engine in pure Java, capable of rendering textured and lit polygons. You learn a lot about the math involved and you realize that it's really not a terribly hard thing to do; in addition, the engine is all yours, so you know it inside and out and you don't have to learn an API. On the flipside, it might be outdated. It's been sitting on my shelf for a number of years now, but it is made with Java 1.4 so it's not all too old.
Otherwise, I would definitely recommend JOGL or its competitor LWJGL; however, both require OpenGL knowledge, so if you want to just deal with loading 3D models and moving them around, jMonkeyEngine could be a better option for you. There is also the lesser-known Xith3D engine, somewhat a competitor to jME, though it hasn't been updated in over a year.
P.S. Ever seen RuneScape? It used JOGL, though now I think they switched to their own port of only the OpenGL functions that their code uses, kind of like a stripped-down version of JOGL.
JOGL would be a good possibility. You could look at the older "Java3D" framework as well.
You might want to check out the jMonkeyEngine.
I would advise against Java3D. We're using it for a project and frequently run into gotchas. If we had the resources, I'd migrate to something else in a second.
Related
I am just getting started with coding and app development using LibGDX and i´ve got some general and some more specific questions about it.
Before I start: I know that some of my questions might have already been asked somewhere on the internet but I found it really hard to get a straight answer to them.
So, the most basic question first:
Is it possible to create an average application (like angry birds or doodle jump) in LibGDX in a reasonable amount of time?
Browsing the internet I came across many people stating that engines like Unity are "just so much easier to use" and that you can create a game in a fraction of the time it would take you to code a game in LibGDX.
Is that really the case?
My second question connects to the first:
Is LibGDX really worth the time? Picking up any engine or Framework seems like a lot of work, so I wondered if LibGDX is a growing platform worth learning or just an irrelevant framework of many.
The third question is a bit more specific (and the most important one for me):
How can I make LibGDX game pretty?
I know, that sounds weird at first but looking at hundreds of apps in all kind of appstores I´ve noticed that most unity apps look really neat whereas most apps found in the Badlogic gallery look just awful to be honest.
So I wondered is there a simple way to add animations, particle effects, shadows, etc. to a LibGDX application. If I was coding a 2048 clone (just as an example) how can I make my tiles slide together and blend nicely?
Creating good looking animations is something I struggle with the most...
(If you want you can have a look at what I created)
I would really appreciate any answer to any of my questions!
Thank you for making it through this huge post.
MrMorph
Question 1:
If you're good at LibGDX and know quite a bit about the API, it would be easy to make a game like Angry Birds or Doodle Jump. Unity is easier to use, because GDX doesn't have a GUI editor - meaning you have to position things using coordinates.
Question 2:
I think LibGDX is worth doing. It's free and royalty-free, which is good unlike Unity, and it's on Java so it's relatively fast.
Question 3:
To make particles, there's a 2D and 3D particle editor which you can download of the LibGDX website or run from your IDE if you import the 'tools' module. For animations, you can make sprite-sheet animations easily with the Animation class and you can move things around smoothly (for your 2048 clone) using functions like MathUtils.lerp() to smoothly interpolate a value to another, over time, slowing down as it gets nearer.
A late answer, but hopefully someone will find this useful.
Checkout my answer to a similar question here: What I need to get android game with graphics like this?
I've used both libgdx and Unity and talk about my experience in the answer. At this point I'm in favor for Unity for most small/medium sized games. The editor really does make development much easier (especially for a one-man team). Libgdx + Overlap2D + Ashley (entity component system) is basically a very light-weight version of unity imo. Going the open-source route, you will definitely learn more since you'll be more involved in gluing these tools/concepts together. To answer your individual questions directly:
Question 1:
There are many good games made with libgdx. The reason you see a lot of crappy looking games in Gallery is because the submissions are sorted by time. The gallery does not prioritize good games to be shown first, this was a community decision a while back. Engines like Unity of course show off the best games first. To see some good looking libgdx games, checkout games by Robotality. Also, take a look at the "Showcase" section of libgdx forums; sorting by reply count will show some interesting games made in past few years.
As for the the claims that Unity is easier to use, I agree. I've made the switch myself just because how easy it is to come back to a project after months, and just starting playing around with it. Not as easy when your game is mostly code.
Question 2:
Libgdx is the better way to go if you want to learn. Because it's a framework, you'll be dealing more closely with the components that make up a game engine. You'll be putting your own game engine together with the APIs provided. Unlike Unity, you'll have to choose whether you want to use an Entity Component System like Ashly. You'll decide when physics engines get updated, when you render, how you load and manage assets, etc. Once again, unlike Unity, there is no enforced structure in place.
You'll be spending time reading libgdx's very well written source code as well as the excellent technical github documentation. I'd say the overall effort to make a game is greater when using libgdx, because of the learning. It's great if you have the time, but can be frustrating if you're developing only once in a while as a hobby.
Question 3:
The question is a little unclear. As I've stated above, there are plenty of crappy looking games made with unity, they just don't show them on their gallery/showcase game. Plenty of games with bad art are made with all popular game engines.
Libgdx has the things you want: checkout Interpolation functions for smoothly controlling object movements, particle editor to create & load particles, not sure about shadows (for 3D?).
Hope this will help someone decide what tool to use.
Yes it is very possible to create a simple game in libgdx. I used to use this framework all the time. If you are semi new to it YouTube has some awesome tutorials.
Now I use unity primarily, and here is why:
It is easier from a productivity standpoint yes.
Libgdx can be a lot of work when trying to work with graphics.
Plus it was an easy transition from Java to c#.
And yes in most cases unity can move a bit faster, again from a productivity standpoint, in libgdx there is more of a process to setting up graphics and viewports and etc.
libgdx is 100% worth it. A big part of what libgdx helped me with was grasping how the backed of these applications work. This has helped me a great deal in debugging problems in unity and just advancing my knowledge overall.
If you have good graphics and understanding of the framework then you can make a libgdx game that does look beautiful. The difference is that unity simplifies the process for you. And all the demos you see are from a huge pool of projects. With libgdx being such a good start to game development, there are going to be plenty of projects, with no proof of how much work and or time was put in.
I want to do Java 3D Graphics without using external libraries to develop a game applet. Sorry I am not that experienced with Graphics and so I am not sure how hard it would be to do it by myself
The real answer to your question is that you're thinking about it a bit sideways: you shouldn't be using an applet (they're dead), and you shouldn't try to do it all by yourself without any libraries.
I'd personally recommend Processing for beginners or libGDX for more experienced users. They both allow you to do 3D, and they both allow you to deploy as JavaScript- which is better than applets.
If you really, really, really want to try to do this without any libraries, then you'll have to do all the 3D math and whatnot yourself, then do the drawing in Java2D. A very basic example of getting started is here, but like I said, you're on your own to do all the conversions from 3D world space to 2D drawing space.
Any sane person would use something like OpenGL instead, which you can find Java wrappers for- JOGL is a pretty basic wrapper (so if your goal is to get "close to the metal" then this might be your best bet), LWJGL provides a few extra features for game development, and the already-mentioned libGDX is built on top of LWJGL.
If you're afraid of using libraries because you think they're too complicated, let me tell you that doing 3D stuff without a library is even more complicated.
I've spent some time looking over the various threads here on stackoverflow and while I saw a lot of posts and threads regarding various engines that could be used in game development, I haven't seen very much discussion regarding the various platforms that they can be used on.
In particular, I'm talking about browser games vs. desktop games.
I want to develop a simple 3D networked multiplayer game - roughly on the graphics level of Paper Mario and gameplay with roughly the same level of interaction as a hack & slash action/adventure game - and I'm having a hard time deciding what platform I want to target with it. I have some experience with using C++/Ogre3D and Python/Panda3D, but I'm wondering if it's worth it to spend the extra time to learn another language and another engine/toolkit just so that the game can be played in a browser window (I'm looking at jMonkeyEngine right now).
For simple & short games the newgrounds approach (go to the site, click "play now", instant gratification) seems to work well. What about for more complex games? Is there a point where the complexity of a game is enough for people to say "ok, I'm going to download and play that"? Is it worth it to go with engines that are less-mature, have less documentation, have fewer features, and smaller communities* just so that a (possibly?) larger audience can be reached? Does anyone have any experiences with decisions like this?
Thanks!
(* With the exception of flash-based engines it seems like most of the other approaches have these downsides when compared to what is available for desktop-based environments. I'd go with flash, but I'm worried that flash's 3D capabilities aren't mature enough right now to do what I want easily).
Download and install is a harder sell. People are more reluctant to do it, and once they have done it, you own the problem of platform compatibility, and you have installed code to update or avoid as your game evolves.
Java applets eliminate all that mess. Presumably also flash or html5.
I plan to build a game for mobile. My target platforms are iOS and Android. I hope to be able to carry out testing on windows and/or linux. I'm a bit over my head in this as aside from general game development experience, all the technologies are fairly new to me. I've done a decent amount of research and have concluded that the game should be written in/ported to C++ to ensure that most of my engine can be easily ported to multiple devices.
Another thing I'd prefer is to write the game initially in java and port to C++ since that's where I'm most comfortable and will get it done the fastest.
Now I have the issue of choosing whether to use a game engine such as cocos2d-x, or to write the engine from scratch and use OpenGL ES 2.0 for rendering. Initially I thought it would be better to use cocos2d-x since I don't have a lot of experience with OpenGL. My problem with using cocos2d-x, however, is that since I want to write the game initially in java, that I'm going to have a hard time porting the engine to conform to cocos2d-x (or I'd have to learn all about the cocos2d-x engine to begin with and then write my engine to mimic the cocos2d-x engine.. seems redundant).
Upon further consideration, I thought that writing my own engine using OpenGL would actually be the better option. I'm able to use the PowerVR SDK along with JOGL to emulate a GLES environment. Also it seemed nice since I would be able to allow GL to do most of the work for me in terms of collision detection and transformations. My only issue with this is that since the game is going to have multiplayer support as well, the GL collision detection and such is basically moot since I'm going to have to do collision checking server side anyway to prevent the game from being easily hacked. Of course for the single player game play this method is viable.
Obviously this decision is subjective and depends on my personal preference, though I hope to have given enough background for some more experienced persons to lend their opinions.
That being said, my question is: given these parameters - would it be better for me to use cocos2d-x and suffer the head trauma of building the game from the ground up in C++, or would it be better to write my own engine initially in java and struggle through the OpenGL aspect of it?
Building your own engine from scratch would be too much of a work and would attract lot's of bugs to creep into. The tried and tested engines are better choice in my view. The porting would be far more easier to do, since you would be having a working game.
I am using Marmalade engine currently and I am quite happy with it's performance. It gives you direct access to the OpenGL libraries, although I've never tried it. You should give it a try too, although it's not free, but the 90 days evaluation license is free to check it out.
I've decided to write it from the ground up in c++ using cocos2d-x. It hasn't been as bad as I expected.
Hi! For the last 3 months I managed to get a grasp of JSE (I have never done programming before, I only have a background of HTML/CSS and some jQuery but very little).
For my final exam this year I am going to have to create a project and I've decided on a strategy game. My professor recommended me to make it 3D on the OpenGL platform (the game is going to be based on RISK - most of you may have heard of this type of game as it used to be very popular). I have no idea where to start or what resources should I read not even for an 2D game not to mention a 3D one.
Can you guys post some resources with what steps I should I follow for creating a game in Java, books or any other advice that could help? Thank you.
The main OpenGL library for Java is:
JOGL
If you go in at the OpenGL level, as suggested by others, you will have to learn a lot about low level 3D concepts. Whilst this may not be a bad thing (a deep understanding of a topic is always beneficial) it may hinder progress and you have limited time.
The one advantage to OpenGL is that there is a lot more general information, especially tutorials (Google It!), available online.
For general OpenGL tutorials, the Nehe tutorials are a classic resource and contain source code in Java as well as a plethora of other languages.
Tutorials 1-5
Nehe tutorials index (linked on the right)
Alternatives to JOGL
I would recommend using one of the more prominent Java 3D engines that do a lot of the graphical leg work for you and will allow you to focus more on the game construction and less on overcoming basic obstacles like loading model formats, writing your own scene management code etc.
These are the good 3D engines that I know of:
LWJGL - Lightweight Java Game Library (documentation)
JMonkeyEngine (documentation, tutorials for beginners)
Ardor3D (documentation)
The documentation for JMonkeyEngine is much more suitable and contains many more tutorials, so I would start there. LWJGL is similarly well documented, but is also fairly low level and, in this way, similar to JOGL. Ardor3D could be a better alternative for those more comfortable with 3D programming in general.
Java Game Development Community
Whichever technology you chose, I suggest getting involved with the Java game development community as there's lots of example projects and people experienced with programming 3D games. The best place I know of is:
Java-Gaming.org