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 Fri Mar 29, 2024 8:29 am
All times are UTC + 0
We need a better map editor...
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [5 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
jonwil
Rocket Infantry


Joined: 24 Jul 2005

PostPosted: Fri Jun 12, 2020 2:26 am    Post subject:  We need a better map editor... Reply with quote  Mark this post and the followings unread

As I am sure people are aware by now the Petroglyph editor included with the remasters is not so good. Its missing features that the engine/game supports, its got bugs and everything is hardcoded so stuff you add to or change mods can't be placed on maps easily. The fact that (according to what I have heard) the editor was a late addition and had to be built fairly quickly doesn't help things here.

The way I see it, we have the following options:
1.Decompile the remaster editors and modify the results to produce a non-sucky editor. (its .NET so decompilation is possible) Plus is that a chunk of work is already done. Minus is that the code may not have decompiled completly properly and may not work 100% (.NET decompilation is not always perfect) and also that decompiling and modifying the original editor violates copyright and EA/Petroglyph may not be OK with that.

2.Write a new editor for the remasters using C++ with win32 for the UI and some windows graphics API such as GDI+ for the drawing. Plus is that we can use a chunk of the remaster source drop to do a bunch of the work. Minus is that doing all the UI work will be time consuming and also that its limited to Windows (and wouldn't be usable for any cross-platform projects that may show up)

3.Write a new editor for the remasters using C++ with a cross-platform UI toolkit and drawing API (such as QT). Plus is that we can use a chunk of the remaster source drop to do a bunch of the work plus its cross-platform. Minus is that doing all the UI work is still time consuming and that working with cross platform APIs like QT isn't as easy as working with win32.

Options that I ruled out at this point:
1.Wait for EA/Petroglyph to do something about it (either make the editor not suck or somehow release source code for it). Unlikely that either of these will happen (we may get limited editor bug fixes but I can't see us getting new features, removed hardcoded stuff or editor source code).

2.Make maps using an existing non-sucky editor such as RAED or the original WW scenario editor and then use the remaster editor only for doing the remaster-specific stuff. Doesn't solve the problem of putting new mod content on a map and doesn't solve all the limitations.

3.Using code injection/modification to change the remaster editor in the specific places that need changing. Code injection in a .NET app (as opposed to native code injection) is not that easy and the changes that would need to be made to the remaster are not really viable using the .NET code injection tricks I am aware of.

4.Getting the in-game scenario editor going in the game dlls and working with the GlyphX engine. There are too many limits on things (e.g. we have no way to draw UI and other stuff, no easy way to handle keyboard/mouse and no way to stop GlyphX from doing certain things we dont want it to do) for this to be a suitable option.

I have written some code at https://github.com/jonwil/remasteredit that reads .meg files, loads the same .meg files as the Petroglyph editor in the same order and is capable of extracting a specified file using the same file finding logic the Petroglyph editor is using.

Any thoughts on what we should do (or if we should just give up and put up with the remaster editor in its current sucky state) would be appreciated.

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri Jun 12, 2020 2:37 am    Post subject: Reply with quote  Mark this post and the followings unread

Perhaps, you don't need to totally start from scratch. XCC Editor is a map editor for the original TD that seems to have a user interface. Certainly it will require a lot of changes and proper compatibility with GlyphX resources (like .meg files and other graphic types), but maybe it could be better to start from somewhere than from scratch:

https://sourceforge.net/p/xccu/code/HEAD/tree/trunk/xcc/Editor/

Back to top
View user's profile Send private message Visit poster's website Skype Account
jonwil
Rocket Infantry


Joined: 24 Jul 2005

PostPosted: Fri Jun 12, 2020 3:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Someone commented on Discord that XCC Editor is "not very good and the XCC source is hard to navigate." which is why I didn't consider it. (having messed with the XCC source in the past I can agree with it being annoying to work with)

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri Jun 12, 2020 3:45 am    Post subject: Reply with quote  Mark this post and the followings unread

I am not saying that XCC Editor is the ideal. I'm just saying that it could be used as something to start with.

And, to be honest, the maps that it generates are compatible with the new games. All you need is

- the mpr generated by XCC Editor
- a preview in TGA file
- a json with some info like the sample below:

Code:
{"MapTileX":16,"MapTileY":16,"MapTileWidth":96,"MapTileHeight":96,"Theater":"TEMPERATE","Waypoints":[7251,14026,9580,13846,8371,5013,2413,2489]}


Then, pack them into a .meg file, rename its extension to .pgm and we are done.

Back to top
View user's profile Send private message Visit poster's website Skype Account
jonwil
Rocket Infantry


Joined: 24 Jul 2005

PostPosted: Fri Jun 12, 2020 4:32 am    Post subject: Reply with quote  Mark this post and the followings unread

XCC editor is also written in MFC, something that I hate and don't use.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 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
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can 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.1327s ][ Queries: 11 (0.0076s) ][ Debug on ]