Total Pageviews

Thursday, September 15, 2011

Let's say I use unreal to make my RTS what do i need?

Gliese 581 is a building and gathering RTS where you can use micro management to defeat your ennemies.

In a classic game, you may win by:

  1. Destroying your ennemie(s) (Victory)
  2. Controlling more than 70% of the Map (territorial victory)
  3. Having researched the 4 the last possible researchs (technological victory) 
  4. Being allied to everyone else (allied victory)

Destroying your ennemie(s)
  • It's rather easy to do, you simply check in the building vector of an opposite player.
    • If no buildings are left you win

Territorial Victory
  • Territory is pretty hard to calculate since it has alot of factors playing into it
    • Buildings near the edge of your territory or in a neutral zone will create a radius of territory around it.
    • Tech research will increase the radius around your buildings and your citie(s)
    • Defensive buildings have bigger territorial control radius than normal ones
  • Lorsqu'on calcul l'Aire de la forme par rapport a l'Aire total de la Map on aura son % et si celui-ci dépasse 70% un countdown de 2 minutes commencera afin de laisser la chance a l'autre joueur de réagir si celui-ci n'arrive pas a réduire le territoire de son ennemi, il perd.

Technological Victory
  • When the player has gained the 4 optimal researches he automaticly wins the game
    • The tech tree is separated between
      • Militairy
      • Exploration
      • Science
      • Economy

So far so good, but how can i use unreal to make these conditions?
No real problem there, unreal if flexible enough to allow me to... CODE.

Unreal was essentially created to make first and third person shooters, with the understanding of Kismet you can do alot. BUT most of it all will require the help of a programmer to actually set up what you need. Might aswell code your own freakin engine right? Not necessarely though, unreal does a few great things already, such as Making a fixed camera... great!

Luckily i'm not the only one looking into making an RTS with unreal, and some great minds have made frameworks to allow the basic needs of an RTS such as : Camera, Cursor, Basic Behaviors, Multi-selection, Path finding, Factory and Ressource. And you could probably use the Basic Unreal networking functions to support the network games.

One of the biggest problems i've found so far was recreating the UI. Alot of people actually have to recreate the HUD COMPLETLY to make it work properly. Which means alot of extra coding to reinvent the wheel. if we could use the basic UTUI (it's the UT menu when you press esc) and modify it to fit our desires such as always taking a certain portion of the screen, and react only when a hotkey OR the mouse is inside the UI for nice to have effects on buttons and such, like highlighting and whatnot it'd make it alot easier to interact with the UI. HELL! it'd be thrilled to see a UI creator for unreal incorporated in UDK. Not having to rely on flash and with the basic functions. For example in Jdev (a compiler and programming tool to code in java) there's a node where you can design your own interface. create buttons, name them, areas for text etc etc then in the code you'd just have to get the name of the button and use a function accordingly. 

Pathfinding on the other hand probably wouldn't be so bad, i mean using the basic pathnodes well placed in the map, we'd just need to assign a pathnode to the destination and tell the unit(s) to move towards that destination... problem is, you need to recreate the paths every single time =/. Which i doubt is possible... maybe with a navigation mesh it'd be alot easier where you can't go where objects are, the problem is you still have to determine if there's an object in the way and if so tell the unit to either move around or stop.

Timers and clock aren't a problem, they're very easy to do. They are already incorporated...

Multi-selection, unfortunatly you can't even select in unreal from base so you'd have to rework the framework anyway.

The AI of course would have to be built from scratch... with different mentalities, it's not fun to always play the same AI...

Managing Alliances on the other hand wouldn't be so bad, the biggest problem with them would be having the AI choose weither or not it wants to ally itself with you (if it's beneficial). Setting the alliance would be easy you just need to change the status of ennemy to friendly. You can force the AI to be unfriendly to you and then switch it back to neutral + change the team index and you should be ok.

Creating factories now... it is actually very easy to create new units and building, you can do so even in Kismet with an Actor Factory, considering you have the right actors you can just create it when it's done (after a countdown timer) at a designated spot! Good Job UDK!

1 comment:

  1. for the pathfinding, you should think of it as a net of triangles. The lines that make up these triangles are where the enemies can walk, where you'd put an obstruction (aka, anything above your Z=0 line) the traingles would automatically disappear. obviously it's all coding, but that's more or less how we did it for Imperium :) and the enemies easily found their way around obstacles without many issues. i have no idea if this would even help you, but i figured "why not"

    ReplyDelete