Spring vs. Dawn of War, Dark Crusade (very lengthy)

Spring vs. Dawn of War, Dark Crusade (very lengthy)

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Spring vs. Dawn of War, Dark Crusade (very lengthy)

Post by Argh »

I'm putting this here, because it doesn't really fit anywhere else.

Basically, I have spent the last two days with Dark Crusade, from a modding standpoint. I should be working on my current project, but I've been very busy and mentally stressed with IRL stuff (I recently changed employment, I have a big family vacation next week, there's a lot of stuff going down), so I thought I'd study another game engine for a minute, to compare it with Spring, and here are my resulting thoughts.

1. Dawn of War is a very, very, very messy game engine, compared to Spring. References piled upon references piled upon references. A single unit consists of model files, FX files, a single-unit description (with many sub-references), a Squad file that actually allows it to be called as a functional game entity, icons, contextual help-text files, and many other things.

While Spring has most of these things, the cleanliness and clear reference paths is comparably superior, in my opinion. For example, because we have BOS, many things that in DoW are a big mess of procedural animation calls can be done within a single script. And what we can do, in most areas, is superior in cleanliness of design and flexibility.

For example, DoW calls up sounds through FX calls. This is cool, and something Spring should have, but it also comes with a lot of additional pain. For one thing, you cannot just call a sound via a motion script- no, that's a seperate event, and it adds bloat, and yet another software tool you're supposed to use, just to call a fricking soundfile and send it to the audio output.

Moreover, it adds terrific complexity in terms of maintenance, and makes adding new content harder. Trust me on this- all I wanted to do, at one point yesterday, was to make the Dark Reaper's missile weapon (if you have no idea what I'm talking about, don't worry about it) into a projectile weapon that actually obeys gravity and has an arc and deviation.

After much back-tracking of references, I eventually found out that the true behavior of the projectile was caused by two different actors:

A. There was a LUA/RGD file that actually created some of the physical behaviors of the object in terms of game effects, as well as what FX are called when the projectile terminates (i.e., hits something or times out). It also calls the projectile model, but it doesn't directly control the sounds, etc. Compared to a Spring weapon's file... gawd, it's a nightmare! And even when I got through all of that... I looked at the main controlling LUA for the weapon, and realized that if I wanted to actually have the weapon obey true LOS (99% of the weapons in DoW ignore terrain and LOS entirely) I'd have to change yet-another thing, and one reference I read last night said basically, "don't do this with things that fire more than once every few seconds, because DoW's physics code is extremely slow"! So, I dropped that like a hot potato and moved on...

B. The projectile itself, buried in a sub-sub-sub-sub-directory (I wish I was kidding) controls the sounds and the FX of the projectile, including the smoke trail. I think that the smoke trail is yet another procedure, written in some debased, nasty LUA, that is tied to the model in yet-another sub-reference, but by the time I'd figured all of this out, I'd gotten tired of the whole thing, and the smoke trail, explosion event, etc., were all adequate to my needs at that point.



2. DoW's support of import/export of model content is comparatively poor. While it could be argued that Spring is worse off, since we're stuck with a boneless animation format, and I'd agree that that is one of the biggest things holding Spring back, that's about the only thing that's really terrible. You cannot add new content to DoW without having a (probably-pirated) copy of 3DS Max, v. 6-8 (can't use 9, because it's too new and the exporter script apparently borks) and you cannot use just any-old format for content creation- nope, gotta use 3DS, or you're hosed, because that's how the animation format works.

