PDA

View Full Version : Starcraft



xGTx
31-05-2005, 03:52 AM
I'm having trouble deciding... is Starcraft 2D or Isometric? I'm thinking 2D.

WILL
31-05-2005, 04:29 AM
Umm... Isometric is 2D.

cairnswm
31-05-2005, 04:32 AM
Starcraft uses a 2D representation of an isometric view. It does not use a true Isometric view as the tiles are rectangular instead of 'diamond' shaped.

Once I found this out I started working on a similar method of drawing an isometric view. Run-A-War also has this view.

A rectangular shaped tile has a number of advantages
:arrow: easier to code
:arrow: easier to build collision maps
:arrow: easier to work out a z order system that works effectivly

cairnswm
31-05-2005, 04:39 AM
Here is a link confirming what I said above:

http://www.battle.net/scc/faq/other.shtml


Why are Locations square, rather than isometric like the tiles?
The isometric look of StarCraft is achieved in StarEdit by combining square tiles that have isometric image characteristics. For performance and technical reasons, StarCraft maintains terrain internally on a rectangular grid.
The Location Properties dialog can be used to make a location apply only to certain elevations, thereby making it conform to the shape of terrain underneath it.

savage
31-05-2005, 10:22 AM
:arrow: easier to work out a z order system that works effectivly

By Z order do you mean height so that objects can be seen to be flying?

cairnswm
31-05-2005, 06:35 PM
By Z order I mean the order in which the items are drawn (from back to front). If you look carefully at the flying stuff in Starcraft all the flying objects stay at the same height.

savage
31-05-2005, 06:46 PM
By Z order I mean the order in which the items are drawn (from back to front). If you look carefully at the flying stuff in Starcraft all the flying objects stay at the same height.

Never played Starcraft and don't own a copy :(. Screen shot anyone? Do they faked the height then. Do they have variable terrain in SC?

cairnswm
31-05-2005, 07:24 PM
Starcraft uses the flying to seperate land vs flying creatures. Land creatures cant fight flying (except by shooting) so the only distinction is to make it clear that they fly (pretty easily done through the use of shadows).

Starcraft height levels are a bit tricky. If you look at the screen shots there is a clear view of multiple heights in the game yet once you understand the flying thiing (being nothing more than shadows) and then look at the games it can be seen that all the levels are actually only made by the tile look and feel and the fact that the units cant cross the level heights. (You can also see this by watching a flying unit travelling the sides of the height levels and the flying unit never chnages its trajectory - indicating a single level of tiles).

By the way - you can also see this in WarCraft. I havn't played WarCraft 3 much but I think that the height views of it are also just tilebased.

Starcraft is the first and last game that I played through all the scenarios. :shock:

cairnswm
31-05-2005, 07:35 PM
http://www.gamearena.com.au/games/title/pc_starcraft/ssviewer.php?idx=ss02.jpg

http://www.gamearena.com.au/games/title/pc_starcraft/ssviewer.php?idx=ss01.jpg

http://www.gamearena.com.au/games/title/pc_starcraft/ssviewer.php?idx=ss04.jpg

The last one has a few flying objects - Just below the selected cruiser are some smaller planes that clearly show their shadows. Notice that all the flying objects you can see have clear shadows - and all the shadows are equally far below the actual objects.

savage
31-05-2005, 09:44 PM
The reason for my questions is that I am just about to start porting the Siege of Avalon isometric engine over to JEDI-SDL, and I am trying to decide if it is worth doing a straight port or should I try and rewrite it. One of the limiting factors of the engine was that you couldn't really have flying objects. So when we used the engine in the Hero X title, our super heros could not fly. Which probably contributed to lack lustre sales.

briscape
01-06-2005, 02:22 AM
Starcraft is just a TOP-VIEW Game.

cairnswm
01-06-2005, 05:14 AM
Well star craft is probably one of the most successful RTS games of all time. Its flying is very very simplistic but is enough to support the requirements of the game.

Tell us more about the HeroX game.

xGTx
01-06-2005, 05:32 AM
cairnswm: Where did you get the little sprite guys for Run-a-war? And is there anything else you can tell me about this kind of isometric looking drawing? Because I really want to use this for my next project.

cairnswm
01-06-2005, 06:37 AM
All my sprites come from

http://www.reinerstileset.4players.de:1059/englisch.htm

The source for Run A War 1.0 is available for download from my site. You are welcome to get it and take a look. Its nicely broken into classes etc.

Basically this isometric view is a TopDown view made to look like an isometric view. Tiles are best when not square but instead are rectanguler (3:2 ratio - 64 * 48 is what I use).

Items in the game are all decendant from a single class. This is then inherited from and more properties and methods added as needed. I use a floating point location system with additional properties to store the rounded off values for quicker accessing.

I typically create a map class that stores the tile to display at each location as well as a list of items. There are in fact two lists stored - one with all the objects added as required (used for doing movement) and a second list with the objects sorted in Y order (used for drawing).

