Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
with a few friends we started this amateur platform-independent java-based project for a space combat simulator game (something like the long dead saga of wing commander). None of us though is a 3D programmer, so the road is gonna be long.
My question is: in our place would you start learning OpenGL (maybe via GLUT) or is there a better possibility today? What about Direct3D? Any books you may suggest? We ordered a couple, specifically
Dave Shriner's OpenGL Programming Guide
Luke Benstead's Beginning OpenGL Game Programming
Consider using an open source 3d engine like Ogre3D or Irrlicht. This way you can focus on making a game: content, gameplay.
Both engines define an abstraction layer that can map to Direct3D or OpenGL backends.
EDIT: at first I didn't notice you mentioned Java, anyway both engines support Java bindings.
If you decide to learn the low level graphics programming instead of using a higher level 3d engine like Ogre3D or Irrlicht, I recommend starting with OpenGL ES 2.X, which is a subset of OpenGL.
OpenGL ES 2.X is a simplified subset of OpenGL for embedded systems with programmable hardware such as phones. For example, in OpenGL there may be multiple ways to accomplish tasks, but in Open GL ES 2.X, there's only one way. Because there's less choice in OpenGL ES 2.X, there's so much less to learn to master OpenGL ES 2.X. The OpenGL ES 2.0 Programming Guide is 480 pages, and the OpenGL Programming Guide, Seventh Edition is 936 pages.
Furthermore, using OpenGL ES 2.X will give you a wider hardware audience for your game. Because it is a subset of OpenGL, code written for OpenGL ES 2.X will work on a full OpenGL system with little or no modification. Your game's graphics can work on a range of target machines from desktops to smart phones.
You could choose an open source 3D engine like Ogre3D.
But if you really want to write the graphics engine on your own (quite interesting), start by learning linear algebra. Not the quite advanced stuff, but you should be very comfortable with expressing yourself in translation vectors, rotation matrices and the like.
If you already familiar with those concepts, choose either Direct3D or OpenGL - this depends more on the available platform. If you like to code in a Mircosoft Environment, choose Direct3D, everything else, choose OpenGL.
The choice of additional libraries depends on the programming language. Better alternatives than GLUT are probably SDL (C) or Qt(C++).
Well, if you've never done 3D graphics programming before, go for simplicity and learn-as-you-go.
There used to be a set of really nice tutorials by NeHe (Neon Helium) for OpenGL, which was the route I took.
I found OpenGL easier to start with as learning curve is not so steep. You can get quick results which helps a lot with initial frustration/motivation. Tons of help etc. Words of warning though - 3D programming is inherently complex and you'll spend more energy on building graphics technology than game itself. Consider adopting Ogre3D if you really want to see the game finished :o) (disclaimer: I know there are also other engines but Ogre is stable, proven and comes with good documentation)
If you want to stay platform-independent DirectX won't do as it is restricted to Microsoft Windows Platforms
Related
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.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I'm thinking of writing a game. It's inspired by Minecraft/Terraria (but don't worry it will be different).
My main question is what language I should write it in -- it'll be relatively simple graphics, more like Terraria than Minecraft. I know Java relatively well and Minecraft is written in it, but C++ seems like the industry standard for game development. However, I know next to no C++. I'm willing to learn but am worried how it will turn out for my first real project in the language.
In addition to that, I'd also like suggestions on a good game engine for the language that you suggest. I'd like it to run on:
Windows for sure
Linux for sure
Mac for sure
Android would be really nice
iOS is optional
Thank you in advance!
C++ is the "industry standard" by heritage, by FUD, and (marginally now for 2D games) for performance reasons.
On the plus side for C++, you'd have more graphics, audio, and input library support. Java doesn't have a lack of these types of libraries, but C++ has a glut of them.
On the negative side C++ is one of the least beginner-friendly languages out there, and even though there are multiple cross-platform libraries for it (e.g. SDL), it is not a cross-platform friendly language.
If you are more interested in spending the majority of your time making a game rather than a game engine, then I'd recommend you either write your engine in a higher level langauge, or use a pre-existing game engine and just script on top of it.
If you are more interested in spending the majority of your time making a game engine rather than a game, then maybe you should focus on making graphics demos, physics demos, or game content creation tools instead of games. Those are all more directly applicable to learning what features a game engine would need to support and how they are implemented.
If you decide you must program both the engine and the game, you may want to look into embedding a scripting language into a C++ engine (such as Lua). This is a very popular approach, taken by most games that support modding. You don't have to support modding to use a scripting language, but most moddable games support modding through a scripting language.
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
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am looking for a high-end graphics library for Java Standard Edition. I know some fairly low-level libraries: AWT/Swing, JOGL, SDL. Are/is there an alternative?
My requirements are (atleast):
Anti-aliased
Fullscreen support
Alpha channel
Blend modes and Z-depth
Rasterized Effects: (motion) blur, glow, gloom, etc.
And, optionally:
Hardware acceleration
Vector graphics (scale/rotate/translate in floating point precision)
Well documentated, easy to get started.
I understand if there are no libraries/frameworks matching all requirements, if so, can you comment on how well it's extendible?
Edit:
Are there any other alternatives besides Processing? Is Processing usable (and easy?) as a library?
All of the effects you ask for can be done with Java 2D fairly simply and Java2D is to some degree hardware accelerated. The book Filthy Rich Clients shows how to implement all of these effects and many others. Painters in the SwingX has also implemented several of these effects.
Another possibility is JavaFx. It has a lot of effects built in. A year and a half ago when I tried it, it was still a little slow, but at least one version has been released since then. It may be more performant now. It's built on top of Java2D, so it should be able to take advantage of the hardware acceleration in Java2D.
As far as full screen support here's more information.
Maybe Processing (homepage) can be a good tradeoff.
it has 4 kinds of backing, including OpenGL
it has AA
it is 2d or 3d
it supports hw acceleration
it supports transformations
its syntax is quite easy to learn
it's easily embeddable
everything you need to learn is in this page
Not really a graphics library but rather an advanced applet AND graphics library:
PulpCore
Be sure to grab a quite recent version (maybe even fetch the source via mercurial and build it yourself) because the filter effects you mentioned (blur etc.) aren't available in earlier versions.
I know it might not be exactly what you're looking for; it is not a processing alternative, but it might be the better choice, depending on what you're planning to do.
Take a look at http://processing.org
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Looking for an easy to use 3D Java Engine API (i.e. not wrapper) that has a good community and good development. Extra features (i.e. audio, input, etc.) are not necessary but nice.
List of the most popular Java 3D graphics APIs I found:
Wrappers / Low Level
JOGL - Strong community / Good support / Active
Java3D - Abandoned (or slowly dying), phased out Scene Graph (or re-tooling into JavaFX?)
lwjgl - Open GL wrapper, with audio and input handling / Active
Engines
jMonkey Engine - Wikipedia - Active
Branching between version 3.0 and 2.0 (may hurt community)
ogre4j - Wikipedia - Active
Parent project OGRE - Active - C++
Bindenlicht - No Wikipedia! - Not active
Parent project Irrlicht - Wikipedia - Active - C++
High Level (Not designed for gaming)
Processing - Doesn't seem suited for gaming but for graphics visualizations and demos
Jzy3d - An easy to use Java API for 3d charts (surfaces, scatters, bar charts, etc). Built on top of JOGL
Update: Please pick a JAVA engine and explain why its your choice! Thanks!
I would look at Ardor3D and have another look at JMonkeyEngine.
Ardor3D
UPDATE: Ardor3D's developer ceased the project, but a subset of it continues to exist
Created by the original JMonkeyEngine developer(s) who decided a clean break was required so they could start over and use all the experience gained to create a better API and platform.
The people I know who have used Ardor3D have very positive things to say about its design and API. It is actively maintained and has a good community and good API documentation, although tutorials are a little short in supply and generally you'll have to be familiar with 3D programming concepts to be able to pick it up.
JMonkeyEngine 3
A community-led rewrite of JMonkeyEngine 2, driven by dissatisfaction with JME2 design and related issues caused by said design, it has gone from strength to strength since its release.
There is ample documentation including tutorials and plenty of projects using it. If you had issues with JMonkeyEngine 2 or earlier, it is well worth another look at version 3.
Others
Env3D
jPCT
3dzzd
Jake2
Xith3D
You are mixing libraries and levels of libraries, Jogl and lwjgl are both pretty thin wrappers around OpenGl (IIRC lwjgl has more wrappers for OpenAL i.e. audio). While you can write a game using pure opengl you will probably spend a lot of time managing geometry, building (or reinventing) a scenegraph and other management functionality.
Processing is mostly 2D oriented.
I don't have any experience with ogre4j, but the last time I looked JMonkey was under current development looking at the 2.0 repository there is a long list of changes that are current.
If you are not too set on using Java consider some of the alternatives Torque (private Scripting Language) Panda3d (python) or the aforementioned OGRE using C++. I don't know what classes and constructs you are talking about in your first paragraph, but having a library or backend that takes care of the scene management, visibility calculations, sound management, game loop, possibly even networking might be a better driver for your decision than a specific language feature.