One of the major challenges for the developers of Command Engine (which, I assume, is going to be where we're all going soon) should be to develop a bone-system animation format that is useable through UpSpring (or whatever the new content-development tool is called) but is tied to a BOS-like language for animation control and arguments.

After viewing what a huge mess it is to develop working content in a game engine that doesn't have this basic backbone (the amount of working, non-buggy and 100% original stuff for DoW, despite its popularity with modders, is vanishingly small) I would have to say that Command Engine needs to put this issue at the forefront. I've made a very, very big deal about content-development on these forums since I got here, and as most of you know, I often jump into any discussion involving development of the game elements that players interact with a lot of the time, because, along with UI (a topic I'll admit I'm mainly ignorant about) these are the two biggest factors in terms of whether a community that is not paid to create things can actually get work done.

Anything less than simple, ironclad and robust implementation is very likely to fail, in my opinion, because it's one thing to design something that can make super-kewl demos that took a month of work and expert knowledge of the system to achieve... and another thing entirely to expect, say, me... to actually sit down and build an entire game with it. I keep being annoying, and saying, "hey, keep it simple, explain stuff, document what you're doing, make examples" with stuff around here, because when I'm working on a game, I simply don't have enough spare brain matter to devote to an entire system full of complexity, unless it's dead vital to what I'm doing at the moment.

I know that goes for most of the game developers here, too- we're trapped between the theoretical could-be-done of where Spring is now and the what-do-we-really-have-time-to-do aspects, just like a professional team working with a complex game engine is, only here we're not getting paid.



3. DoW's support for contextual events, and theoretical flexibility is much higher than Spring's. For example, you can have units in DoW show different FX, or even call new animations, depending on what weapon hits them. In theory, after reading some of the deeper sections, it appears that if I really, really, really wanted to, I could re-code the entire combat system from scratch.

This is great. But the overall awfulness of the interior of the game makes me want to puke, frankly. I thought Freelancer was bad, with files referencing other files ad infinitum. Compared to that mess, where the last major mod I did for that engine involved hand-tweaking or completely rebuilding hundreds of pages of text... this looks even WORSE. Flexibility without clarity and a straightforward file path is scary, nasty stuff!



4. DoW doesn't actually path whole units around, contrary to popular belief. Game designers are required to keep units that will be in a group (a Squad in DoW parlance) with the same movement rate, or the group moves at the pace of the slowest member. Instead of moving whole units around, it simply seems to do waypoints where the block tries to re-assemble, following very straightforward rules written as text, specifying the distance of every element. Then when the group reaches the final destination, it attempts to pathfind every individual to the proper final location within the static grid.

This is actually one of the main things I've been wanting Spring to do that nobody's bothered solving yet. DoW does this with LUA scripts that define the positions and assigns them to a table, which is then stored in a database and pulled up by the game engine as is required. It doesn't always keep formations intact, by any means- they're disrupted whenever terrain won't permit the individuals to maintain spacing. And the very low resolution of DoW's heightmaps (at a guess, I'd say it's about 1/4 of Spring's, for the same apparent scale- I'll have to dig up the conversation I had with Jelmer about this at some point, and get my facts straight) and the amount of emphasis mappers for DoW put on making terrain easily-navigable, as opposed to realistic-looking, all factors into this.

Basically, though, I think that with LUA, we could almost certainly do this in Spring. It'd have limitations (somebody would have to hand-code the various formation blocks, and you'd need different contexts, if your formations included unlike-sized objects, so there's a lot of fairly nasty contextual code that would be required) but I think it's actually doable, and better yet, it doesn't require anybody losing their soul trying to mess with the pathfinder code again- LUA could get a UI call (makeFormation, arg XYZ) and then do a lot of fairly complicated stuff (figure out if everything in the resulting formation is the same size and speed, if not slow everything down to slowest speed, sort by size or other factors). I'm concerned about the amount the game engine would slow down, though, if it didn't require a specific call, but was invoked every time a user selected a group of Units- it's pretty clear to me, after having done some experiments in DoW, that this can get very, very expensive, CPU-wise, when groups get large, or have many disparate elements within them.


5. DoW's physics code is both brilliant and terrible. One of the first things DoW players will tell you was a big hook for them, visually, was watching guys get thrown through the air. Now that I've looked at how this was done... well, the guys get treated as single objects, they don't really ragdoll (it's a static animation, picked from a list) and then they're instantly turned towards the explosion event and flung out. If you mess with the physics of explosion parameters much, you'll quickly see that they tweaked heavily on the animation ends of things, but had to keep most explosions either pretty close to each other, or, as in the case of the extremely powerful ones, they rely on the fact that the models move so fast that you can't really see that they are doing the same animations as they do with little events.

However, that said... objects can be given masses and collision boxes (they used boxes, not spheres), and when, for example, they wanted things to fall off of parents, they have events where they separate them and then have them just obey straightforward physical rules. On the one hand, it's a lot more impressive-looking than Spring's explosions and the FALL event, which does not bear looking too closely at it... on the other hand, they used it infrequently, and in odd places, mainly with newer content (the Imperial Guard and Necrons, especially) so it's not as amazing as it should have been. Not having played Company of Heroes, which is basically the same game engine, but having heard about how awesome it is, I'm sure that the developers took a lot more advantage of this.


6. DoW's system of upgrades, dependencies, and modifiers is brilliant, and actually suffers the least from overall messiness. While there are the usual problems with references, it's a great system. Basically, it works like this:

A. Unit (or Squad) has various things attached to it, that require other things to be true before they can occur.

B. When the dependency is true, then the event is triggered. This can be anything from upgraded hitpoints to a whole new model file and entirely new stats (that gets into nightmarishly nasty code, so they usually just kept all of the sub-models in one file, and then just hide-show what they wanted to).

This system can call "weapons" that cause various effects within their AOE, can boost stats of all units named XYZ within the Squad, or just effect the individual. I think that most of this will be possible when Trepan's code finally sees the light of day and we get a chance to really play with it, and I think that his way is probably going to be cleaner, but I do want to give DoW some props there- it's one of the main areas of the engine that doesn't make me shudder with horror, even though many of the sub-events certainly do.


7. DoW's FX system is both better and worse than Spring's. On the one hand... it can do quite a few things that would be hard to do in Spring, or completely impossible without invoking a shader through LUA (which is a giant topic which I'll be all over like a fruitfly on day-old watermelon when I can finally see some working sample code and can ask about a billion stupid questions, frankly) ... on the other hand, having looked at the code, it looks terribly bloated, compared to the ExplosionGenerator format, and it's not exactly... user-friendly. My only complaint about working with FX in Spring is that there's no viewer for it, short of firing up the engine (hmm, maybe I could convince JC to... lol... coder abuse) but otherwise it's straightforwards, and in the types we have at our disposal, very powerful.

However, FX in DoW are generally tied to models, which are tied into references and dependencies... it's very, very, very messy. It's as if the cross-reference that a BOS call must make to a Unit FBI, in order to access a given ExplosionGenerator, was multiplied tenfold in relative complexity. While I like that Relic made it possible to make certain kinds of FX that are currently impossible in Spring, I don't at like how they approached this issue.


8. Game-balance for unit/weapon interactions is much easier to work with in Spring than in DoW. DoW's weapons do damage something like this:

A. Weapon satisfies aiming conditions, and fires.

B. Weapon reads through a mass of sub-conditions regarding whether it has AOE, what type of AOE (in Spring, it's pretty easy to make a machinegun that acts like one physically, in DoW, it's a big mess, and the results aren't nearly as realistic), etc., and then applies itself to a point, an area (circular or pie-shaped) or an entire Squad.

It gets even worse with weapons like artillery. They have a set of sub-references defining their physical behaviors, and they miss based on a circular probability of error system, instead of Spring's fairly straightforwards deviation-from-true system. And I have yet to find anything allowing me to make a weapon that fires a true burst :P

C. Now the weapon has to decide if it hits or misses. Since it's not a physically-representational system, like Spring, it "rolls the dice" for every applicable target in the appropriate area.

D. All hits get applied to the target. Now things get REALLY messy, because, unlike Spring's straightforward Armor system, where damage is damage is damage, you have to look at sub-references, and see how much armor-piercing is done, vs. the amount of armor the target has. If damage < armor, then armor is reduced to armor - damage, or minimum armor levels. If damage > armor, then damage - armor is applied to hitpoints. In theory, this is exactly the same as Spring, except that it involves many more sub-references and is a royal pain to actually maintain! I love how in Spring, I can just define, flat-out, that a given weapon does zero, or minimal damage, to any Units that are in a given Armor category. In DoW, they have the same final results, but they have the added (and imho, idiotic) step whereby armor must be "degraded" before actual hitpoint damage occurs, which mainly just ends up being extra, hidden-from-the-end-user hitpoints, because they used the minimum-armor values so infrequently.

E. Some weapons may call a sub-event, that may do just about anything at all- slow down the units in the area, halve their armor values, degrade their Morale, whatever. OK, I'll admit- that's pretty awesome. It's not worth the rest of the pain, though.


The end result of all of the above is that, whereas determining the true combat power of a given unit in Spring is quite complicated (turret speeds, engagement cones, speed of projectiles, raw damage, reload, spread, salvo sizes, E/M costs, etc., etc., etc.) in DoW it's even worse, actually.



Final Summary:

All I wanted to do, frankly, was take an existing content mod and build a rebalanced version- just a quickie, rough project to get me fired up and thinking about game design (and start to get me thinking more about what I'll want to do with Trepan's code, and the implications thereof), separate from the many remaining issues of my current project. It quickly escalated into a major pain in the rear, mainly because of the sheer amount of interlocking factors.

I think that Spring/Command Engine can and should do a better job, in the following areas:

1. Dependencies. File-paths should remain as straightforwards as is humanly possible- DoW shows the dark side of entirely-LUA based design, and the ensuing mess that can result, on the maintenance end, if everything is ultimately dependent on too many other things. There's no way to avoid this problem entirely, mind you- if Spring games are going to start having even more complex gameplay implementations, then it's naturally going to get more complicated. However, there's a huge difference between having a COB call a LUA script, which then does a bunch of fairly-complex things and returns after executing (or a COB call that LUA and then goes on its merry way) and having the LUA reference another LUA which then passes a state to yet another LUA, which then... bleah! The amount of sheer wasted time, on a game developer's end, that this must result in, is simply tremendous, and debugging bad gameplay must be a royal pain.

2. FX. I think that Spring's system, where ExplosionGenerators are their own, separate entities, and are invoked through events that are clearly-defined (even if slightly messier than I would personally prefer, it's far better than DoW) is great. However, at some point, we need allow for greater flexibility, to replicate DoW's dependency system, but hopefully without so much mess and bloat.

For example, if a HitByWeapon returns the weapon's ID (and maybe we could even put ID #'s back into Weapon definitions, specifically for this purpose- that would even allow multiple Weapons to share the same ID, strictly for contextual event definition, so that we don't have 50 different IDs for 50 weapons that all basically do the same thing) then we could then just use COB to tell the Unit what to do, visually, and then invoke LUA through the COB to make other things happen. Simple, fairly straightforwards, and powerful. For many things, such as "I'm on fire, I lose health every SlowUpdate until X SlowUpdates occur) we can already do this through COB alone- however, we have no way to tell the Unit that it's on Fire, short of some sort of overly-complex LUA callback initiated when the weapon fires (my mind boggles at the waste and complexity).