The map controls everything in the game - it does drawing as required and also does movement when required.

My item classes are typically very deep. I start with a Base Item that has all the basic information for drawing and movement. I then split it into movable objects and immovable objects. This speeds up the system for doing movement as the immovabale objects just never have their move method called. Sometimes (like Run-A-War) I then split immovable into two classes based on size. (see below for collision matrix as to why) And then split the movable objects into AI based and input controlled (Run-A-War adds a player level before this split).

I never do collision checking against the sprites. I find this really really slow and the improvement in accuracy is not really worth it. I use a collision array built over the map (ie each rectangular tile on the map is subdevided in memory by 9,12 or 16 smaller squares). Each item in the game that is an obstacle updates the collision array with its passable state and a pointer beck to itself. When an item moves it first deregisters itself from the collision array, moves then reregisters itself again. To check collisions I just check the collision array to see if another item is in that location. (In run a war see how close you can get to the various obstacles - sometimes when an obstacle is not placed exactly right you see to stop 1 or 2 steps away from it - this is because you enter the relevant position in the collision array that thinks the obstacle is in that square). Large obstacles just register themselves with multiple different collsiion array squares. (They can also obviously deregister themselves also). For flying objects just use a 2 (or more) dimensional array to indicate land and air (low medium high...) obstacles.

I've never found nice level changing tiles so I havn't quite got the different hieght look right yet.

Hope this is what you wanted to see. Just ask if there is anything else.

xGTx
01-06-2005, 07:34 AM
I really wish i could see what starcraft's tile set looks like to see exactly what they are drawing. Im not really seeing how isometric is different from how starcraft as done.

savage
01-06-2005, 08:44 AM
I really wish i could see what starcraft's tile set looks like to see exactly what they are drawing. Im not really seeing how isometric is different from how starcraft as done.

Not sure if this is useful, but there are some WarCraft tools @ http://artho.com/warcraft/wctools.html

Traveler
01-06-2005, 02:34 PM
Alternatively, if you have starcraft, you could start up the editor as you can tell a lot from it. Especially when the grid is activated and you move around some units.

xGTx
01-06-2005, 10:52 PM
I installed the Starcraft just last night and looked at the editor... The little placement box is in the shape of a diamond.... Now i thought only ISO games did this?

Traveler
02-06-2005, 08:10 AM
The little placement box is in the shape of a diamond.... Now i thought only ISO games did this?

Starcraft uses somekind of dual approach where the world is created using an isometric based tile system. All other objects like trees, buildings, vehicles, soldiers, are using a square based system. They are placed and move accoording to that grid as well. This method of working has a few advantages. First is of course the 3d-ish look and feel that you can't have with a square tiles (well you can actually, but it's a lot harder to do). Second, because all other sprites do use the square based approach, calculations for, for example, pathfinding become so much simpler.

cairnswm
02-06-2005, 11:24 AM
I thought the map also used the Rectangular tile approach :(

Well my style does anyway :)

Sly
02-06-2005, 11:46 AM
I installed the Starcraft just last night and looked at the editor... The little placement box is in the shape of a diamond.... Now i thought only ISO games did this?

That is just another part of the isometric illusion. Turn on the grid (in the menus somewhere) and you will see the tiles better.

Starcraft is an amazing example of how through ingenious artwork and some design rules you can fool almost everyone into thinking you have an isometric RTS when it's just using 32x32 square tiles with no overlapping terrain. Diablo II used the same approach. Notice how you can walk up and down stairs, but really you are walking straight and level? The graphics make you think you are going up and down, but really you are staying on the one plane for the entire game. Smart buggers at Blizzard.

xGTx
02-06-2005, 09:56 PM
Well I need to figure out how to do this! Awsome system and I don't want to mess with ISO :P

Sly
02-06-2005, 10:13 PM
It's all in the graphics for the tiles. Really study the editor with the grid turned on to see how they make the tiles fit together. Also note the blending tiles to change from sand to grass, or rock to dirt.

As for height, note that while playing the game you can never go behind any terrain. This means that the entire game is played on the one horizontal plane. It's the graphics that fools you into thinking that your units are actually on the top of that cliff. There may be some flags on those tiles to say the unit is higher than the one on the ground below it to give the higher unit an advantage in battle (elevated position = better position), but graphically it is all one plane.

Traveler
03-06-2005, 07:33 AM
I've seen this topic around in quite a few forums. Might be a worthy subject for a tutorial. :roll:

Harry Hunt
05-06-2005, 10:17 PM
Starcraft is an amazing example of how through ingenious artwork and some design rules you can fool almost everyone into thinking you have an isometric RTS when it's just using 32x32 square tiles with no overlapping terrain. Diablo II used the same approach. Notice how you can walk up and down stairs, but really you are walking straight and level? The graphics make you think you are going up and down, but really you are staying on the one plane for the entire game. Smart buggers at Blizzard.

That's really interesting (considering that Diablo II is one of my favorite games of all times). So are you saying it uses the same fake elevation as StarCraft, or are you also saying that it isn't really isometric?

Sly
05-06-2005, 10:34 PM
Both. It is especially evident in some of the caves (episode two or three I think) where you "step" down a series of stairs, but you eventually come full circle and end up back where you started. So how did you get back to where you started if you only ever went down stairs? Because you never actually left the horizontal plane that your whole game is played on. This was not an intentional design on the part of Blizzard since the maps in Diablo II are all randomly generated. This was just a side-effect of the random map generation.

As for the square tiles, Blizzard once again faked the isometric view with cleverly rendered 32x32 square tile graphics. Take the teleporters for example. If you slowly move the mouse over them, you can see the area where the teleporter lights up is actually composed of square tiles. The "3D" view that you could enable simply used the 3D card to render the tiles slightly skewed towards the top centre of the screen. It was still a 2D game, but with skewed tiles.

cairnswm
06-06-2005, 06:55 AM
Thanks Sly - everything you've said sort of validates what I have been able to work out from looking at Starcraft and trying to work out how it was done.

My next game - probably a simple Medieval RTS game will be using the same style of Tiles (Probably 64x48 tiles) that Starcraft and Run-A-War used. Just want to enable more multi character options for the game so that I can enable armies.

How does a game like start craft do Networking? This is something thats been bugging me a lot - I know how Age of Empires 1 does it (there is a detailed article on Gamasutra about it) but it doesn;t seem practicle for a one man band to do the same thing (its all based on a command system and each PC doing the movement of every unit) - In Run A War I just send the current character position, movement and starts along with a couple of event messages - then the other PC just resets the relevant information. I have tried this with more units and it seems to be very inefficient (I still need to try sending less data).

Sly
06-06-2005, 10:02 AM
Networking for a RTS is a whole issue in itself. There have not been any articles published on network as it relates to Starcraft specifically, but the articles about the networking for AoE, or any other RTS, should be applicable to any RTS. That said, the networking component of any RTS, no matter how simple, is a very difficult issue that is a huge task.

User137
06-06-2005, 03:10 PM
What comes to Diablo 2, it is truly isometric. What i have seen its graphics, they are diamond shaped not rectangles. But its graphics are not only tiles or diamonds, it uses lots of different shaped and sized even very large transparent sprites. Though i am not sure how collisions work with D2 :?:

SC and Diablo both are isometric games. D2 has even option render it with 3D perspective. Both have units rendered from certain angle not straight top in any case.

What comes to flying units, only way to tell they are flying is their shadow that is placed under them. What's really interesting about it, is that units don't move up when they go higher only shadows move down :P A brilliant way to make unit selection and movement easy and effective.

Edit: SC is still isometric game no matter it is rendered with tiles...

Sly
06-06-2005, 10:49 PM
What comes to Diablo 2, it is truly isometric. What i have seen its graphics, they are diamond shaped not rectangles. But its graphics are not only tiles or diamonds, it uses lots of different shaped and sized even very large transparent sprites. Though i am not sure how collisions work with D2 :?:
Is it the actual tile sheets you have seen or just the in-game graphics?


SC and Diablo both are isometric games. D2 has even option render it with 3D perspective. Both have units rendered from certain angle not straight top in any case.
It's not 3D perspective though. It merely skews the tiles towards the top centre of the screen to give the illusion of 3D perspective. As the Diablo II post-mortem (http://www.gamasutra.com/features/20001025/schaefer_01.htm) puts it, "quasi-3D".


Edit: SC is still isometric game no matter it is rendered with tiles...
I guess that's where we differ in opinion. To me, it's only truly isometric if it is rendered with isometric tiles. If it is rendered with square tiles but those tiles are made to look like isometric, it is not truly isometric.

Smotsholle
23-09-2005, 03:50 PM
There's a really simple way to find out the rectangular tile bit...

Place a higher plain and a lower plain
Connect them using a ramp. If you place the obstacle view on (obstacles turn red), you see red rectangles.

Almindor
24-09-2005, 09:52 AM
Networking generaly is a killer. I've made my own net-lib based on FPC sockets and winsock2(in windows) and that still means I made only 1/3rd of my work. I'm making a one-screen "quasi-3d" shooter lentilwars ( http://lwars.sf.net - be warned, current net play is totaly desynchronized - not much playable).
I'm currently rewriting my whole event system to a stack-like structure of keypresses so I can remember the whole history and do "backtracking". For example I am a client and I get an event in time MYTIME - 5 that another player started shooting. if this happened now all I could do is start to shoot with that player NOW and hope for best. With that stack-event system I will "go back in time" start the player's shooting and recalculate the situation (so next blit might be a bit of a fun if the latency is high enough).

It's still not the best thing and I'm sure not much good for RTS but I just wanted to show how networking can be a killer. My hint to starting projects: go singleplayer! :)

Smotsholle
01-12-2005, 10:33 AM
Or... you can make turn-based games ;)