Tanq2 (Working Title) Programming Game!


I have now made a working version of Tanq2 available using webstart. This allows both the client and the server to be run, so now at least people can have a go.

Tanq2 Server

Tanq2 Client


Tanq is a tank based Programming Game written by a Lecture at the University of  Derby. It is pretty similar to the common tank programming games where by players have to code AI to control a Tank that navigates around a arena shooting other tanks.

The key point about Tanq is that the arena is drawn from a black and white image, so that it can be very different between games along side the tanks are immortal!

The Tanq game was used in a module at the University that taught details about programming AI.

And Tanq2?

Tanq2 is my Primary University Project. I started this sometime back in October and in between a ton of other things have been hacking away at what has become a semi-decent representation of something that, in my opinion could be come something rather awesome.

Tanq2 is called as such purely due to having no time to think of something better and more suited. Therefore, those willing are free to suggest a better more suited name if they wish.

So why is it so different?

Tanq2 is a lot different from Tanq and other Tank based Programming Games that so far as my current research has been is the most common style of programming game around. I assume this is more for inspiration from RoboCode.

Tanq2 however does away with Tanks, Robots and even Tanqs! Instead you have sphere. Or, creatures really, but I am no 3D artist nor does the project require me to be.

Jokes aside. Tanq2 allows players to control a Species. Each species starting with 2 creatures and can grow to an unlimited amount.

Of course to breed the creatures you would inevitably need a healthy male and a healthy female creature in close proximity. Birth of new creatures would drain the ‘parents’ therefore requiring them to find food or water or sleep.

Tanq2 Tech

The game of course uses Java, and the jMonkey Engine. It also works on a Server-Client archutecture. Whereby, currently only the server has the 3D view of the Environment and the client pretty much does nothing once running.

Players create their AI class within the Client, using method and functions from the “CreatureController” class. The CreatureControl Class interacts where required with the ClientCore which further sends the data needed to get the required return values.


Wiki Link

A little help (yep, a little more!)

Along side those questions and over all testing. I do have a more technical question.

I of course cannot simply paste my code over the Internet, so I hope the following samples will aid you in aiding me.

Currently my movement is more deranged then something very broken! I would like to ask why since it makes no sense to me at all.

I use this to point my “creature” at a location:

node.lookAt(location, new Vector3f(0,1,0));

I then use the following code to move the object towards that location:

public void moveForwards(Node node, float speed) {
        Vector3f loc = node.getLocalTranslation();
        loc.addLocal(node.getLocalRotation().getRotationColumn(2, tempVa)

Currently, this makes the object move from one location to another then somehow teleport back to the start and repeat endlessly getting never closer to the oriented location to which it should be getting to.

Maybe I have done something more wrong that isn't shown in the above code. Though I then hope that the program itself can help shed some light onto the error of its ways!

You've misspelled the link to the wiki. It's http://www.immortal-nights.com/tanq2/wiki

Corrected. Thank you. Will teach me for posting so late.

I understand it might be difficult for people to get running. I'll get some screen shots on the wiki over the weekend.

running won't work due to missing natives… copying them into the same folder results in a black lwjgl window displaying stats, but nothing else :expressionless:

end of output:

17:17:40.237: Initilisation Complete
17:17:40.252: Thread created :(Creature Monitor Thread)
17:17:40.252: Creature Watch Started
17:17:40.252: Thread created :(Creature Movement Thread)
17:17:40.252: Notifing Clients
NEW THREAD CREATED! (Session Sender Thread)
17:17:40.252: Thread created :(Session Sender Thread)
17:17:40.252: Thread removed :(Session Sender Thread)
18.04.2008 17:18:01 com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
18.04.2008 17:18:01 com.jme.app.BaseGame start
INFO: Application ending.

I haven't had a chance to look at your game yet - but I can at least answer your first question:

1 - Overall what attracts you to Programming Games?

Game programming (and most programming in general) is one of the few ways you can create essentially physical objects/worlds without the dexterity, strength, risk, or equipment necessary in the real world - it is a completely mental process.  In a woodshop I could spend hours using complicated equipment to form a table out of wood - but that would also take a lot of training - as well as a lot of material - not only for the finished product, but for each time you make a mistake.  Obviously you can't backspace your errors :)

In a computer environment I can create not only that table - but also an entire house, city, or world to place it in - with only a computer, time, and a bit of perseverance.  It gives you the ability to create whatever you can dream up - without the restrictions of real life.
irrisor said:

running won't work due to missing natives... copying them into the same folder results in a black lwjgl window displaying stats, but nothing else :|

I'm not very good at compiling the JARs with jME. Is there someone, or somewhere that can give me a step-by-step on how to do it? It would be much appreciated.

webstart step by step  :wink:

Once I’ve started a similar project, but now I’m too busy with other duties. Would you like to get the source code? Maybe it has some useful stuff for you to use:


The sourceforge projecy:


Best regards

Core-Dump said:

webstart step by step  ;)

Almost perfect tutorial. I now therefore have a working Webstart version of both the client and the server for people to try out.

Available from:

perick said:

Once I've started a similar project, but now I'm too busy with other duties. Would you like to get the source code? Maybe it has some useful stuff for you to use:

The sourceforge projecy:

Best regards

I would be very interested in taking a look at the code; maybe it will help me figure out my movement issues.

If your not too busy, maybe you could answer some of the questions that I asked in the Original Post, in regards to making such a programming game. I would be very grateful.

Still; now at least people can have a look; the Client is still currently loaded with the Food Finding/movement Brain. To disply the issue I have with movement.