Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Sat Apr 20, 2024 9:05 am
All times are UTC + 0
Some questions about the RA2 technology.
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
x11
Civilian


Joined: 17 Mar 2009

PostPosted: Wed Mar 18, 2009 11:18 am    Post subject:  Some questions about the RA2 technology. Reply with quote  Mark this post and the followings unread

Hi there,

this semester I have only a few modules (read: quite some free time) and since I am a fan of the old C&C series, and especially the charme of the Tiberium Sun / Red Alert 2 games, I'm thinking about writing a similar engine/renderer. First of all just to learn from it, but if there is some useable output,... who knows, maybe it can be used for some kind of OSS game Smile

I already did some research on the internet and this forum, about `how the red alert 2 renderer works´ but it is hard to find the needle in the haystack.

Here some open questions I have, maybe someone can help me Smile

* The Renderer
From what I know, RA2 is fully software rendered, right? (I think the terrain is the only thing which can be `hardware accelerated´ by OpenGL or DirectX)

* Buildings / SHP
I found no documents yet about the SHP format. From what I understand, SHP is basically some kind of GIF format, which paletted textures and frames? I did also read, that shadows are seperated from the buildings, does someone know the reason?

* The Terrain
Well, seems to be a basic isometric terrain. But Cliffs and Bridges (for example) bug me quite a bit. Is there a little bit more information about them?

I found quite a bit about the Voxel format, but this seems to be a huge topic which seem to need quite a lot of time, but I put that back for later.

Best regards,
x11

Back to top
View user's profile Send private message
Team SomeGuy
General


Joined: 18 Aug 2006

PostPosted: Wed Mar 18, 2009 1:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

SHPs are proprietary format from Westwood, like other sprite making image formats (gif, tga, etc.). They are made in fanciful ways.

Other modders around here can tell you more.

Bridges are a special case scenario. That's mostly all I know about them.

Hardware acceleration wise, I do believe the entire thing is run on DirectX/OpenGL, not just the 2D elements. Especially true since everything is counted by frames rather than synced to the system clock.

Back to top
View user's profile Send private message
x11
Civilian


Joined: 17 Mar 2009

PostPosted: Wed Mar 18, 2009 3:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

Team SomeGuy wrote:
Hardware acceleration wise, I do believe the entire thing is run on DirectX/OpenGL, not just the 2D elements. Especially true since everything is counted by frames rather than synced to the system clock.


Hmmm, maybe they used a DirectX framebuffer and wrote there stuff over the CPU there? Regarding to the system requirements: "2 MB video card" it would fit.

(800x600 Pixel * 16 BPP) / 8 [to get bytes] = 960 KByte for one buffer. As you normally draw to a backbuffer, you need it twice, so 2 * 960 Kbyte = a little bit less than 2 MB.

Also, besides the terrain, there seems to be nothing, which could be represented as mesh/polygon data. And I can't remember that we ever had some hardware voxel support.

That are my thoughts about the renderer, so far.

Back to top
View user's profile Send private message
Scorched Earth
Commander


Joined: 14 Sep 2008
Location: California, USA

PostPosted: Wed Mar 18, 2009 4:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well, you could try downloading several modding tools. Use them to pick through the files, it's how I learned to mod the original Command and Conquer games. It may not help you enough to find what you need, but you could use it for future reference.

_________________
Okay, my signature was starting to annoy even me.

Back to top
View user's profile Send private message
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Wed Mar 18, 2009 4:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

I believe xccu.sourgeforge.net has documentation on some of the file formats as well as open source tools for handling many of them.

Back to top
View user's profile Send private message
x11
Civilian


Joined: 17 Mar 2009

PostPosted: Fri Mar 20, 2009 3:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks Blade, that looks very promising!

Back to top
View user's profile Send private message
Lt Albrecht
Defense Minister


Joined: 25 Jul 2007
Location: Hampshire, England. Creating RA2: Moscow's vengeance

PostPosted: Fri Mar 20, 2009 7:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

You know about voxels/volume pixels right? Any vehicle in RA2/YR and any vehicle that tilts in TS (and some that don't) are voxels. These are 3d models made up of little cubes, each one has a colour and a "normal" (way light reflects off it) assigned to make up the tank/plane/sentry gun turret etc

_________________
Yes, work on MV continues. It is not forgotten.

Back to top
View user's profile Send private message Skype Account
x11
Civilian


Joined: 17 Mar 2009

PostPosted: Sat Mar 21, 2009 7:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes, I know what Voxels are. But I'm interested in how they are rendered. I don't know about any voxel support on the video cards back than and today (besides some voxel-renderer written with CUDA), so thats why I think, that the whole game was software rendered.

Same for the SHP's, from my current knowledge about rendering/OpenGL, I don't think that there is a acceptable way to store them on the VideoCards back then. (Without eating dozents of MiB VRAM)

Example: You have a 128x128 building sprite, with 16 bit color-data, and a total of 60 frames animation (Idle, build, destroy...)

(128x128x16x60) / 8 = 1,8 MiB

And this quite often, for all fraction buildings and map-entities (buildings etc...). Feels too big for the rather small cards Smile But videocards can swap/use the normal system Ram too, but not as fast as the VRAM.

If the SHP algorithm is simple, it might be fast enough to blit the building on the fly without creating and caching full (WIDTH)x(HEIGHT)x(BPP) RGB frames. All you need to store in RAM, would be the small SHPs itself, theoretically.

The whole thing is somewhat weired Smile Today it might be possible to render the terrain and buildings using the GPU, if there is enough VRAM available, and render the Voxels over the prerendered frame. With an actual GPU probably the voxels too, using some shader twirks or such. We'll see.

However, if I should start programming, I'll try to define a good API for the renderer to keep easy replaceable for other approaches.

Back to top
View user's profile Send private message
ORCACommander
Commander


Joined: 14 Feb 2006
Location: Flying into hostile territory

PostPosted: Sat Mar 21, 2009 8:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

only place in ra2 where you will find 16 bit artwork are the pcx files and anything that may be an icon. voxels and shp's both use a 255 color pallete.

Also I agree in that it was almost a complete software rendering only acceleration I think that was supported was mmx and 3dnow!

_________________

Back to top
View user's profile Send private message
x11
Civilian


Joined: 17 Mar 2009

PostPosted: Tue Mar 24, 2009 7:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

I need to correct myself, the tiberiumsun / red alert 2 renderer depends on direct draw and _is_ hardware accelerated. (or at least some (many?) parts of it)

After some playing/benchmarks with the SDL software-surface it prove itself as _very_ slow. (I know that it would, but I didn't think that it would be that dramatic)

For example: I get around 75 FPS on a 1024x768 Window on a AMD X2 6000+ (one core used, with 3 GHz) while displaying a very simple color fade, way too poor. So, after some research I found a Mail on the Wine MailingList which confirmed it: http://www.winehq.org/pipermail/wine-devel/2007-September/059231.html

I'll play around with PBOs as next, hopefully with better results, sadly PBOs are not supported by Intels GMA 945GM (some notebooks and nearly all netbooks... Sad) So, i have to say good bye to the intention of a game which runs nearly everywhere :-/

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1518s ][ Queries: 11 (0.0079s) ][ Debug on ]