I would like to ask you for an advice, what would be the best approach to create a RTS game in Java nowadays. I have some experience with JavaFX applications, but I guess it is not exactly inteded for such things and it is much better to use in "office" applications and there are not so many examples of games created using JavaFX. Or am I wrong and it can be used for that purpose?
I know there are such engines like Unity or Unreal, but I would like to make something like this in Java. Should I go for LWJGL or something like this in this case? I think that 2d engine should be enough for what I would like to do.
What would you recommend for that? Thanks for your suggestions. I know there are some topics like this, but I would like to know what is currently on top.
maybe this is what you are looking for: https://github.com/AlmasB/FXGL
You mentioned Unity and Unreal and this is certainly not comparabel with that. But in your headline you ask for a 2D engine and I think it fits in this category.
There's the java based (not specifically JavaFX) libgdx (https://libgdx.badlogicgames.com/), which could be adapted to JavaFx.
I have a goal to build a robot that can collect table tennis balls and put them into the goals A and B seen to the left and right side of the added picture. For info, the course is rectangular with one single obstacle; a four-walled cross.
For now I have bought the Pixy 2 to recognize the balls it needs to pick up.
My two questions are:
Is Lego Mindstorm (LM) an easy/reasonable programming language to solve this, and can LM also easily control the robot’s movements?
Is it possible to use Java instead of LM to solve this? (This would be preferred, as I know Java but not LM)
As I understand LM is not a programming language and you can use several software kits to deploy a program on the LM. Some of them are Java based.
See
https://en.wikipedia.org/wiki/Lego_Mindstorms
Lego Mindstorm's default programming language is visual/blocks based. It's intended for kids with not programming experience. So, if you know Java you'll have no problem using it. Indeed you'll find it too simple.
Programming a robot's movement is very easy, and it comes as a sample project in the Mindstorm's set.
Plus: Your camera comes with plugins to add it's own block to the Mindstorms programming environment. You even have a sample project to build a chaser robot.
From my experience (with Mindstorms NXT2) trying to use LeJOS() was not straightforward. But that was several years ago, with an older version you've indicated in the tags (ev3).
How should i go about making a simple card game? (e.g. solitaire) I am familiar w/ terminal programs in java and c/c++, but i am not familiar w/ the graphical side. Is openGL too complex for a simple card game? I guess ultimately I'm asking where do I start? What language & functions do I need?
JavaFX 2 or Qt are really easy to start with, just look at the tutorials.
Netbeans comes prepackaged with a GUI Builder. If you like drag and drop and can write your own java listeners behind it, this is not a bad option.
http://netbeans.org/features/java/swing.html
In school, one of my professors had created a 3D game (not just an engine), where all the players were entirely AI-controlled, and it was our assignment to program the AI of a single player. We were basically provided an API to interact with the game world.
Our AI implementations were then dropped into the game together, and we watched as our programs went to battle against each other.
It was like robot soccer, but virtual, with lots of big guns, and no soccer ball.
I'm now looking for anything similar (and open source) to play with. (Preferably in Java, but I'm open to any language.) I'm not looking for a game engine, or a framework... I'm looking for a complete game that simply lacks AI code... preferably set up for this kind of exercise. Suggestions?
This sounds very similar to Robocode.
Robocode is a programming game, where the goal is to develop a robot battle tank to battle against other tanks in Java or .NET. The robot battles are running in real-time and on-screen.
You may want to check out AIIDE in 2010, where they will be hosting a Starcraft Broodwar AI competition. You can download the software, API, and proxies to allow you to connect your homegrown AI into the Broodwar simulation.
Unlike other platforms such as 3D Robocup, the Broodwar engine will handle the physics, and will probably allow you to focus most of your time on higher level aspects such as path planning, strategy, resource allocation, etc. There are also basic forms of AI that you can plop in as placeholders while you work on your specific improvement, say a melee AI for example.
Check out Mario AI. You get to program an AI to control mario. There's a competition and some papers associated with it. Very easy to setup and get running with Java or any JVM language.
My AI class used the open-source BZFlag, which turned out to be quite entertaining and informative.
You might consider Open NERO (" (Preferably in Java, but I'm open to any language.)") but it's written in Python. If none of the Java suggestions appeal to you, take a look here:
http://code.google.com/p/opennero/
It doesn't "lack" AI code, it contains it. Perhaps looking at an AI implmentation in Python would give you some inspiration for your Java efforts.
Edit: To address vidstige's comment - you could try this : http://aichallenge.org/ - Programming ants to gather food and fight enemy. There seems to be a Java implementation there.
You may start with
this game
Some AI is already implemented so that you can take example
I know you indirectly referenced RoboCup in your question, but I think it's worth a mention here given the heading. There are both 2D and 3D versions:
2D League
3D League
The 2D league is more abstract with commands like move, catch, kick.
The 3D league is more complex as you have to control the angles of each hinge in a 3D robot's body (22 of them with the Nao model).
Both are equally valid exercises for AI. It probably depends what area of AI you want to play with.
Both can be programmed from any language/platform that supports TCP sockets. You'll find sample code in Java online to get you started. I've been maintaining a list of existing libraries for 3D RoboCup on the SimSpark Wiki here.
If you want to use .NET for the 3D league, you can use the TinMan library I created.
Check out ORTS.
Torcs is a racing game engine that lets you build your own drivers in C++.
Your prof's game reminds me a lot of the old macintosh game Assassin, which wasted many of my after-school hours back in the day. It was an interesting turn-based game where players input their moves at the start of each turn, and then their moves are executed simultaneously. The game's AI's were kind of dumb, and I always wished I could muck around and improve them, but I never found an open source version of the game.
I want to begin developing 2D Java games for phones (on J2ME) therefore I'd like to know if any libraries or "engines" exist to help out in the various graphical tasks:
Drawing text with pixel fonts?
Drawing bitmaps for sprites with multiple frames like animated GIFs?
Drawing graphics with code, lines, beziers, flood-filling and gradient fills?
Ordering / layering of sprites?
Or maybe a great book exists, that gives you enough code samples to get off the ground quickly?
MIDP (JSR-118) includes the basics (most of the things you listed above) mainly in the javax.microedition.lcdui and javax.microedition.lcdui.game namespaces.
I didn't use it myself, but heard some good reference on here.
And here is even a list of libraries, you might need.
There was a book released quite a few years ago called Developing Games in Java by David Brackeen.
That covers the basics of 2d and 3d development in pure Java as well as how to handle time jumps and update the physical properties of your game characters. It is a good introduction to the topic.