3. Animation and content creation. Spring is, despite its obvious limitations in the animation category, quite excellent, and can only improve. If it supported some sort of bone system that was scripted, or even just a static-animation format for doing pre-posed animation series, then it'd be on a par with just about anything elsewhere.

While I understand the strong temptation to use Blender as the basis, since it is also Open Source and free, I'm not entirely convinced that this is a good idea. Blender is massive overkill for low-poly animation, frankly, and it'd probably be a good idea to just keep things as simple as possible.

One of the areas DoW is really ahead of Spring is that it supports multitexturing. This means that different areas of a model can be hidden, without adding to their overall costs per rendering pass, among other areas.

4. Rendering. There are two areas where DoW is superior- alpha transparency, and shadows.

One of the areas where DoW took a much different approach than Spring was in rendering shadowmaps (yes, I'm still obsessed with this, lol).

It turns out that different units in DoW use different approaches to shadows. Small units, and the vast majority of mobile units, use a simple blob shadow (i.e., a alpha-dark area projected onto the map) that turns with the origin of the model, and is projected on a straight line between sun and origin. This has obvious speed advantages, and I'd like to try doing that in Spring (remember that post about getting the sun's position?) however I think that doing it in LUA will prove too slow to be practical, because I'd have to do a COB --> LUA callout, get the returned angle, then bring it back to COB, move a Piece, and then call an ExplosionGenerator to "project" the blob-shadow (really, just a custom "scar", and I have no idea whether I'd be able to control orientation, frankly, which is why that idea stalled).

