2D Water effect in libGDX - java

I'm working with libGDX and I'd like to reproduce the water behavior we can find in games like Terraria or Go To Hell. The water must be able to flow under the effect of gravity and adapt it's shape to the container's shape.
Actually I don't really know were to start, therefore I have no code to show. I found some tutorial for water effects like reflexion or physics with Box2D, but nothing that I want for my project. If you have some clue it'd be great.
Thanks !

The water effect can be achieved by using LiquidFun physics engine based on Box2D. There is an LiquidFun extension for LibGDX available.

Related

Can I implement JBullet physics later in development

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

Strategy for making computer art

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.

3d model viewer in Flash or Java

I want to show a box in 3d on my website, and I was thinking to do it in Flash. How I can show a 3d model?
I need something very simple, it's a textured cube, no interaction required, just let the user pan and zoom.
There is a 3ds viewer in flash or something like that?
Java is also ok (but flash is preferred)
Flash is signifficantly easier. Java can outperform Flash when using JOGL, but unless you're planing to have more than 200 polygons, Flash is just fine. You can use one of the big Flash 3D engine. Probably Sandy will be easier, since a sandy SkyBox is just what you need. Alternatively, you can just modify this little thing: http://www.advance-media.com/flash_10_as3_rotating_cube_3D.html

Playground for Artificial Intelligence?

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.

What are some techniques to create scrollable areas?

I'm getting started with OpenGL ES on Android and I'd looking to learn some techniques to have a game map larger than the visible area.
I'm assuming I've somehow got to ensure that the system isn't rendering the entire scene, including what's outside of the visible area. I'm just not sure how I'd go about designing this!
This is for simple 2D top-down tile based rendering. No real 3D except what's inherent in OpenGL ES itself.
Would anyone be able to get me started on the right path? Are there options that might scale nicely when I decide to start tilting my perspective and doing 3D?
There are many, MANY techniques for accomplishing this goal, but the base idea of what you are looking for is called Frustum Culling, that is not drawing anything the user isn't going to see anyway. Here and here are a couple of tutorials on how this works.

Categories

Resources