This really is awesome. I've put it in the showcase of the first issue of Play Game.
— hartnell
Again, I can't try this because it's B2D, but it sounds pretty cool.
Damn… I need to find another language soon :)
Try PlayBasic. Now with 120 day "demo". And only $30. I recommend it.
It's sad that B2D isn't making the leap to vista.
— hartnell
At a first glance it does look damn good (and probably fast, since it's compiled). I constantly run into speed-problems with brutus because it is loosely typed and interpreted. I have looked at PlayBasic before, and i'm sure i would have bought it if it was for linux also. Anyways, i will probably keep at c++ and hopefully i will find a library that is so good and easy to use that i can cook something up as fast in it as in basic.
This one really is nice and fast, but also only windows :..(
"since it's compiled"
It might "compile" to byte code, but it is highly unlikely that it compiles to machine code.
In fact their own page calls it an interpreter.
http://www.underwaredesign.com/staticpages/playbasic/compare1.htm
I have updated this to include collision detection and damage. Also there is a delay between the firing of the shell and until it hits. It looks kinda cool i think. Try it out (if you can).
The collision test is done when you fire by simply calculating if the line between the tank and the target collides with any object on the screen. This is a simple line-circle intersection test. I give my shell thickness by adding the shells size to the radius of the circle i am testing against. Works like a charm :) Anyway, the farther the intersection with a circle is, the more the explosion is delayed giving the impression that the shell is traveling through the air, even though you don't see anything but the recoil of the cannon and the explosion some ms later.
Now if anybody could just tell me how i make the enemy AI and i would have a game done here! Currently the enemy cannon is tracking the player. I need to make some kind of decision when to fire, and i need to make the enemy move around to protect himself and/or chase the player.
Assuming all you'd want it do is move around and shoot, I'd think random movement would be good enough for the base. :P Although you could take things into account like it makes sure it only moves to a point where it has a clear shot at the player, or perhaps if it's low on Health it tries to find a nearby spot that provides it with cover. Anything else you'd want it to do?
I've just implemented aiming and firing of the AI, and it works like a charm :) I even lost my first game against it. So that part is taken care of, it now shoots reasonably good shots, with human-like mistakes.
What i want it to do is move around a bit smartly. I want it to use the rocks for cover, and not just be an open target. My research seems to be telling me that the tank that is further away from the rock between the two, has an advantage. This is because it actually can get the other tank in line-of-sight without itself being in line-of-sight, ergo, it can fire without being fired upon.
Here's a "drawing"
' | ___
+-|-+ / \ +---+
| o | |rock| | o |
+---+ \____/ +-|-+
|
The negative side of being further away from the rock is that it is slower around the rock, so if it has more damage, the tank closer to the rock can just charge out from the rock and kill it. So i guess i have to work this into the ai also.
So i guess i need to take damage and distance to the covering rock into account. and probably some other stuff too.
Aaaanyways, I check the first post for download info.
How do you open a .rar file? I can't get past that part.
WinRAR, or some other software that supports RAR archives.
/u9