Large units, the map and buildings use stencil-buffer shadows. Again, DoW differs from Spring, in that it doesn't render that stencil over the entire map each rendering pass, but only the area in the camera, plus they use fog and other trickery to prevent users from seeing visual problems in long-distance situations. Personally, if I could have blob shadows, preferably with some sort of COB control (it'd be really kewl if they could be animated series that I could sync with motion) for anything mobile, I suspect that the performance benefits would greatly outweigh the small harm in visual quality, on all but the most angled-sun maps. In DoW, this is all customizable, per unit, and in fact if you wanted to, even small infantry could use stencil-buffer shadows, like in Spring, or all buildings could use blobs. I think that the performance advantages would be worth it, and I can see why they did that.

Alpha transparency is available for all models, and is used to great effect in a number of places. While there are some artifacts, and the DoW designers mainly used it for modeled "FX" that were really just attached pieces on the models, combined with glowmaps, it makes a huge difference in the overall level of quality. I still don't understand why alpha transparency has never been put into Spring, frankly, or why it's been quietly ignored- I assume that there are rendering issues that were nasty that nobody wanted to mess with, not that everybody coding the engine disagrees or doesn't understand that alpha-transparency is a very powerful, multi-function tool.

Lastly, DoW's coders did some very clever stuff, in terms of map rendering. Maps can have different environment types, and if a map is X environment, then, for example, units leave behind footprints that are alpha-shaded, but on other maps they'll leave muddy footprints, or whatever. That's pretty clever stuff.


