Tag Info

Hot answers tagged

23

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 ...


16

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 ...


13

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 ...


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 ...


11

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 ...


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

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

Spring RTS engine looks very nice. Stratagus is another option. Both the above came from the search 'c++ RTS engine'.


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/.


8

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.


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

Balance (usually symmetry) so that you don't get an unfair advantage by a random spawn point Allied to this is having a big enough map with enough different start points so that there is an element of FUD at the beginning of the game: 'Where is he?', and the chance to use different strategies such as redeploying bases. It is fine to have a couple of ...


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

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 - ...


7

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 ...


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 ...


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

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

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

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

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

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

Your question was vague, but the answer to both interpretations could be simple. Heres some pseudo code: vec2 original_xy = get_mouse_position(); vec2 new_xy; while (get_mouse_click_state() == MOUSE_DOWN) { new_xy = get_mouse_position(); render_box(original_xy, new_xy); ... context_swap_buffers(); } vec2 a = ...



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