gametechmods

Robot Arena => Modifications => Topic started by: Serge on December 29, 2008, 04:44:42 PM

Title: Serge's more GMF stuff.
Post by: Serge on December 29, 2008, 04:44:42 PM
Well, my computer is alive and I've got access to my files back!

As you may know already, I was working ona full-scale 3d gmf editor before the major crash. Well, since it's not really ready yet, I might give you some insights on what I am currently working on:

(I will try to cut the techno-jabber to a minimum)

The first, and most important part of the whole project is a library called GMFClass. In case you don't know what a library is, it's a sort of a program, or rather, a foundation for other to write programs on. In a normal environement, you have a Audio Playback library, a FIle Access library, and so on. Here the goal of GMFClass is to parse (or: read) GMF files, in both their Binary (used by RA2) and ASCII (readable by a human) form. Not only it does that, but it also does this is in a very transparent way to the one that uses thsi library. Instead of needing the programmer to learn how GMF files are formed, the library gives back (and this is the exciting part, at least to me), a hierarchy of the different stuff in the file. So, what we get, is a list, which in turns contains another list, and so on. Imagine as if you were navigating through a menu in a cellphone: first you have the GMF menu, in which you can access the Object List, Material List, etc. After selecting a main category, you then can choose forma lsit of objects or materials in the scene, eg. the main body of a motor component. After, you can access a property of that part, eg. the color, a position of a point in 3d-space, etc. So, navigating a GMF file is just dumbed down to accessing (if we want to get the Diffuse COlor a Material #4):
Materials->3->Diffuse
of the GMFClass library.

You may ask yourselves: why should I care? Here's the interesting part: I plan to ship a sample tool with the library. And the tool I am talking about, is that 3d editor. What is interesting, most of the job had to be done in the library itself, not in the editor code. So, once I do release the library, creating an application based on it is a breeze, so even begginner programmers (and please, do try some programming, it's very easy) will be able to use this. Including Python programmers! (*wink* Madiaba).

So, for instance, if you need to rapidly "grow" a coupel fo components in size, you will do (in pseudo-code):

Code: [Select]
open file input.gmf
for every geometry object in objectList do
multiply object's x, y, and z vertex coordinates by 1337
end


Which means you can script very small and fast utilities in a few lines of code to execute a task that would normally take a lot of parsing, frustration and low-level stuff to be messed with.

When will it be done? THe library is complete (just a few bugs to fix), and the editor is done about 50%. Beta will probably be released soon.

Serge
Title: Serge's more GMF stuff.
Post by: Gigafrost on December 29, 2008, 05:13:38 PM
Serge; That Veteran tag suits you well. Good job once more! Can't wait for it's release.
Title: Serge's more GMF stuff.
Post by: Somebody on December 29, 2008, 07:15:11 PM
I actually understand it! :-D Too bad I can't understand it.:(

I now get what it does though.
Title: Serge's more GMF stuff.
Post by: goose on December 29, 2008, 10:24:07 PM
Holy balls batman I think I just wet my pants.

no really man, this sounds baddass, If its anything like I have in my head you will have made my year.
Title: Serge's more GMF stuff.
Post by: Sage on December 29, 2008, 10:28:25 PM
Quote from: goose;25657
Holy balls batman I think I just wet my pants.

no really man, this sounds baddass, If its anything like I have in my head you will have made my year.


maybe you could return the favor with a new bot exchange...
Title: Serge's more GMF stuff.
Post by: Madiaba on December 29, 2008, 11:06:17 PM
Serge!!!!! The man.
As soon as I'm more situation is more stable, please send stuff over...
Title: Serge's more GMF stuff.
Post by: Clickbeetle on January 02, 2009, 08:18:47 PM
Great news!!

I really thought it was all over when I heard your motherboard died and your files were inaccessible.

I'm not a programmer (some basic self-taught Python is about all I know) so I can't pretend to understand everything you're talking about.  But I think once I see it I'll like it.
Title: Serge's more GMF stuff.
Post by: Serge on January 16, 2009, 01:43:45 PM
Well, I was running Mac OS X for a couple of days, so durign htis time I didn't do any RA2 development.
But stay tuned, as a graphic GMF editor (wthout 3d, for now), should come out soon.
Title: Serge's more GMF stuff.
Post by: Madiaba on January 16, 2009, 02:40:40 PM
Again,... Nice, Serge.
(Let me know on the stuff I sent you, when you can.)