• Welcome to Dark Bit Factory & Gravity.
 

Lunar/Martian Rover Tank battle

Started by combatking0, March 27, 2007

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

combatking0

Another project I'll start (but probably not finish) is an online version of the tank portion of Atari Combat on the 2600.

Players get to build a tank, and then program it every 20 seconds during a battle.
It will be turn based, but it's going to be great!
You are our 9001st visitor.
Challenge Trophies Won:

Shockwave

What are you going to write this in CK? I remember the original, it was good fun :)
Shockwave ^ Codigos
Challenge Trophies Won:

benny!

And, try to keep it simple but try to finish your project. There is a vast difference
between starting a project and finishing it ( I guess you know ). But finishing a
project is really satisfying ... so I would keep the outline of the game in the be-
ginning as small as possible so that it gets easier to achieve that ...

Anyway, good luck with it ...
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

combatking0

It will be a mix of PHP, MYSQL and JavaScript.

Getting the JavaScript to work exactly the same on different platforms (as it calculates the velocity/position of everything on each user's machine independantly, so a difference of 0.000001 could mean the difference between a collision being detected or not on one machine, and not on another during the same battle) is going to be the most tricky problem.

I could assign one client as the master, which would send the results of all of the calculations to the server, which then pushes them out to the other clients.

The gameplay will revolve around sending a series of commands to the tank, for example
f10;r+45;s1;
could mean
Foreward for ten seconds; Rotate 45 degrees clockwise; Shoot weapon one;

besides the basic battles, there could be flag capture, tank football, etc, but I'll get the basic game working first.
You are our 9001st visitor.
Challenge Trophies Won:

Paul

I never played the original but it sounds like a good idea, as Benny said keep it simple, at least at fires so it gets done. I know the feeling of having many unfinished projects :)
I will bite you - http://s5.bitefight.se/c.php?uid=31059
Challenge Trophies Won:

benny!

@combatking0:

Didn't know the original game either. Nevertheless, it sounds very interesting.

About the JavaScript part working the same on different platforms I am a bit
confused. Don't have any information that there exists differences. Do you
have any certain information about this ?

Nevertheless, I am of course willing to help / test the scripts on my platform
for testing reasons.

Keep us informed how the game evolves ...
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Clanky

Sounds Nice!

Good luck with it all. If you need testing, you know where the crew are to do it for you!!! hahaha.
He tilts, and his eyes are focused on the ground far below.. Wind? Angels? Men..

combatking0

@benny

Unfortunately different browsers handle JS slightly differently.

I'd like to see how different the results would be for users of Windows:MSIE, Windows:FireFox, Mac:MSIE and Mac:Safari

I'll try to avoid mobile platforms, as the game will require a "large" minimum screen resolution of at least 640 by 512 pixles.
You are our 9001st visitor.
Challenge Trophies Won:

combatking0

#8
The following will test the tank game movement system.

Please may users of non Windows XP with MSIE 6 test this on their browsers and see what happens.
Simply unzip it, open the index.htm file, and click on the tank.

I have the facilities to test it under WinXP+MSIE 6, WinXP+MSIE 7, WinXP+FireFox, MacOSX+Safari and MacOSX+MSIE (not sure of the version on the Mac browsers).

Please reply with any error messages you get.

[edit]
I have added the first of the command features to the game - I'll post the new version shortly
[/edit]
You are our 9001st visitor.
Challenge Trophies Won:

benny!

Sorry. I am with XP, too ... cant help here!
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

combatking0

Tests complete:
WinXP+MSIE6 - working
WinXP+FireFox - working
MacOSX10.4+Safari - working

Tests not performed:
WinXP+MSIE7
Any other combination of OS and browser version not listed above

It turns out that MSIE is no longer available for Mac OS, so I won't be supporting it.
You are our 9001st visitor.
Challenge Trophies Won:

Paul

Works on win 2000 with
firefox 2.0.0.3
opera 9.02
and internet explorer 9.0.2600.0000IS
I will bite you - http://s5.bitefight.se/c.php?uid=31059
Challenge Trophies Won:

combatking0

#12
Thanks for testing everyone.

I have made a few changes, and now it supports foreward movement and rotation.

To make the tank move, type f followed by the number of seconds you want it to move.
To make it rotate, type r followed by the number of degrees you want it to rotate by (limited to between -180 and 180).

You may type in multiple commands if you seperate them with a ; symbol.
DO NOT USE SPACES as JavaScript appears to lack the trim command, so I'll work that one out when it comes to using PHP with it.

example:
r-20;f3;r50;f2

All other commands will be ignored. All commands are case sensitive, so F5 won't work, but f5 will.

Once you have typed in your commands, click on the Transmit button.
Transmission will be automatic in the final version - you'll see a countdown instead of this.
I have a feeling tha tanks will be smaller too.
You are our 9001st visitor.
Challenge Trophies Won:

combatking0

I have just tested the new version on Safari, and there's a minor display problem.
Other than that, it's still OK.
You are our 9001st visitor.
Challenge Trophies Won:

benny!

That sounds good, CombatKing0.

I think I got the idea now of this game - I am really looking forward to see it
in action and to play it live versus some other player via the internet !!!
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Shockwave

That we will be able to play against each other makes this cool.
It works well here btw.. Only suggestion I'd make is that I don't really like the clunky rotations of the sprite. a 2D vector would be much better, the forumla is easy.


XR = COS (THETA) * X1 - SIN (THETA) * Y1
YR = COS (THETA) * Y1 + SIN (THETA) * X1
Shockwave ^ Codigos
Challenge Trophies Won:

benny!

@SW:

Hmm ... drawing lines with JavaScript is not that easy IMHO. At least it is
not supported natively in JS. Hmm ... SVG or the following libs would come
to my mind :

http://www.c-point.com/javascript_vector_draw.htm

http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

combatking0

PHP supports drawing lines and other stuff, so in theory, I could run a load of images of tanks off (180 of them all facing different directions) using a PHP batch process.
Because the results will be GIFs, the total of up to 1440 images between 8 players shouldn't take too long to preload.

The images in use currently have been drawn in a graphic editor program.

I'll have to find a more reliable host for it first, but I could run the test versions from right here at work.
You are our 9001st visitor.
Challenge Trophies Won:

Shockwave

Cool. The tanks would look much better smoothly rotating, it will fit in perfectly with the smooth movement of the tanks.
Shockwave ^ Codigos
Challenge Trophies Won:

combatking0

I have had a go, but the first tank drawn is visible under the second tank, and the first two under the third, etc.

I'll have to find a way to blank the image each time a new tank is drawn.
You are our 9001st visitor.
Challenge Trophies Won: