Webstart
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
Introduction
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.
Documentation
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)
.multLocal(speed));
node.setLocalTranslation(loc);
}
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!