Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / Dr Tank's World of Tanks

Author
Message
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 23rd Sep 2010 00:52 Edited at: 24th Sep 2010 19:52
PLEASE SEE LAST POST FOR MOST RECENT VERSION

ORIGINAL POST

Recently I have been mostly tinkering with tanks.

Here's a modified version of a tank game I entered into a coding challenge a few years ago. Project folder is attached in a rar. [SINCE REMOVED] Sorry for messy coding. If you want to see a neat snippet of how to do something then please ask.



What's new is that it uses a shader for lights and shadows. There's a directional "sun" light and 4 point lights all casting shadows. The directional shadow map is drawn each frame and uses a specially modified camera matrix using a modified version of Dmitry's ortho camera code. Point lights have cube shadow maps that are drawn when explosions occur.

How to Play
Player 1 uses WASD, RTY
Player 2 uses Arrow Keys and Numeric pad 123

Kill the other player before they kill you and you win the round. Repeat until someone gets bored!

Future Work
I have been toying with more shader effects. Previous versions had normal mapping, and the directional light projected a scrolling cloud texture, but I ran into problems, possibly instruction count limit. I also have ideas to optimise. A work in progress.

This version plays exactly as was before. Collision system and mechanics is primitive. Have a better collision system but it does not yet have pleasing controls. I'm going to add controller support, and will look into making this online. I have no experience in the latter and it may take some time.[i]
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 23rd Sep 2010 13:44
The lighting looks very cool, but to be honest, I personally prefer the graphical style that appears when I press the 1-key (I presume that's the shadowmap?). However, maybe that is just because I'm fan of 2D-games and alternative looks.

The gameplay seems a bit slow, but still fun as long as you find a friend to play with (I didn't), even though key conflicts might lead to frustration in some cases.

I like the simple idea and realization, but faster pacing and a less usual look would improve the game's appeal significantly, if you ask me.

Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 23rd Sep 2010 15:12
Thanks for the feedback. Yes that's the image for the directional light shadow map. I shall add in a view like that as an option. Will move HUD stuff to side.

The game is slow I agree. The framerate is lower than the original because of the complex shader. If I can't make it faster, will have to adjust the physics. Really I should decouple the game physics from the display update but that's a larger job.

I'll post up a faster version with camera option within a few days.
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 24th Sep 2010 19:47 Edited at: 27th Sep 2010 00:22
Demo 3

Demo 3a. Hosted on MediaFire.

Demo 3. Hosted on Megaupload



Changes

Game is slightly faster. Capped to 35 fps instead of 30. Shader has 2 point lights instead of 4 now.

Camera options are available. Press keys 2-4. 2=skewed orthographic cam, 3=perspective cam, 4=perspective cam looking straight down.

Press keys 7-9 to change aspect. By default the game assumes you have selected a "correct" display mode for your monitor, and that pixels are square. This can be overridden for 4:3 or 16:9 monitors.

Display (armour, ammo etc) has been improved. Text was made with Cooltext, which i recommend highly.

Sounds have been added.

Version 3a: slight speed improvement. can toggle framerate cap with "c" key.

Future Work

*controller support

After that I want to do a number of things, but feel that it might be more efficient to rewrite than to shoehorn stuff into the old engine:

*Better collisions/mechanics. Probably using 3rd party system.
*Better system than capping sync rate
*Menu
*Choice of tanks, arenas (like a fighting game)
*Finite rounds
*Online multiplayer

This will require extensive work. May upload another demo with more speed, control options soon, but the other stuff will take longer. I will make a simpler online game first.
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 25th Sep 2010 04:21
Really cool explosion effect. Needs some camera shack to give it some real flare(har har).

Couple things:
1) This...
2) I felt it hard to aim and steer at the same time. Maybe set the turret to only turn when you hit r or t instead of turning with the body when driving.
3) Need some graphics want anything?
4) music!

The powerups are really cool. Though the bouncing rockets, after one bounce could hit me...Otherwise I think they bounce too many times. Maybe limit it to 2-3 bounces and increase them if you grab more powerups.

Homing missile was not very helpful Sorry, maybe if the arenas were larger it would work better.

Ah, and the blue laser was awesome.

Hope to see some updates, later.


"...space is where I'll fight and where I'll die."
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 25th Sep 2010 05:49 Edited at: 25th Sep 2010 06:11
Quote: "Really cool explosion effect. Needs some camera shack to give it some real flare(har har).
"

Good idea. Maybe I'll reserve that for tactical nuke or some other mega powerup (that's not in the game yet BTW )

Quote: "1) This..."

Whoops. The name isn't really fixed yet. The old game was called "High Noon". Maybe I should keep that. Kind of goes with the six-shooter ammo thing. I hope WB doesn't come after me for using Mortal Kombat sound FX BTW.

Quote: "2) I felt it hard to aim and steer at the same time. Maybe set the turret to only turn when you hit r or t instead of turning with the body when driving."

I'm still undecided on this. In a way maybe your way is better, since tank turrets are gyroscopically stabilised and stuff. On the other hand, having it coupled like it is makes for some skill- you can turn the turret faster if you turn the body too. Will give this some more thought. Will put in a toggle switch for this system in next version so you can try it out.

Quote: "3) Need some graphics want anything?"

Thanks dude that would be awesome! The "full" game is a long way off, requiring quite a bit of learning, rewriting etc, but if you're in the mood to make a tank and/or some arena stuff, I can throw that into this WIP to make it look spankier.

The tank is supposed to look a bit like a Leopard 2A6. Looking at the low poly cars you made recently, I reckon you could make a badass tank. I'm going for a kind of realistic/cartoony/oldskool vibe. I mean, the proportions and overall shape are realistic, but the texture can be bold and cartoony, and detail is low. (although poly count doesn't need to be low- smooth cylinders and stuff are good). Could get away with one texture and just change hue/saturation to get a number of skins.

With the current (rubbish) collision system, the arena objects are aligned rectangles, and the tanks are rectangular. The arena blocks and walls should look pretty indestructible, because they are. Although blocks should be rectangular at ground/turret level, above this they don't have to be. However, high vertical walls should be avoided because they can obscure stuff. This could be concrete blocks, or maybe piles of scrapped cars, shipping containers, ruined buildings etc. Perhaps you can ponder on this. Just one good looking block/wall set would go a long way.

I will make up a dev document, throw together some reference pictures. In about a week.

The final game should have an engine with more flexibility, and support arbitrary arena models, and perhaps some moveable and destructable scenery. Also I want to have a selection of tanks (leopard, black eagle etc. Maybe some non MBTs too!), each with two or more skins, but as I say, I don't have a solid idea of how long it will take. When the time comes, if you feel like partnering up that would make me super happy.

BTW i see you made some chess pieces. I might try making a chess sandbox first to learn how to do online.

Quote: "4) music!"

I should think about this fo sho.

Quote: "Homing missile was not very helpful Sorry, maybe if the arenas were larger it would work better."

It's not really a very missiley homing missile. It's just a shot that turns towards you opponent at a fixed rate. Means you can shoot a little inaccurately and still hit, and sometimes shoot around corners.

I can't wait to make this online and find out which weapons are broken and which are rubbish and stuff.

Quote: "Ah, and the blue laser was awesome."

Satellite strike is my fave too. Maybe it should take off 2 armour blocks.
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 25th Sep 2010 06:12 Edited at: 25th Sep 2010 06:13
Heh, sounds good, I can wip up a tank model and wall model for you and see if you like it. I'm thinking a more Borderlands look actually, what do you think?

Also, an idea for the controls, ever though of using the mouse? The turret always faces the cursor, and you move normally with wasd? I guess it be impossible for two player/same computer games, but it may work for single and multiplayer. Not sure how you'll go with that, honestly I didn't have anyone to play with at my house, so killing myself was hard and hand cramping.

When you get a design doc done send me an email. AH, and the last time I had you email me, I was going to send you some models for your previous shooting game but for some reason I forgot(*facepalm). Will get those to you too.

Look for some tank models in the next few days, maybe tomorrow.

Edit: As for the chess pieces, let me re-organize those for you. I think I actually just put up a download with an entire compile instead of individual pieces... I'll check.


"...space is where I'll fight and where I'll die."
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 25th Sep 2010 06:35 Edited at: 25th Sep 2010 06:38
Quote: "Heh, sounds good, I can wip up a tank model and wall model for you and see if you like it. I'm thinking a more Borderlands look actually, what do you think?"

