Tag Info

Hot answers tagged

22

You don't want to sync the positions of all the units from the server to each client; that will take up way more bandwidth than you need. You'd also have to deal with interpolating/extrapolating unit positions, etc. Almost no professional RTS's use client/server! Instead, you want to send only the players' commands. Rather than moving the units ...


15

Assets like these can be created in any 3D package. They are imported into a game by pre-rendering the models at specified angles, using orthographic projection in the viewport. The pixel effect probably is a side-effect of rendering at a low resolution with little or no anti-aliasing. The spritesheets generated by these will be ordered in such a way that ...


13

I've made a TCP-networked RTS, in which I passed the commands themselves, rather than the results of the commands. For instance, a player gives a move order. If the move order is valid according to that client, it is sent to the server. The server then sends it back to all clients, who validate and execute it. So all client machines run the game ...


12

I worked on Roller Coaster Tycoon 3, and I think it's a good game! In fact bar that extra dimension that gives you the ability to ride your amazing roller coaster creations, it's pretty similar to RCT2. When developing, we lifted as many decisions as possible from the RCT2 codebase, because why re-invent the wheel, right? Maybe you just miss the ...


12

It's common for the client to implement some sort of feedback to let the player know immediately that their chosen action has been registered, eg.: interface sound (eg. button click) in-world sound (eg. a character saying, "At once, commander") animation (eg. begin swinging a sword) These can take place while the information is travelling to the server ...


11

There is actually a pretty nice article about this over at Gamasutra. And covers topics like formations and resolving collisions: And another article from them on the same topic, which is a bit shorter but has more pseudo code examples: Finally, a nifty thing to think about when implementing your system is the idea of a "Flow Field" Supreme Commander 2 ...


10

Look into bounding volume hierarchies (BVH). They're most commonly used in collision detection to reduce the number of checks needed when calculating collisions or in rendering to perform frustum culling on objects. Since you're already using spheres, I'd suggest a sphere-tree though other volumes such as AABBs may be more efficient. I'm not sure what sort ...


10

You should add more information about how you are implementing the game, but here are a few sugestions: Keep a bitmap of the whole map, each time a new area is explored just flip the corresponding bits as they become visible. You can do the same for the revealed area. Enemy units are drawn only if they are in the revealed area. You'll need to keep a 'last ...


10

Rule number one of multithreading: Don't even think about it, unless you really need to use multiple CPU cores for performance reasons*. Multithreading opens up a whole can of worms of obscure and impossible to reproduce bugs: Race conditions! Because you have no control over the thread scheduling of the OS, you have no control over the order in which ...


9

I agree with Petr: There is no set way to do it. How you want to do it is a matter of how you want to design your game. In this circumstance, however, I think it's immediately obvious the sort of mechanic you're trying to get at: you just want things to produce as fast as possible, within the amount of mass you have available. Producing within capacity ...


9

Glenn in his article and comments gives a very strong case for using UDP over TCP, but SC2 obviously uses TCP. Glenn mostly talks about physics-driven games, ie. first person shooters and driving games. These have different requirements to real time strategy games where precise unit positions at every logic step are important. So the communications ...


9

You can add a simple attribute to each tile that specifies its level. So for example: tileA.layer = 0 // Will be at the bottom tileB.layer = 1 // Will be above level 0, on top of it. // Add tiles to layered list List<List<Tile>> tiles = new List<List<Tile>>(); tiles[0].add(tileA); tiles[1].add(tileB); // Draw 'em in the right ...


8

Yes, there is. It's called Robocode, and you basically program your own bot in Java, and fight with other people. You can battle against other AI bots, or play multiplayer over the Internet. Here's the link to their homepage: http://robocode.sourceforge.net/.


7

Glest, especially MegaGlest and the Glest Advanced Engine (forums) Its a classic RTS engine that is fairly straightforward to 'mod' and add 'factions' using 3D models and XML files to define the unit attributes. It can be used as a basis for 'total conversions' and the code-base is accessible enough to add specific features. It may be that you don't ...


7

Personally, I would recommend Unity. In comparison to Torque I've been able to get basic proofs-of-concepts running far faster than before. (Of course, there is a bit of bias as I was far younger when experimenting with Torque) But in general, it's been a far more pleasing experience to work with. Also in comparison to what I remember from the community at ...


7

You'll basically have to create a third dimension, though in the simplest case it can consist of just two values: "on ground/on bridge" and "on water/below bridge". An inspiration can be found in the way Advanced Strategic Command does it: Units occupy a specific height level, can only move around on height levels fitting to their type unless there are ...


7

Create a grid with enough spaces for all the units you want to "unclutter", have them each choose the nearest unclaimed grid space. Then have them move towards their respective grid space. This will move them into something like a formation, where the player can easily select an individual unit. That's an O(N) operation with pretty good results.


6

I suspect part of it is that low-fidelity graphics engages your brain more than high-fidelity graphics. Your brain works harder to fill in the blanks, you become less a passive consumer and more a co-creator of the experience. It's like the difference between reading a book and watching a movie. Scott Cloud in Understanding Comics talks about how ...


6

A google search for "rts engine schematics" turns up a few relevant hits. ORTS: http://skatgame.net/mburo/orts/orts.html doxygen documentation for that over here: http://skatgame.net/mburo/orts/doxygen/html/ Stratagus: http://stratagus.sourceforge.net/ http://stratagus.sourceforge.net/download.shtml These might not necessarily be the best examples ...


6

Ok, currently there's 4 major options for browser based games. Java - Revived mostly due to Minecraft and Android, Java requires a plugin with about 75% market penetration (source). It's also a fairly complicated language that really isn't suited for first time programmers. There's advantages to using it, but it's probably not the best option. Unity - ...


6

Although I like Jonathan Hobbs' answer I think a queue system is even simpler: Queue<Factory> queue = ...; int numFactories = ...; Update() { int resources = GetAllResourcesForThisStep(); for(int i = 0; i < numFactories; i++) { if(queue.Peak().RequiredResources <= resources) { Factory f = queue.Pop(); ...


6

The main thing to remember when dealing with an RTS game is that collision detection isn’t the same kind of animal it is in a FPS. The game, not the player, determines if a unit actually hits its target, so you’re not worrying about things like "If a shot goes between his legs, how do we know it didn’t hit him?" but rather "we decided that he hit him, so ...


6

Balancing is really an art form, but it comes down to balancing rock vs paper vs scissors, meaning that in-general rock should beat scissors, scissors should beat paper, and paper should beat rock. How easily rock defeats paper can be dependent upon other advantages and disadvantages of buying a rock, such as how it fares against a paperclip or a tree, how ...


6

Random thoughts: cheat: use rockets. Rockets explode in a radius, hiding any weirdness. cheat: predetermine the outcome and force the condition to happen visually cheat: attacks take time, hide latency in the atk+anim+result discontinuity cheat: disconnect local feedback from the networking stuff cheat: lots of VFX or screen activity that covers any ...


5

I believe what you are looking for is the Broodwar API (BWAPI). Although not an official SDK, it pretty much allows you to do anything in Starcraft: Brood War. It even has a yearly competition supported by Blizzard. PS If you decide to use it, don't forget to check out two very important extensions: The BWAPI Standard Add-on Library (BWSAL) The Broodwar ...


5

First of all, if you don't want to worry about other aspects EXCEPT graphics (physics, etc), forget about using Ogre. It's a graphics engine, not a game engine. Unity has all of the aspects that you want already in there and can offer you a quick turnaround time. The UDK is a good one, but it does involve a bit more work to get up and running before you ...


5

You could read some Gamasutra features. That's usually a good source of information, from people that actually ship games: The Design of StarCraft II StarCraft II: Building On The Beta 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond Successful Playtesting In Swords & Soldiers Postmortem: Ronimo Games' Swords & Soldiers The ...


5

For example, let's say it's tick 1000 and player 1 sends a message saying that he is going to start attacking player 2 at tick 1002. That's not how it works. What is sent is what player 1's controls do. Click on location, drag to here, pressed key X, whatever. You don't send specific game state like "is attacking". The idea being that, as long as ...


5

I am developing a similar supply system in my own game, so I have also been thinking about how to resolve the supply-lock issue, and favoritism. To illustrate the problem, I'll create a simple example: If you have a list: [producer1, consumer1, consumer2, consumer3] and you update in order, starting at supply = 0, you'll get this: producer1 produces 5 ...


5

I happen to have some of that code handy. I created this direct drawing code for some 2D HUD type stuff. However, you should be able to easily convert it to store vertices and/or extend it to 3D. It takes a center as the pointy end and a start degree and end degree for how wide to span. Additionally, there's a sides parameter that will set the number of ...



Only top voted, non community-wiki answers of a minimum length are eligible