60 Tons

60 Tons

Blogging the development of 60 Tons, a tank game

60 Tons RSS Feed
 
 
 
 

Using Targeting with Guided missiles

The latest 60 Tons build features a working guided missile courtesy of the Guided or Seeker Projectiles resource.


Guided Missiles from Kcp Dad on Vimeo.

The target is selected using a modified version of the Gui Reticle HUD for TGE(A) With Target Cycling resource.

Targeted friendlies have a partial blue rectangle around them.
friendly tank targeted

While a red rectangle identifies an enemy.
enemy tank targeted

This implementation differs from the original resource in the way targets are selected and what is selected. Only one tank can be targeted at a time.

Targeting can be done automatically or manually. In automatic targeting mode the closest tank in your line of sight is targeted. Toggle automatic targeting with the F4 key.

Or you can select the nearest enemy tank with the “c” key. Repeatedly pressing “c” will cycle the targeting through all enemy targets within radar range even if they are outside your field of view.
Friendly tanks can be selected the same way with “shift c”. Why would you target a friendly tank? Once a tank is targeted the Heads Up Display (HUD) will display important info on the tank such as health and shield strength. This way you can monitor your teammates and come to their rescue if need be.


Targeting next friendly with the “shift c” key combo from Kcp Dad on Vimeo.

Download, install, and hopefully when you join the game there is another curious user there to try this out on.

Making Videos

In this post I document my attempts at video making. There are no doubt better ways so please feel free to set me straight. At the moment I don’t have a TV tuner.

First I tried Fraps with the networked game. That lag combo unfortunately killed the framerate.
Still I wanted to salvage some of it. I used VirtualDub to compress the large uncompressed video that Fraps creates(usually between 300 and 600 Meg) to something I could upload to YouTube.
VirtualDub compressed the video significantly but it required some tweaking to get it working. The last video in the post shows the tweaking.

Here is the YouTube video:

Wasn’t too happy with the quality so I uploaded the rest to Vimeo.

Here is one:

Ninja escapes from Kcp Dad on Vimeo.

More here

In order to improve the framerate my next attempt used another recording program CamStudio. Also I limited the demo to a standalone version thus eliminating any network lag. Instead of YouTube the video was uploaded to Vimeo.

Here is a short introduction to 60 Tons.

Introduction to 60 Tons from Kcp Dad on Vimeo.

Finally a video instruction for using VirtualDub.

How to use VirtualDub to compress an avi file from Kcp Dad on Vimeo.

Blogging and a Refactored Scoreboard

Blogging

I’m using WordPress for blogging. Each blog entry will be replicated as a blog at Garagegames, aka GG. WordPress uses HTML tags while Garagegames uses something called Markup Lite. For now I write the original post in HTML using the WordPress editor and gvim, save it as an html file, then convert to Markup Lite using a series of vim substitution commands wrapped in a function.

The blog uses the Atahualpa 2.01 theme. I changed the PRE tag in the style sheet so it includes code in a box similar to GG Markup Lite, this post was very helpful.

pre     {
        border: solid 1px blue;
	font-size: 1.3 em;
 	color: blue;
	margin: 10px;
	padding:10px;
	background: #FFFFB3
        color: blue;
        font-family: Consolas, Monaco, "Courier New", Courier, monospace;
        }

Also went back to my last post and replicated my post in the GG blog instead of just linking to my blog. I had to change the New Year’s resolution link because my original blog link was to a Wikipedia entry that contained a quote in the URL but Markup Lite does not support quotes in the URL, there is always a gotcha :)

Refactoring the Scoreboard with Build 0.46

Here is the original scoreboard from starter fps.
Default Scoreboard from starter fps

After getting Torque years ago one of the first things I changed was the scoreboard. Starting with script is a good way to learn torque especially if it involves client/server interaction. I added more statistics but in retrospect the logic was too complex because it would send client updates to every client every statistics change even if the scoreboard GUI was not looked at. When testing the last build I noticed that scoring was broken. After reviewing the code I decided it was too complex and badly in need of a rewrite.

This latest build refactors the statistics code to make it simpler with less network traffic. The GUI object is only updated when a player requests the screen. Here is what the statistics screen looks like now, accessible via F1
latest HUD and scoreboard
Some statistics need to be updated more frequently because they are part of the player’s HUD, e.g. kills and deaths.

Statistics are part of the client connection object and are initialized in 60tons/server/game.cs when the player joins the server.

