Wrecks

Ideas and suggestions for how to improve the Warzone 2100 base game only. Ideas for mods go in Mapping/Modding instead. Read sticky posts first!
User avatar
Giani
Regular
Regular
Posts: 804
Joined: 23 Aug 2011, 22:42
Location: Argentina

Re: Wrecks

Post by Giani »

About structures, what if when you destroy a factory, you don't get the artifact and the only thing remaining is the ruins of it, and when you destroy that ruins, you get the artifact?
My maps: http://forums.wz2100.net/viewtopic.php?f=10&t=9501
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Wrecks

Post by Emdek »

Giani, yeah, artifacts are an issue in that scheme...
Or aren't, if placed outside of ruins. ;-)
At least animations could be improved maybe if we stay with current way.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: Wrecks

Post by Lord Apocalypse »

Emdek wrote:
Lord Apocalypse wrote:@Emdek - Get the other devs to check out the doom 3 source for some useful ideas if need be ;)
That would be hard to do. ;-)
First it would be needed to consider if it is worth to improve our rendering engine or maybe better switch to something existing (like Irrlicht Engine, AFAIR already chosen for at least one fork).
First path would require lots of work, but at l;east could be done gradually.
I think you took the broad approach to my suggestion. There is far more to doom 3 than a renderer that I am refering too. First, the gui system is setup that it does not require SDL or Qt or whatever. That could really boost the WZ GUI all by itself. Second, look at the scripting system. It has been said to be powerful enough that you could script a playable Doom 1 to run inside of Doom 3. There is already a very basic playable game inside doom though all you really do is repeatedly punch a turkey (rather amusing to play). So thats soemthing else that can be looked at for ideas on making the WZ scripting system better (as well as the open source NWNScript clone). Final point, if nothing else you could always look at the mega-texture technology that was introduced for terrain rendering. Maybe its not something that can be worked into THIS engine, but it could be useful if the entire rendering engine is rewritten or the terrain engine is rewritten yet again. Not every idea gleaned from another open source engine has to be about graphics ;)
Second would also require lots of work since AFAIK our rendering engine has some game logic mixed in but ultimately it would open way to other platforms.
Personally I think that abstraction of rendering engine is needed anyway in long term, so new eye candy features or some optimizations (available in later specifications) could be added without ifdefing parts of code (well, in this case some code duplication could occur but that's probably lesser evil which could be probably avoided anyway). In theory we could also get DirectX (at least for version 9) engine so Windows users would be happier. ;-)
Doom3 is pure opengl so DX9 won't by itself make windows users happier. Making the current engine handle Spec, Diffuse, AO, mipmaps, normals, parralax (is that possible with DX9/OGL 2.1?) etc would make people happier. You guys have done a good job on the upgrades but I think people are grumbling due to the slow update on the core gfx compared to more modern RTS titles such as Supreme Commander 1/2 or Shogun Total War 2 (which IMO is more a quasi RTS like Homeworld was).

As for mixed logic. Maybe once the next beta is released some work on refactoring some of the code could be in order to clean it up a bit so no more logic mixed with the rendering stuff etc.
About wrecks, how should be model generated for them? Should it depend on turrets installed (that could require lots of models, even if we would "group them", like only one model for destroyed cannon etc.) or only on body and propulsion plus some random scraps?
This is where damage maps could come in handy. I don't know if any other game that Vega Strike uses them (I would think a great many but...). Within the VS bfxm (our model file, binary though) you have: Spec, diffuse, normal, glow, damage, and PRT bakes (though nothing as yet HAS a prt but its supported). Damage maps are applied as a craft takes damage and just adds black burn marks or to me looks like smudges. For low end cards something like this could work for wrecks or maybe just use it for damaged units and have a broken husk (per body model) and a broken turret that just looks close to a particular line (cannon, lancer, MG) instead of having a wreck model for each weapon mount. Some wrecks may not even require a weapon mount and could just go w/o.
Giani wrote:Only if they are very high graphics...
Because the oil derricks burn, so if wrecks burn they won't make the game slow or anything like that. If not all the tanks become wrecks and if the burning doesn't have good graphics.
And what about if wrecks stay for seconds, like in AOE3?
also @ Emdek
I thought someone had made a reference to the crappy WZ smoke but I can't find it.. In any case, the current smoke is just a texture, a rather old one at that. To do real smoke and fire on a per wreck basis would require. 1) Multiple particle emitters for smoke. 2) Each emitter would start releasing x number of particles over y seconds which would drift up a number of units (or if wind gets added would also have to account for drift). 2A) Are these particles pixels or single triangle polies with a texture? In either case each particle has to be accounted for during rendering as well as its changing location. The more particles in use (say 30 or so per wreck or more) that puts more strain on the renderer. What is the limit the current engine can handle? The unit and base structures don't seem to have a high poly/triangle count so in theory adding some particle smoke and a few seconds of procedural fire shouldn't account for much, but if the game isn't supporting 5-10k poly models with 2k textures for nearly everything then there is something keeping the engine from performing at a higher rate than what we want, hence.. a lot of particles/procedural effects would probably bring WZ to its knees.

If I'm wrong about the engine great, be happy to shut up about it, but everything I keep reading just keep me thinking I'm right :(
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Wrecks

Post by Emdek »

Lord Apocalypse, requiring other things doesn't need to make things slower, in case of Qt it was used in really wrong way here, and if I would use Qt for WZ now (for GUI part, drawing) then I would go to QML directly and even consider going to much more powerful QML2 from upcoming Qt5 (which would allow to even create 3D environment), though with cost of requiring OpenGL 2 (so any post 2005 hardware, the main obstacle is lots of crappy Intel integrated GPUs, at least i945 or i965 is needed AFAIR).
And I'm considering use of external engine (whatever which, but that with enough features, quite low requirements, stable API and wide platforms support is needed) because with limited man power we don't have resources to do own / adapt other quickly (OpenArena is in similar situation)...
And DirectX backend would make Windows users happier because it wouldn't require updating drivers (which is big issue often, due to Microsoft's attitude to "competition", not only for beginners). ;-)