5. Spring's map format is already superior to DoW's in multiple ways. And, if Smoth ever gets that LUA-based entity-placement code thingy done, so that we can have Units, as opposed to Features, placed onto maps, it will be even moreso! However! DoW has a couple of things that are very interesting, and I only wish I had enough free time away from my main project to really delve into this (however, that's not to be, I have too many people counting on me to be productive, frankly):

A. Areas that are total no-go zones that are obviously defined with a bitmap, not just a heightfield bitmap. This is probably very similar to Spring's support of custom movement-rates, but it's absolute (I don't know, so I'll ask here- can that custom movement-rates thing entirely stop movement through a given zone? my understanding is that it cannot) This is very useful, because it allows for non-square areas of no-go to be defined, allowing for placement of 3D terrain objects which do not really interact with anything. It's pretty obvious that it was done this way, instead of Spring's footprint system, which is cooler on the small end of scale, but impractical for giant scales (can you imagine the kinds of ruined cityscapes being done in DoW, in Spring? I can, but I can see the map's author being a mental wreck well before it was finished).

B. Some 3D objects have hitboxes, and block certain types of object. Some don't bother (they're just there for eye-candy purposes). While this isn't entirely ideal for Spring, given that Spring likes to literally depict the physical universe to a much greater extent than DoW, it is intriguing, because it might be done in Spring. Heck, if Units could just have multiple hitspheres, and if hitspheres were actually used for unit collisions during movement... we could replicate this entirely, and actually exceed it...




That's about it for now- I'm sure there are other thoughts I've had, during the last two days, that maybe you might find somewhat worth reading, but this post is already about as long as I ever get. I'm glad I took a couple of days to go over that engine more than just as a player, though, it was extremely informative, and I hope that anybody that reads this gets at least some benefit.
User avatar
Comp1337
Posts: 2434
Joined: 12 Oct 2005, 17:32

Post by Comp1337 »

Read it all, kewl stuff
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

First off, HitByWeaponId. Use it. You keep mentioning that you want it and everyone keeps telling you it's there already.

Second, armor is used to create a consistent rule for modifying said armor with other effects and give players a rule to know how a weapon will behave in a given situation. If I have a weapon that has 400 default damage but 5 vs. tank in Spring and I want to say "that tank lost half its armor", I'd need a separate damage table for it. With DoW's system the game knows what halving the armor means.

Third, flying units aren't done with ragdolls because they are still alive most of the time and you cannot return a skeleton from ragdoll mode into animation mode without getting weird effects (as the ragdoll will have a pose completely unfit for your animation and you need to blend in between them somehow without making it look like Arnold Schwarzenegger is doing the acting). Besides, it doesn't look actually worse and gives you some additional control over how the unit looks when flying.

Fourth, yes, alpha IS a huge headache. Using alpha blending (as opposed to the alpha test Spring can already do, i.e. on-off transparency) requires that you reimplement the Z sorting because the Z-buffer fails for non-solid surfaces. Most engines simply disable Z-sorting for alpha surfaces, render them after the solid scene and let the modeler pray that his polygons are drawn in the right order. Ever wonder why sometimes transparent surfaces disappear when they're behind other transparent surfaces? The forward surface was drawn first, wrote the Z-buffer and the back surface was considered occluded. Doing a proper Z-sort on alpha surfaces is slooooooooooooooow.


BTW, you say Blender is overkill for lowpoly. For animation there is no overkill, there is only open fire and time to reload. Animation tools are complex and they need to be, just setting up an IK rig can need a fuckton of variables to make sure everything bends the way you want it to and when one is missing you can end up with a real headache. Seriously, what harm is there in having a tool that can do more than you need? Better have dozens of unused features than missing one feature you need. What's a cheap/free package that's not "overkill" while still offering all the tools Blender does for lowpoly stuff?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

quite long.

btw trepan didn't implement the shaders to be used via lua<->cob calls. He implemented map gaia and mod gadgets so you could implement blob shadows entirely within lua.

However I would put this in the engine and tie it to tags and settings, this is something all mods should be able to have.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

In before TLDR!

TLDR

In after TLDR!
User avatar
Sleksa
Posts: 1604
Joined: 04 Feb 2006, 20:58

Post by Sleksa »

TL;DR


:(((
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

What the frak is TLDR?
User avatar
TheRegisteredOne
Posts: 398
Joined: 10 Dec 2005, 21:39

Post by TheRegisteredOne »

TL;DR = teal deer
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

Interesting read.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

Dawn of war is a very basic gameplay and balance wise. fisher price my first RTS etc
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

First off, HitByWeaponId. Use it. You keep mentioning that you want it and everyone keeps telling you it's there already.
Lol, I know! Sorry, I just haven't gotten to play with it yet, apparently.
Second, armor is used to create a consistent rule for modifying said armor with other effects and give players a rule to know how a weapon will behave in a given situation. If I have a weapon that has 400 default damage but 5 vs. tank in Spring and I want to say "that tank lost half its armor", I'd need a separate damage table for it. With DoW's system the game knows what halving the armor means.
Not so, within normal weapon parameters in DoW. You'd have to call an Event, tied to a dependency, or write up a custom piece of LUA to generate this outcome.

Mainly, the outcome that you're describing is achieved by using damage ranges between max and min, with a minimum-damage level- you can use them to generate a potluck-chance that your weapon does significant damage, but you cannot control the final outcome. Personally, I detest their system of variable damage- it just makes game balance harder, frankly- when you get it all sorted out, you still end up with average DPS, but with DoW, it's a fuzzy bell-curve, not a clear and straightforward number. If you've played DoW DC, you know that some of the races are balanced pretty terribly against one another... and personally, I think a lot of that is because the designers had too much complexity thrown at them. Relic even had to write a custom tool, to try to calculate DPS, but having looked at it, it's entirely inadequate, frankly.

Now, all of that said, what you're saying is perfectly possible within DoW. However, they just plain didn't do it that way, so far as I was able to determine. I haven't reviewed every single weapon or weapon-like Event, mind you.

Third, flying units aren't done with ragdolls because they are still alive most of the time and you cannot return a skeleton from ragdoll mode into animation mode without getting weird effects (as the ragdoll will have a pose completely unfit for your animation and you need to blend in between them somehow without making it look like Arnold Schwarzenegger is doing the acting). Besides, it doesn't look actually worse and gives you some additional control over how the unit looks when flying.
I wasn't trying to censure them, just was pointing out that the engine isn't magic, and that they're doing the same level of visual trickery everybody else does. In fact, when I saw how they were doing it, I was pretty impressed- it's a very convincing illusion.

BTW, the whole ability to be tossed about is entirely hard-coded- it's not like Spring, where it's a physical outcome based on the reaction between the explosion and the mass of the Unit. What would be cool for Spring, imo, is to have Units be able to detect when they're being flung about, so they can react accordingly. That may be possible with BOS, but I think it'd be too inefficient- maybe HitByWeaponID will let me do this... hmm...
Fourth, yes, alpha IS a huge headache. Using alpha blending (as opposed to the alpha test Spring can already do, i.e. on-off transparency) requires that you reimplement the Z sorting because the Z-buffer fails for non-solid surfaces. Most engines simply disable Z-sorting for alpha surfaces, render them after the solid scene and let the modeler pray that his polygons are drawn in the right order. Ever wonder why sometimes transparent surfaces disappear when they're behind other transparent surfaces? The forward surface was drawn first, wrote the Z-buffer and the back surface was considered occluded. Doing a proper Z-sort on alpha surfaces is slooooooooooooooow.
Well, who cares about occlusion? DoW doesn't- now that you mention it, there are clearly models in the game that have the problems you're describing, and you see polygons get cut. However, most of the time it looks great anyhow!
BTW, you say Blender is overkill for lowpoly. For animation there is no overkill, there is only open fire and time to reload. Animation tools are complex and they need to be, just setting up an IK rig can need a fuckton of variables to make sure everything bends the way you want it to and when one is missing you can end up with a real headache. Seriously, what harm is there in having a tool that can do more than you need? Better have dozens of unused features than missing one feature you need. What's a cheap/free package that's not "overkill" while still offering all the tools Blender does for lowpoly stuff?
Well, if it were me, I'd say that something on the order of Poser 1 would be great. It was very, very, very simple- set up a bone, declare what polygons are dependent on the bone, attach a child bone, etc. That's it. No blend zones, because the objects are so low-poly that if you need a blend zone, you probably actually need another bone, no muscle simulations, no modifiers, no cyclic systems, no gravity / cloth simulators, etc.

Now, that said... I can understand, if people want all of that stuff available, so I'm guilty of more than a bit of hyperbole, frankly- it won't really make me all that upset to have to use Blender (er, assuming that it doesn't crash when starting up anymore- the last version I tested, six months ago, was pretty awful that way). I just think that the vast majority of common problems in animation can be handled by BOS, or a BOS-like language, and for the things that can't be handled that way, we should keep things simple, instead of inheriting a tool that is massively complicated, comes with its own problems, and requires use of yet another interface.

My concern here is that the learning curve for making stuff in Spring is already nasty enough, basically- the simpler we keep the tools, the more likely we are to see more people come and make use of them, and make cool games! As it is, the requirement to uvmap / skin is a significant obstacle, learning BOS is an obstacle, learning LUA will be an obstacle, and if we add a very complex animation suite... well, the prospects aren't very good, because there's a distinct shortage of people who have all of those skillsets, or can learn them.

To put this into context, I didn't see any mods for DoW DC that added significant new content that weren't the work of a team. And even the teams seemed to be begging around for specialist talent, because the number of people with X skillset is so low. We could be arrogant, and assume that they're all lazy, stupid people, and that if we all walked over there, we'd make them look like idiots... or maybe it'd be wiser to learn some lessons from that, and continue to emphasize simplicity.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Code: Select all

bool beingflungaround(){
    if(unitheight > max(groundheight,0)   && !unittransported){
        return true;
    }else{
        return false;
    }
}
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I think DC's balancing issues are more because of Relic being Relic than any complications in the system. There are often completely nonsensical changes in their patches. Take Company of Heroes. In the early versions noone ever used the Sherman Crocodile (a Sherman variant with a flamethrower instead of a cannon for better anti-infantry power) because it had no anti-tank firepower while the about equally priced regular Sherman provided enough anti-infantry firepower (most complained that it's OP and all since the thing tends to wipe out an axis squad in 1-2 shots and is the fastest tank in the game). So what do they do? Nerf the sherman's anti-infantry power? Heck no, maybe if it was an axis unit. They buffed the crocodile so much that it would annihilate a squad in less than a second (flamethrowers get even stronger once cover is involved) and was basically unstoppable by axis T1 and 2; T3 only stood a real chance if they spammed Stugs like mad (which didn't help much either since Stugs are slow and crocs damn fast). They said they only made the croc as powerful as the axis flamer hanomag but while the latter has a hard time doing anything to a squad the croc was already more powerful before.

Of course one could say the system was so complex that the same number made the croc OP while the hanomag was UP with it but any intelligent monkey would notice that and simply adjust the numbers accordingly.

Are you sure they actually use full alpha? I've never seen more than alphatest on any unit model there unless you count the effect pieces and those looked more like an add or multiply blend. I don't think you really need alpha blending on RTS units anyway. It's nice for detailled hair or something but most of the time alpha test will be sufficient since you only want to punch holes into surfaces. There's very few things that need to be semi transparent and cannot be done with add or multiply.

Lack of weighted vertices will bite you in the ass, seriously. I know what a PITA it was with anything that went through Milkshape. Of course you can rig your vertices to a single bone each and use FK for the whole animation but the result will look worse and take more work than if you used blended weights and IK where appropriate. Also bone-based cloth sim is very helpful for stuff like capes, those are another serious PITA to do by hand.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Are you sure they actually use full alpha? I've never seen more than alphatest on any unit model there unless you count the effect pieces and those looked more like an add or multiply blend. I don't think you really need alpha blending on RTS units anyway. It's nice for detailled hair or something but most of the time alpha test will be sufficient since you only want to punch holes into surfaces. There's very few things that need to be semi transparent and cannot be done with add or multiply.
Well, first off, now I'm confused- isn't add or multiply blending full alpha, minus the z-sorting? And don't we do full z-sorting in CSphereParticleSpawner? I've been using that extensively, in my current project, and so long as one is careful about it, it really doesn't render terribly slowly.

At any rate, for what they're doing in DoW DC, I think they're just doing add/multiply, and I think that'd be great, if we could incorporate that onto models... or better yet, just have FX that remained attached to Pieces- that's the biggest problem, imo- FX can spawn per-frame, but you cannot attach multi-frame FX to a Piece- they become independent entities upon birth. If we could attach them to Pieces and have them update their origin per the origin and orientation of the Piece... well, it'd make things like flames, glowing weapons, etc., much more practical, and with lower waste. We can kinda do that in Spring right now, like XTA's flame-trails behind the aircraft, but it'd be better, imo, if it could be multi-frame in duration, but remain locked to the Piece. I'll put that up in Feature Requests...
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Post by BrainDamage »

AF wrote:

Code: Select all

bool beingflungaround(){
    if(unitheight > max(groundheight,0)   && !unittransported){
        return true;
    }else{
        return false;
    }
}
can this code be used to prevent for planes on ground to be affected by damage modifiers?

i find pretty silly that in many TA-based mods that a goliath can barely scratch a plane that is sitting on the ground
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Argh wrote:Well, first off, now I'm confused- isn't add or multiply blending full alpha, minus the z-sorting? And don't we do full z-sorting in CSphereParticleSpawner? I've been using that extensively, in my current project, and so long as one is careful about it, it really doesn't render terribly slowly.
Add blending adds the color values of the surface to the stuff that's already drawn, multiply multiplies the surface color with the framebuffer color (assuming colors range from 0-1). Alpha blends between the framebuffer and the new surface with the alpha value determining the percentage the new surface takes.
At any rate, for what they're doing in DoW DC, I think they're just doing add/multiply, and I think that'd be great, if we could incorporate that onto models... or better yet, just have FX that remained attached to Pieces- that's the biggest problem, imo- FX can spawn per-frame, but you cannot attach multi-frame FX to a Piece- they become independent entities upon birth. If we could attach them to Pieces and have them update their origin per the origin and orientation of the Piece... well, it'd make things like flames, glowing weapons, etc., much more practical, and with lower waste. We can kinda do that in Spring right now, like XTA's flame-trails behind the aircraft, but it'd be better, imo, if it could be multi-frame in duration, but remain locked to the Piece. I'll put that up in Feature Requests...
True. You can do add in Spring by using almost no alpha for a particle and multiply by using no color and high alpha (but you can't multiply individual channels that way...). Would be nice to have more control, though.
Post Reply

Return to “Off Topic Discussion”