function GameConnection::onClientEnterGame(%this)
{
...
        // Initialize statistics
        %this.kills = 0;
        %this.deaths = 0;
        %this.flags = 0;
        %this.suicides = 0;
        %this.teamkills = 0;
        %this.pitstopcaptures = 0;
        %this.reward = 0;
        %this.score = 0;
        %this.w1hit = 0;
        %this.w1fired = 0;
        %this.w2hit = 0;
        %this.w2fired = 0;
        %this.w3hit = 0;
        %this.w3fired = 0;
        %this.w4hit = 0;
        %this.w4fired = 0;
        %this.w5hit = 0;
        %this.w5fired = 0;
        %this.w6hit = 0;
        %this.w6fired = 0;
        %this.w7hit = 0;
        %this.w7fired = 0;
        %this.w8hit = 0;
        %this.w8fired = 0;
        %this.w9hit = 0;
        %this.w9fired = 0;

Statistics are collected using a set of “register” functions that are part of the client connection.
For example in game.cs when a player is killed by another player both a death and a kill are registered.

function GameConnection::onDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc)
{
...
        %this.registerDeathAndKill(%sourceClient);

Register functions are defined in common/server/clientConnection.cs.
For example

function GameConnection::registerDeathAndKill(%this, %killer)
{
    %this.deaths += 1;
    %this.updateHUDStats();
    %killer.kills += 1;
    %killer.score += $SCORE_KILL;
    %killer.updateHUDStats();
    echo("register death and kill with clients" SPC %this SPC %killer);
}

Some statistics are immediately sent to the client because they need to appear on the HUD

function GameConnection::updateHUDStats(%this)
{
    commandToClient( %this, 'UpdateHUDStatistics', %this.kills, %this.deaths, %this.flags, %this.score);
}

When a player presses F1, it sents a command to the server to get statistics.
Here in server/commands.cs we process the request.


function serverCmdGetStatistics(%callingClient)
{
    %observers = 0;
    %tank1 = 0;
    %tank2 = 0;
    %tank3 = 0;
    %tank4 = 0;

    // Loop through all the client objects
    for(%i = 0; %i < ClientGroup.getCount(); %i++)
    {
        %client = ClientGroup.getObject(%i);
        %record = %client.team TAB %client.nameBase TAB %client.kills TAB %client.deaths TAB %client.flags TAB %client.suicides TAB %client.teamkills TAB %client.reward TAB %client.score;

        switch (%client.team)
        {
            case 0:
                %observers[%observer] = %record;
                %observer++;

            case 1:
                %tanks1[%tank1] = %record;
                %tank1++;

            case 2:
                %tanks2[%tank2] = %record;
                %tank2++;

            case 3:
                echo(">>> %record" SPC %record);
                %tanks3[%tank3] = %record;
                %tank3++;

            case 4:
                %tanks4[%tank4] = %record;
                %tank4++;

            default:
        }
    }

    // %records = "";
    %rc = 0;
    for (%i = 0; %i < %observers; %i++)
    {
        %records = setRecord(%records, %rc++, %observers[%i]);
    }

    for (%i = 0; %i < %tank1; %i++)
    {
        %records = setRecord(%records, %rc++, %tanks1[%i]);
    }

    for (%i = 0; %i < %tank2; %i++)
    {
        %records = setRecord(%records, %rc++, %tanks2[%i]);
    }

    for (%i = 0; %i < %tank3; %i++)
    {
        %records = setRecord(%records, %rc++, %tanks3[%i]);
    }

    for (%i = 0; %i < %tank4; %i++)
    {
        %records = setRecord(%records, %rc++, %tanks4[%i]);
    }

    echo(">>> Record starts");
    echo(%records);
    commandToClient( %callingClient, 'ShowStatistics', %records);
    echo(">>> Record ends");
}

The statistics are sent to the client where there are displayed in the GUI.

Persistent statistics for now are available from the home page

Next Steps

Next up is messing with managed triggers from Plastic Gems and posting some videos.

More blogging and a new build of 60 Tons, build 0.45

I always found Labor Day better for making New Year resolutions because my life changes significantly with the beaches officially closing and school starting. One of my resolutions this Labor Day is to blog more frequently. It won’t be easy. While I have much to say, finding the time and will to write it down is difficult. But I will strive to publish on a regular basis.

I’m a hobbyist writing a tank game, screenshots here. The idea came to me while playing another tank game called Tanarus which is the biggest influence on my game. There are several reasons I’m writing the game, more on that in future blogs. For now you can play the prototype, it’s buggy and unless you have played Tanarus it will be difficult to figure out how to play. I’m releasing it because I’m a big proponent of test early and often. Actually this is the 45th release of a build but up until now the testers have almost been exclusively Tanarus players.

The game is mostly a cobbling together of Torque resources. So I want to thank everyone that has donated a resource, you should see your name in the credits, if not let me know, I been a little sloppy with the attribution. If you see something you like and want to know how it was done, just ask, I’m more than happy to share.

Enough for now, here is the new build with info
Make sure you hit enter in base to access the inventory and use F12 to access the help. I’ll add newbie tips to the game in future releases.
Thanks!
Joe

*** Version 0.45 ***
** New Features **
New splash screen
2 new building donated by Plastic Gems
Added grandfather clock to each base, another donation from Plastic Gems

** Bug fixes **
center turret command no longer results in shaking

** Known Issues **
alt-f4 will automatically close the game window, need to make this an automatic death, same with any abrupt disconnect
projectiles don’t spawn on screen right away which looks confusing when shooting and moving at same time
Occasionally a collision will cause the game to completely freeze. Just kill the program and rejoin.
The game will halt and shake at times, it is unoptimized
Tank driving through another tank(collision undetected)

Main Menu Background

Treading Water

Well, I haven’t made any improvements since finishing the map contest mission build. I’m working on the windows 98 problem since the GG recommend fix, turn off multithreading and unicode, did not work. Also reading physics for game developers and tracing the processtick engine code. This in preparation for improving the overall tank movement and usability this summer.

After the Contest

Well, I submitted the lastest build to Xin’s map contest. Next up, tank usability, that is tank and turret movement, collision detection and response(physics). It’s a big ticket item, one that I’ve been procastinating on for too long. Of course there will be distractions, I just downloaded the AGEIA PhysX SDK and subscribed to the MMORPG Kit. Lots of fun stuff, never enough time :)

Bug Squash Weekend

This weekend is for fixing bugs, there are far too many. I’ve been adding feature after feature, each one brings it’s share of new bugs. Although I may add the new mission, I’m thinking of rotating the day and night so that when the mission resets, which happens after everyone leaves the game then it will toggle to the other mission. Later of course when I hopefully have a player base then I’ll add the ability to choose which mission to play.

Experiments with the Torque Lighting Kit(TLK)

Started to experiment with TLK after getting build .25 out. Check out the new screen shots of the progress

Pitstop giving off intense light beam

Statistics

Well, I have never been a fan of individual statistics when it comes to team sports. However there is no denying their allure for many players. Prompted by Slick’s database work on Treads I went ahead and added persistence statistics that are accessible via the web. I used Wamp to set up a MySQL database and an Apache web server. Wrote my first PHP scripts and made some simple pages. Which will be activated with the next build. Which I hope to get out today.

.24 is out, what’s next

Ok, finally got .24 out. After releasing I ran into the triple kill problem that sometimes occurs when you kill a tank that is sitting on a pitstop. Sat morning was partially spent debugging it, the problem is caused by a destroyed tank being repaired. The destroyed tank gets a little repair and the game thinks it’s alive again so a subsequent hit causes it to die again. The destroyed tank is not deleted immediately on destruction, it’s a scheduled deletion. Anyway I fixed it by not repairing any tank that is destroyed. The fix will be in the next release, .25.
What else will be in .25? Two big ticket items, database support and Torque Lighting Kit.
Database is inspired by Slick’s Treads where he has added database support. Treads is always a source of motivation in a friendly competitive way. Whenever Slick improves Treads it gives me a kick in the pants to improve 60tons. Then we help test each other’s game, it’s all good.
What is TLK? More on that in my next blog. Stay tuned.

  • fast weight loss diets
  • canada pharmacy online
  • how to controling the appetite
  • parkinson medications
  • australia pet products
  • weight loss doctor online
  • lung cancer treatment
  • buying medicine overseas
  • pills for anxiety
  • dosage fluconazole
  • gout medicine
  • coumadin side effects
  • insomnia and pregnancy
  • treatment for severe edema
  • normal blood pressure
  • cephalexin sinus
  • neurontin withdrawal
  • energy diet aids
  • viagra cialis compare
  • pharmacies that sell phentermine
  • propecia without prescription
  • best hangover remedy
  • chronic back pain relief
  • cialis for women
  • breast growth
  • powerful weight loss
  • description of soma
  • treatment for severe edema
  • viagra to canada
  • pharmacy carisoprodol
  • levothyroxine dogs
  • facts about cholesterol
  • treatment of chest pain
  • free fat burning samples
  • super flu
  • lower your blood pressure
  • arthritis therapy
  • celexa buy
  • cheap tramadol cod
  • celebrex drugs
  • body building info
  • cialis 10
  • cephalexin prescription
  • where to buy stop pain
  • exelon patch
  • buy zovirax
  • generic pain medication
  • safe pain reliever back
  • care of a cat
  • buy zovirax
  • generic xanax cheap
  • body building products
  • drugs without prescription
  • online prep diet pills
  • pharmacy for sale
  • total health care
  • buy cheap tooth whitening product
  • improve sleep
  • scabies itching
  • treating bipolar disorder
  • blood pressure tablet side effects
  • drugs used for high blood pressure
  • health remedies for dogs
  • drugstore online
  • drug viagra
  • pharmacy online
  • bacterial infection remedies
  • anti swelling drugs
  • online pharmacy without prescription
  • natural remedies for constipation
  • acne care
  • klonopin overdose
  • cetirizine drug
  • discount viagra online
  • cheap effexor
  • benadryl dosage
  • cialis cheap cialis online
  • cheap xanax next day delivery
  • anxiety symptoms treatments
  • diet pill rx
  • buy online order viagra
  • treatment of hypertension
  • remove fluid
  • over the counter pain relieve
  • congestive heart failure online
  • pharmacy distributors australia
  • viagra on line
  • diazepam
  • high blood pressure signs and symptoms
  • order flagyl
  • new prescription diet pill
  • generic for ultram
  • treatment of breast cancer
  • care of cat
  • drug viagra
  • treatment scabies
  • blood clot symptoms
  • pharmacy on line
  • skin cancer treatments
  • cure for constipation
  • bone loss treatment
  • cheap weight loss pills
  • side effects of blood pressure tablets
  • what are beta blockers
  • drug smoking stop
  • tramadol high
  • sleep and insomnia
  • skin allergies
  • where to buy viagra on line
  • order viagra online
  • drug for nausea
  • levitra medicine
  • stop smoking support group
  • new weight loss products
  • hiv aids treatment
  • effects of ultram
  • color of viagra
  • drug for nausea
  • anti swelling drugs
  • order medicine from mexico
  • cheap procardia
  • online pain pharmacy
  • echinacea dosage
  • how to take a beta-blocker
  • how to buy pain meds online
  • weight loss diet pills
  • no hangover
  • treatments chlamydia
  • acne prescription
  • treatment of bph
  • klonopin mg dose
  • cheap order buy teeth whitening
  • wellbutrin sr
  • alcoholism pill
  • cholesterol canada
  • xanax by mail
  • cheap online soma
  • chronic back pain relief
  • order alli
  • treatments for diarrhea
  • xanax price
  • online med
  • top diet products
  • diet pill prescription
  • dog help being healthy
  • social anxiety disorder treatment
  • adhd toddlers
  • wholesale skin care
  • order chlamydia medicine
  • male stamina
  • weight loss doctor
  • cialis 5mg cheap
  • jellys sildenafil
  • child diabetes
  • free parasites remover
  • reducing high blood pressure
  • more sperm
  • migraine cures
  • finasteride dosage
  • effective acne products
  • weight loss ideas
  • drug free high blood pressure help
  • flu
  • drug information loss weight
  • symptoms high blood pressure
  • back pain relief product
  • rheumatoid arthritis treatments
  • phentermine with no prescription
  • cialis and blood pressure
  • overdose klonopin
  • natural chronic pain relief
  • medicines for diabetes
  • natural help sleeping
  • blood pressure medicines
  • free phentermine
  • body building training
  • online discount pharmacy
  • order propecia online
  • medication for diabetes
  • lowering cholesterol naturally
  • zyprexa 5mg
  • edema
  • natural cure constipation
  • arm and upper back pain
  • diet drugs online
  • hypertension
  • pharmacy distributors australia
  • dietary supplements
  • medication for myasthenia gravis
  • cat anxiety
  • online prescription drug
  • drugstore online
  • tramadol without a prescription
  • discount canadian pharmacy
  • parasite cleanser
  • discount medicine
  • parasite treatment
  • dog ear cleaning
  • us hiv treatment guidelines
  • diet drugs without prescriptions