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.
Related
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).
I am a semi-new OpenGL programmer, and am in the process of learning of how VBO's and Shaders interact with each other. I have a basic demo set up, and it imports the model and places a light in the scene. Now, in the future I would like to have physics, but my knowledge of JBullet is at a minimum. Should I implement the physics into it from the ground up, while learning more about rendering, or is it something I can add later, assuming my engine's framework is somewhat flexible to new API's?
Note: I am using LWJGL, and plan on using JBullet along with GLSL
Short Answer
Yes
Long Answer
Your Graphics code should be separated from any Physics code. In most engines, from Unity to UDK the Physics has little to do with your Graphics code. The only place where they connect is your game code when you do something like
Position = PhysicsObject.GetPosition();
DrawableModel.Draw(Position);
Some engines put higher levels of abstraction on top of this, like UDK with UnrealScript. Others like Unity behave exactly like this.
You might also want to have a look at a pattern or architecture called Entity Component System
This post might seem a bit strange. The thing is im experimenting with new things for my digital signage application. Im looking into making some kind of digital art (art as in paintings etc.). I am thinking on drawing some pixels in different colors on a bitmap or something (havent quite figured that one out yet). I imaging the work of art is being created in fromt of their eyes so each time you pas the screen you see some progress.
Does anyone have any tips, tricks approaches or anything else to point me in a direction. How about the algorithm, genertic seems to be a viable path to go down?
Here's a really cool project I discovered recently that might help inspire some ideas. It uses genetic programming to replicate another painting entirely out of geometrical shapes: http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/
Here's what I meant with Fractals:
http://langexplr.blogspot.com/2007/06/creating-fractal-images-using-c-30.html
This is not Java tho, it's made in C#, but I'm sure you can do it in Java
Winamp visualizations are a good source of dynamic generative art.
Possibly the best if someone is willing to devote some time to learn the program.
Even if this isn't the case they could be used for inspiration.
My game would be a simple 2D tower defense type game. It should have some animations and sounds. I've only learned Java so this seems like a huge plus for choosing that option. But I'm fairly new to programming so i suppose it wont be a huge problem to switch.
From my limited research, either Python using pygame or Java using lwjgl seems to be best suited for my kind of game.
What are your thoughts? Benefits of one over the other? Other suggestions?
Java + LWJGL is very low level and you'll have to write a lot of the sound and animation code yourself. A better choice would be Java + Slick2D (a 2d library on top of LWJGL). You can find it at http://slick.cokeandcode.com
A benefit from Pygame for the kind of game you want to do is the Python Pygame Tower Defense project that could be a pretty good tutorial for what you want to do, isn't it ?
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.