About wrecks model, I think that damage map is not enough, this is something that would be more useful before total destruction to replace / improve current effects. Wreck should have some distortions, ideally applied by some generic algorithm (thought it might need some feedback...), which would allow to randomize them a bit maybe. Well, such details sometimes require lots of work, but usually effects are worth it. :-)
Such topic would be perfect for something like GSoC, if WZ would take art in it...

About smoke, for now updating textures should be enough, also for other features, new skyscrapers textures made real difference. :-)

And yes, something is choking engine, with primitive testing suggested by Cyp or cybersphinx some months ago it turned out that (probably) it's not caused by shadows. There might be also reason other than rendering, maybe game performs some polling on structures to check constraints for events etc.? Maybe using callgrind to check what eats CPU time could be a good idea.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: Wrecks

Post by Lord Apocalypse »

hmm could get some of the windows devs to get a copy of code analyst by AMD or if any of them have the high end Visual Studio use the VS profiler. Have any of you tried google summer of code? I'm sure that by itself could help out a lot. Once I get started on converting the 1.10 source from DX 6 to DX 9 I will look into adding DX back into this engine. Well, once I do a diff and see exactly how much has changed. May not be easy though I hope it is.

Side note. If or when DX 9 gets added in would you want to continue using the png loader or use the DX texture loader which supports png out of the box.
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Wrecks

Post by Emdek »

Lord Apocalypse, are you going to do it so renderer would be abstract? So it could be replaced, ideally at runtime, but separate binaries would be good enough too.

About profiling, callgrind with visualization done by for example KcacheGrind should be enough for start, it helped me with smaller projects already. ;-)

I've tried once to apply for GSoC, but now I'm no longer a student. :-/
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: Wrecks

Post by Lord Apocalypse »

Someone should get the project listed to get some students. Not sure what the requirements for are projects or students as I have not looked into it (though maybe I should since Vega Strike needs more programmers). So, would be worthwhile to get people for both projects :)

As for DX. I don't know if the function calls between say direct3d and openGL can or do take the same parameters, never looked, but if they can be fed the same variables then I think it can be done by just using defines. Something like..

Code: Select all

#ifdef WIN32
#define RENDERSCENE directxcall(x, y, z)
#else
#define RENDERSCENE openglcall(x, y, z)
The above seems unlikely but one can wish.
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Wrecks

Post by Emdek »

Lord Apocalypse, it should be possible to define one interface which backends would implement, in worst case they would need some extra converting etc.
Also I think that it could be possible to have more than one renderer compiled into one binary (or loaded as plugins into one), but that would require application restart.

About GSoC, from student point of view requirements are pretty low, you need to prepare timeline etc. mostly, for organizations the biggest issue is probably to get mentors for students...
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: Wrecks

Post by Lord Apocalypse »

Created a new thread so we can stop hijacking this one viewtopic.php?f=32&t=9452
iamaloner
Trained
Trained
Posts: 49
Joined: 23 May 2012, 12:09
Location: Zagreb,Croatia

Re: Wrecks

Post by iamaloner »

Wow you guys... From wrecks to DX and OGL APi?
User avatar
Andrie
Regular
Regular
Posts: 533
Joined: 20 Jun 2012, 14:11
Location: Suid Afrika

Re: Wrecks

Post by Andrie »

iamaloner wrote:Would you guys like to see wrecks of ground, air and maybe in future naval units?

It would be nice if depending on specification of units(armor, weapon, propulsion) and if destroyed with certain weapon that has done certain damage to leave the wreck of that vehicle, I dont know if its possible but it would be a nice adition.
Like the idea.
"My IRC en multiplay naam is Andrie"

Groete Andrie
User avatar
Andrie
Regular
Regular
Posts: 533
Joined: 20 Jun 2012, 14:11
Location: Suid Afrika

Re: Wrecks

Post by Andrie »

aubergine wrote:Also, I'd like to see smoke from fires be blown sideways a little by the wind like this: viewtopic.php?f=8&t=6816&start=15#p76304
I like this one two. :)
"My IRC en multiplay naam is Andrie"

Groete Andrie
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: Wrecks

Post by Lord Apocalypse »

iamaloner wrote:Wow you guys... From wrecks to DX and OGL APi?
Yeah, we kinda went off base there. Still like the idea of wrecks, and the newly mentioned directional smoke as well. So many ideas so few people to add them :help:
Post Reply