Sweet. Not sure exactly what you mean, but Borderlands is a good looking game. The textures look kind of clean and dirty at the same time.

Quote: "Also, an idea for the controls, ever though of using the mouse? The turret always faces the cursor, and you move normally with wasd? I guess it be impossible for two player/same computer games, but it may work for single and multiplayer. Not sure how you'll go with that, honestly I didn't have anyone to play with at my house, so killing myself was hard and hand cramping. "

It's something to think about. Certainly mouse + wasd / arrows is a good control system. You'd get exact aiming, and could have weapons that were directed at a point, rather than in a direction.

However, it would make mouse the only option for somebody who wanted to win. I guess it's something that can be decided later. Once I have an engine it would be fairly trivial to make 2 versions. The mousey version could have humanoid characters too.

Quote: "When you get a design doc done send me an email. AH, and the last time I had you email me, I was going to send you some models for your previous shooting game but for some reason I forgot(*facepalm). Will get those to you too.

Look for some tank models in the next few days, maybe tomorrow. "

Nice! I look forward to seeing them.

Quote: "Edit: As for the chess pieces, let me re-organize those for you. I think I actually just put up a download with an entire compile instead of individual pieces... I'll check."

Nice one. Thanks.
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 25th Sep 2010 06:46
Started the tank, few questions, do you want the treads a separate mesh so you can scroll the texture? Also, I assume the main body and turret are separate mesh's, or limbs?


"...space is where I'll fight and where I'll die."
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 25th Sep 2010 14:38 Edited at: 25th Sep 2010 14:41
As the game is, scrolling treads will not be visible. In the long run it's a cool thing to have. If you do put them in, independent left/right would be great.

Currently three .x files are loaded (turret "tturr.x", body "tbody.x", and tracks "ttracks.x"). The body and tracks are only separate so I can make them different colours.

I imagine you can load the .x files in the "models" folder to see what size/orientation/proportion they are. (For example you can import .x into ms3d) Then you can easily replace these models in your folder and test it out.

I think it's good to stick with separate models. Gives flexibility to do things like blow off the turret.
Quel
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 26th Sep 2010 21:02
Megaupload source has been unavailable for more than a day now, please do something...
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 27th Sep 2010 00:29
Quote: "Megaupload source has been unavailable for more than a day now, please do something... "


I uploaded the demo to MediaFire, and also attach it here. Speed on this one is slightly faster, assuming your computer is as good or better than my one. Can toggle framerate cap with "c" key.

Next up making a demo of decoupled game logic/display that will use in this project. Amongst other things will be able to easily tweak the speed of this without having to change sync rate, or worrying about mechanics messing up.

Attachments

Login to view attachments
Quel
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 27th Sep 2010 10:11
I just wanted to suggest the decoupling

My laptop is a cr*p-piece, but the previous version was... 'running'... okay, let's say walking. So if this new one is faster, it may be fine now.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 27th Sep 2010 19:56
Pretty cool I like the lighting and stuff, and the gameplay is fine as it is

Suggestions I could make are:

-More players
-AI controlled players
-speed boost power up
-Explosions have a splash radius
-teams?
-music
-menu

Hope to see more!

TheComet

Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 28th Sep 2010 02:24
Thanks guys.

Quote: "My laptop is a cr*p-piece, but the previous version was... 'running'... okay, let's say walking. So if this new one is faster, it may be fine now."

It's good that it isn't too slow, but in addition to trying to make the code faster, I shall provide the option to run at below desktop resolution. I kind of figured my PC was so old that if it ran something, anything could, but it is a desktop and the graphics card is the second newest bit on it. Thanks for the heads up!

Quote: "
-More players
-teams?
-music
-menu"

This stuff is all planned, but first thing is to get simple online working, along with overhauling the game mechanics. 1st online version is planned to be 1 on 1, but will code engine with scope for arbitrary numbers of players.

Quote: "
-AI controlled players
"

At the bottom of my to do list, because it's hella hard to do, and if I can get online working well then it won't be required.

For times when there's noone to play, maybe a practice mode shooting targets would be an idea, but decent AI for this is a big job.

Quote: "
-Explosions have a splash radius
-speed boost power up
"

Not bad ideas!
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 1st Oct 2010 04:21 Edited at: 2nd Oct 2010 04:20
Have done some speed testing. Seems game speed is almost totally dictated by drawing the graphics. For better speed can just run display at below desktop resolution. 3/4 resolution renders about half the pixels, and maximum framerate doubles.

Been playing with online commands.

Have a test program using DBP's standard multiplayer commands that can exchange messages and stuff. Running two instances on my computer.

Have simulated input lag in this game. Seems to play OK with delay of 0.2s, which I hear is typical ping, but any more and it gets nasty. Seems this is on the border of being workable without doing too much fancy stuff like future prediction. One cool thing am going to do is have it run symmetrically, with the game logic calculated on both computers. This should about halve the lag, and mean that very little data is sent (just inputs).

Update: Test program now synchronises and keeps synchronised a game timer, buffers and sends inputs. It's a bit thrown together but seems to work OK! Have managed to connect to another computer on the same router. Next to refine it and test connecting to another computer via the internet. Quite exciting - could be playing online tanks against you guys fairly soon!

BTW is it worth trying out MultiSync for this? Standard DBP multiplayer commands seem adequate, but performing checklist for connections, joining game and stuff are pretty slow. Not sure if this will be better with Multisync or whether it's just a fundamental limit thing.

When I have a more refined test prog I'll try and get some people here to help me run some tests.
vortech
14
Years of Service
User Offline
Joined: 18th Mar 2010
Location: Finland
Posted: 7th Oct 2010 15:04
For turret you could make it mouse controlled too. So you can choose wich one you want.


Check for pure horror.
And Now with real demo.
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 10th Nov 2010 20:30
Quote: "For turret you could make it mouse controlled too. So you can choose wich one you want."

This was suggested earlier in the thread. It would allow for exact aiming which would make keyboard turret controls obsolete, and part of the fun of this game as is is the way the turret rotates.

However I definitely do want to do a mouse and keys top-down style game at some point. You could have different weapons for each mouse button, and aim for your explosive shells, grenades or whatever to explode at a defined distance. A game like this could be awesome!

This project is on the backburner. I'm working on another 2 player game (Gravity Force 2 Clone) that I want to make online: I'm at about the same stage with that as I am with this project, in that it's mostly done apart from menus (boring!) and online. Once I get online working on that I may come back to this. I'll see how I feel then!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 10th Nov 2010 22:34
This is excellent!! Well done!

Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 13th Nov 2010 00:06
Thanks dude.
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 14th Nov 2010 17:32
Interesting, but the name is.. well, exactly the same as THIS World of Tanks, which is an online Third Person Shooter with tanks instead of characters.

Figured I should let you know.

Back from the dead!
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 14th Nov 2010 19:00
Josh gave me a heads up about this earlier. I might change the name to "Dr Tank's Modern Armour Extreme Battle Simulator".
Eminent
13
Years of Service
User Offline
Joined: 15th Jul 2010
Location:
Posted: 14th Nov 2010 19:09
Thats extremely long.


Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 14th Nov 2010 19:16
It's OK you can abbreviate it to DTMAEBS, which is catchy.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 14th Nov 2010 19:25
This is really cool, nice work!

Eminent
13
Years of Service
User Offline
Joined: 15th Jul 2010
Location:
Posted: 14th Nov 2010 19:27
How bout DTMABES(You can actually say that instead of just saying the letters):
Dr Tanks Modern Armour Battle Extreme Sim.


Crazy Acorn
15
Years of Service
User Offline
Joined: 16th Mar 2009
Location: Stalking people...
Posted: 15th Nov 2010 03:21 Edited at: 15th Nov 2010 03:24
I would give this game an 9/10 But thats good in my book!!!

Suggestions
1. I may have an Idea about how to make shooting easier. You could just make "mouse 1" fire and the mouse your pointer?? But the controls for moving are perfect!
2. Lets see about getting the tanks textured.
3. The bullets and heath could also be textured otherwise this game is AWESOME!!!!!!!!
4. Maybe some different ammo?? Like (flamethrower,grenades,mines?)

Login to post a reply

Server time is: 2024-04-20 14:43:55
Your offset time is: 2024-04-20 14:43:55