Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 03:01:46 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityJams & EventsCompetitionsOld CompetitionsAssemblee: Part 2Mechwar (aka Battle for Narita) [Completed]
Pages: [1]
Print
Author Topic: Mechwar (aka Battle for Narita) [Completed]  (Read 4885 times)
Treff
Level 0
*


View Profile
« on: January 10, 2010, 08:02:43 PM »



First of all I want to say that this has been a really cool idea for a competition - as a programmer finding a good set of art assets is always the hardest part of the job, and having a hard (short) deadline also really drives the motivation.  I also want to thank dbb for creating the awesome mech set of sprites - they look really good and pretty much inspired this game on their own.

For this competition I was pretty ambitious: I tried to build a complete RTS - including LOS, pathfinding, fog-of-war, collision detection, squad-based tactics, and minimap.  I didn't work on the game over christmas, so the whole thing was built in about 2 weeks of after-hours time.  I was hoping to spend more time on the AI, but it turns out building and debugging things like A* pathfinding and collision detection are time consuming!

Apart from the amazing sprites that dbb created, Mechwar is inspired by Code Geass: Episode 11, where the Black Knights intercept the Britannian army with an epic battle at Narita, and more recently, Avatar, where near the end the Mech's are part of the massive battle at the end, again in deep forest.  I was going to call it something more inspiring, but in the end wasn't feeling very creative and stuck with being literal.  

The central theme of CodeGeass is that Lelouch is a mastermind, who directs his units like chess-pieces, but doesn't control them individually.  I was trying to get the same effect, so made control work at the squad level rather than the unit level.  It's also why you cannot tell units who to attack, but instead need to move them into position.  

Unfortunately I missed being able to finish the other half of the orders: specifying squads formations, engagement rules, follow-up behaviour, target priority, etc.  The goal was to use scouts and other squads as lures, to drag the enemy into ambushes.  It doesn't quite work though atm, because the enemy don't chase you once they engage, they just stick to their current path.  That's something I might fix later (post-competition).

The controls themselves are also un-standard, that was done to support giving more complex orders (which doesn't work).  Unfortunately I didn't have time to come up with a better set, but the in-game instructions should help.

I'm pretty happy with a lot of the features that did make it in though:
  • Squad colours works, and the trees are also resized/tinted to make the forests look interesting,
  • Healthbars transition colour and from translucent to opaque as units take damage,
  • Squads attempt to find a path to the target without walking through trees,
  • Units will automatically attack the nearest enemy with the lowest hp that they can see,
  • Units won't shoot their friends in the back (mostly),
  • Fog of war, group selection, and the minimap work,
  • Performance is great on fast machines and okay on slow machines, even with lots of units and projectiles,
  • The game is fully customisable.

The game comes with 2 xml files, a Scenario document and a Units document.  All units damage types, speed, hp, etc can be edited, and the scenario can also be changed.  You can add melee units to the game, but unfortunately, melee attacks aren't supported (yet).

The whole game has been written in C# .NET, using Tao.OpenGL for the graphics.  It requires .NET version 3.5.  I should be able to re-compile it using Mono for linux/MacOSX, but its not something I've tried yet.  I also used this for the pathfinding and this for the collision detection.

I'm really proud of the technical achievement of the game, Its still pretty fun to play, even if its not quite as complicated/interesting as I was hoping it would be.

Finally, I'm using Courier New (system font).  I wanted to use some of the supplied fonts but my engine doesn't support glyphs and I didn't have time to convert them to font files.  Hopefully that's okay in the rules - I haven't included the font, it runs off the system.

http://www.4shared.com/get/193778199/2e741878/Mechwar.html
« Last Edit: January 10, 2010, 08:31:51 PM by Treff » Logged
J. R. Hill
Level 10
*****

hi


View Profile WWW
« Reply #1 on: January 11, 2010, 11:20:36 AM »

Mann this is hard.  Big Laff
Logged

hi
Treff
Level 0
*


View Profile
« Reply #2 on: January 11, 2010, 02:36:23 PM »

The trick is knowing that scouts are fast, but they die really easy and are a priority target.

Make sure you keep your squads seperate, use the scouts to find the enemy, then pull them back and hit them with your tanks and heavy mechs.  Tanks have 2k HP, mechs have 1.6k HP, and scouts only have 800.

Also make sure that you hit enemies with everything at once rather than piecemeal as your squads arrive, and you'll take much less damage.  It is also important to give your squads some room - rather than piling their waypoints on top of each other.  If they cram up too close, they will block each other's line of sight.

Worst case scenario, give your scouts more HP in the xml file.   Wink
« Last Edit: January 11, 2010, 03:36:58 PM by Treff » Logged
Melly
Level 10
*****


This is how being from "da hood" is like, right?


View Profile
« Reply #3 on: January 11, 2010, 04:34:44 PM »

I played a few scenarios, but things just didn't seem to work. I doubleclicked places but the selected units would often not even move or move to strange locations. The map was completely covered in trees so I couldn't see a thing, and even if I tried new scenarios I'd get a very similar configuration with only few enemies, that were killed soon after I started by my nearby units.

Also, I got a bug:



Sorry for it being in portuguese. Something about modified collections and unexecuted enumeration operations.

I know how hard it is to code an RTS, especially in such a short time, and despite the massive number of trees I like your use of the graphics. I feel all these problems are bugs though, so I'll gladly try again if you manage to fix them.
« Last Edit: January 11, 2010, 06:38:22 PM by Melly » Logged

Feel free to disregard the above.
Games: Minus / Action Escape Kitty
Treff
Level 0
*


View Profile
« Reply #4 on: January 11, 2010, 07:58:57 PM »

Hi Melly, thanks for your post.

I added code (to the original build) that ensures that if you instruct a squad to move where the map is blocked (due to it being in forest) the waypoint is moved to the nearest available clear space, and other code that makes units self-destruct if they become completely trapped (due to a bad spawn).  Normally these aren't a problem, but I can see from your screenshot that instead of generating a normal map, you've been generating maps that look like they are from the Amazon.

The number of trees is controlled by the Xml file "ScenarioDocument.xml".

The interesting line is this one:
Code:
<Scenario Name="DemoScenario" MapWidth="2000" MapHeight="2540" WindowX="450" WindowY="0" TreeDensity="0.1">

That's what it is supposed to look like.  You can change the MapWidth and MapHeight, and adjust the TreeDensity, but around 0.05 to 0.2 is normal.  Give that a try and see if that is the cause.

The exception bug you saw is definitely caused by some bad code triggered off the self-destruct.  It is definitely a symptom of your Amazonian setting.  On my own machine, I set the tree density up to 2 and it caused the same strange behaviour and exception.
« Last Edit: January 11, 2010, 08:08:34 PM by Treff » Logged
Oddball
Level 10
*****


David Williamson


View Profile WWW
« Reply #5 on: January 27, 2010, 08:00:38 AM »

Liked: Very simplistic controls allowed for quick troop manoeuvres. Focus on combat strategy with no resource/research management.

Disliked: No sounds. War should be noisy. There was a lack of map variety.

Conclusion: Strategy games need a lot longer to evaluate than perhaps other genres, so I think you might get the short end of the stick where the voting is concerned. Which is a shame as this looks to have a lot of potential.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic