The Hazardous Realm
The Hazardous Realm

Forged Alliance Editor

Discussions about gaming in general.

Forged Alliance Editor

Postby TazmanianUK » 30 Nov 2012 03:46

Hey HazardX, really appreciate all your hard work, time & sweat on your Supcom editor.
Just wanted to ask if the 'Supreme Scenario Editor 0.471 BETA' will be the last version developed by you?
I can only imagine how much of your free time this project took up but was curious if it will be developed any further.
Still is and will be for a long time yet, an awesome game
TazzyUK
TazmanianUK
Newbie
Newbie
 
Posts: 1
Joined: 30 Nov 2012 03:40

Re: Forged Alliance Editor

Postby Hazard » 30 Nov 2012 05:01

Well, there hasn't been an update for 5 and a half years, so don't count on it. ;)

I stopped development on the scenario editor when the official SC map editor was released because i felt it was superior (especially the terrain tools). Instead i released the Marker Editor that allows to turn maps made with the official editor into FA maps. But i heard that many people had issues getting the official editor to run. Is this still the case?

I don't really intent to continue development on those tools after all those years, but it bugs me A LOT that they are so bugged and unstable. I still get bug reports and crash logs pretty much every day. This is not a quality standard i am used to nowadays and it hurts my pride. :)
The problem is that i changed my primary programming language in the meantime and my graphics engine and tools and stuff like that evolved a lot in those 5+ years. There is no way i'm going back to the old programming language, engine and tools to update the program, thus the only way to release an update would be to port the programs to the new system. This, however, is a hell of a lot of work.

I, nevertheless, actually ported the Marker Editor just recently. It took me like an entire day so far, but seems to work now. I'd have to test is a lot before releasing it, though, to make sure that porting it didn't create some error that corrupts maps. The mere port should already boost stability A LOT because my updated engine and tools are far more advanced than they were 5 years ago. I startet working on a port for the Scenario Editor too, but it is far more complex and thus porting it will take much more work.
But i can't tell when, if ever, there will be a release of an updated version. Also don't get too excited for new features, because it'll probably just be a stability update without new functionality.
Link
- < !!! Be Hazardous !!! > -
User avatar
Hazard
Hazardous Code Monkey
 
Posts: 185
Joined: 05 Jan 2006 19:49

Re: Forged Alliance Editor

Postby ttdnoir » 29 Jun 2013 19:30

your DL. link http://www.hazardx.com/details.php?file=76
doesnt work -.- i found only v. 0.5 on other boards. The old ver. crashes via opening maps.
ttdnoir
Newbie
Newbie
 
Posts: 2
Joined: 29 Jun 2013 19:25

Re: Forged Alliance Editor

Postby Hazard » 29 Jun 2013 19:56

The link works fine here. Try again.
Also note that this is the Scenario Editor, made for the original game and released before SC:FA existed. It may very well crash on certain maps, especially FA ones.
The newest version in the Scenario Editor is 0.471 btw. Well, "newest" in this case means released about 7 years ago.
Link
- < !!! Be Hazardous !!! > -
User avatar
Hazard
Hazardous Code Monkey
 
Posts: 185
Joined: 05 Jan 2006 19:49

Re: Forged Alliance Editor

Postby ttdnoir » 29 Jun 2013 20:28

sry i mean 0.45. thats the ver i have. okay, ive found the problem. you cant download with opera. with firefox works.
ttdnoir
Newbie
Newbie
 
Posts: 2
Joined: 29 Jun 2013 19:25

Re: Forged Alliance Editor

Postby Hazard » 29 Jun 2013 20:33

ttdnoir wrote:sry i mean 0.45. thats the ver i have. okay, ive found the problem. you cant download with opera. with firefox works.

huh, that's odd. thanks for letting me know, i'll test whether it's a general issue with opera and the website.
Link
- < !!! Be Hazardous !!! > -
User avatar
Hazard
Hazardous Code Monkey
 
Posts: 185
Joined: 05 Jan 2006 19:49

Re: Forged Alliance Editor

Postby Duck_42 » 04 Feb 2014 00:54

Hazard,

I'm attempting to develop an automatic map generator for Supreme Commander/Forged Alliance. The SCMAP loader source code has been extremly helpful (as I likely wouldn't have even attempted this without it).

That being said, I've run into a bit of an issue with the normal map for the er...map :D . Both the official map editor and your map editor generate a normal map for the height map automatically, but my attempts to duplicate the normal map calculation in my own code have been unsuccessful (the resulting normal map doesn't match the original).

I would greatly appreciate any information you could provide on the algorithm used to compute the SCMAP normal map, or possibly, provide me with the relevant portion of the source code from your map editor? :)

Thanks for all the time and effort you put into making the map editor, and thanks also for posting the SCMAP loader source code!
Duck_42
Newbie
Newbie
 
Posts: 4
Joined: 04 Feb 2014 00:37

Re: Forged Alliance Editor

Postby Hazard » 04 Feb 2014 16:33

Hi and welcome to the forums! :)

This is the code i'm using to generate the heightmap:

Code: Select all
      public DX9.Textures.Texture2D CalcNormalmap() {
         var newNormal = new DX9.Textures.Texture2D(Game.Device, Width, Height, Direct3D9.Format.A8R8G8B8);
         using (var pp = newNormal.Lock<Color>()) {
            int A = 0, R = 0, G = 0, B = 0;
            for (int iy = 0; iy < Height; iy++) {
               for (int ix = 0; ix < Width; ix++) {
                  G = 127 + GetHeightmap(ix, iy) - GetHeightmap(ix, iy + 1);
                  if (G < 0) G = 0;
                  if (G > 255) G = 255;
                  A = 127 + GetHeightmap(ix, iy) - GetHeightmap(ix + 1, iy);
                  if (A < 0) A = 0;
                  if (A > 255) A = 255;
                  pp.SetPixel(ix, iy, new Color(A, R, G, B));
               }
            }
         }
         return newNormal;
      }

      public short GetHeightmap(int x, int y) {
         return HeightmapData[(y * (Width + 1)) + x];
      }


It's basically just the height difference of adjacent heightmap nodes encoded into the Alpha and Green channels of the texture.

The methods for texture creating and locking and setting of pixels depends on whichever framework you use for building the textures/images.
IMPORTANT: You have to save the finished texture as DDS file format with DXT5 compression when you write it to the SCMAP file.
Link
- < !!! Be Hazardous !!! > -
User avatar
Hazard
Hazardous Code Monkey
 
Posts: 185
Joined: 05 Jan 2006 19:49

Re: Forged Alliance Editor

Postby Duck_42 » 05 Feb 2014 04:03

Code: Select all
                  G = 127 + GetHeightmap(ix, iy) - GetHeightmap(ix, iy + 1);
                  if (G < 0) G = 0;
                  if (G > 255) G = 255;
                  A = 127 + GetHeightmap(ix, iy) - GetHeightmap(ix + 1, iy);
                  if (A < 0) A = 0;
                  if (A > 255) A = 255;


This was the part I was missing. Thanks for the info. Also, using DXT5 helped a lot with reducing the file size of the maps I'm generating. I've got it to the point where it's generating SCMAP files that load in the official map editor. The next step will be to get the maps load in SupCom/FA. Still a long way to go, but it's getting there. :)

Again, thanks for the help.
Duck_42
Newbie
Newbie
 
Posts: 4
Joined: 04 Feb 2014 00:37

Re: Forged Alliance Editor

Postby Striker » 11 Feb 2014 21:13

Hey Hazard... Thanks so much for all the work you did on that editor. I had a couple questions, if you have the time.

1) As you said it might, the editor crashes if I try to load any FA maps. I have to set the game path to the original SupCom .exe file, and it only loads maps from the original game. Is there some code in FA maps that I could change real quick, possibly in the .scenario file, that would let me edit them? When I copied and pasted a map folder from FA's maps folder in the original's maps folder, the editor still didn't find it. Don't know what to do from here.

2) This marker editor that you speak of, that lets you convert an original map to an FA map... is this a separate program? When can I download it? This is what I basically need, as I don't much care about making a new map from scratch. I just need a way to add more spawn points and mass points to the maps I have.

Thanks much.
Striker
Newbie
Newbie
 
Posts: 1
Joined: 11 Feb 2014 21:08

Re: Forged Alliance Editor

Postby Hazard » 14 Feb 2014 10:33

Hi Striker! The Scenario Editor was released during the SupCom Beta, way before FA existed. FA uses a modified map format that the Scenario Editor can't load.
I discontinued the Scenario Editor when the official Map Editor for SupCom was released. And when FA came around without a matching official Map Editor, i decided to release the Marker Editor that'd allow to upgrade SC maps to FA maps. Releasing a new version of the Scenario Editor wasn't an option, because the code was horribly outdated and the whole thing didn't match my personal quality standards anymore, which means it would have taken way more time to rewrite it than i was willing to spend.
Every few months, when i'm in a nostalgic mood, i'll load up the Scenario Editor project and try to fix it and get it to work with my current, more advanced game engine. But those efforts are usually short-lived and i haven't been able to get it working again, yet.
Link
- < !!! Be Hazardous !!! > -
User avatar
Hazard
Hazardous Code Monkey
 
Posts: 185
Joined: 05 Jan 2006 19:49

Re: Forged Alliance Editor

Postby Dragonfire » 17 Feb 2014 15:52

Hi Hazard,

thank you very much for your work in the past :)
You get many crash reports, because FAF is growing (specially since GPG ist down).
If you have time, maybe you can take a closer look:

http://www.faforever.com/?page_id=18

Ps.: You can register your SupCom Key (or ForgedAlliance) at Steam and get both games :D
Dragonfire
Newbie
Newbie
 
Posts: 1
Joined: 17 Feb 2014 15:37

Re: Forged Alliance Editor

Postby Hazard » 21 Feb 2014 00:55

Welcome and thanks for the hint. :) Glad to see that people keep the SupCom community alive despite GPG's end. FAF is definitely a great and important project.
Link
- < !!! Be Hazardous !!! > -
User avatar
Hazard
Hazardous Code Monkey
 
Posts: 185
Joined: 05 Jan 2006 19:49

Re: Forged Alliance Editor

Postby Duck_42 » 22 Mar 2014 19:51

Hazard,

Thanks again for the help with the normal map calculation. I have a working version of my map generator now. It still needs a lot more content (stratum lists, map templates, etc), but it's slowly getting there.

The source code is a bit messy, but I've made it open source and put it on BitBucket.
https://bitbucket.org/Duck_42/supreme-commander-random-map-generator

I included a slightly modified version of your SCMAP loader code (with attribution) in my project. I wasn't sure of the licensing on your code, so I hope that's alright. If not please let me know.

One thing I'd like to improve is the map preview generation. I was wondering how you handled that in your map editor. I realize since you were already rendering the map in the editor, it was probably fairly easy to build a small version of the render as a map preview. So, my question may end up being how did you render the map, and would you mind sharing that code for me to include in my project?
Duck_42
Newbie
Newbie
 
Posts: 4
Joined: 04 Feb 2014 00:37

Re: Forged Alliance Editor

Postby Duck_42 » 06 May 2014 00:52

Bump?
Duck_42
Newbie
Newbie
 
Posts: 4
Joined: 04 Feb 2014 00:37


Return to General Gaming Discussion



cron