Epic GTA2 Map Editor (0.6.6602) Beta

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
Sektor
Boss
Boss
Posts: 1424
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: TradeMark's GTA2 Map Editor

Post by Sektor »

You can't make maps with TradeMark's editor at the moment but it's a great screenshot maker/zone editor. For now, you still need to use the official editor to make maps.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.5.272) (Only zone editor

Post by T.M. »

Yep, its not completed yet, as i said before ^^

Small update:
------------------------------------
0.5.272 Beta (15.04.2010)
------------------------------------
- Editor will not render, or do anything when minimized. (less lag while doing other things).

- Launching the map in GTA2.exe for testing purposes will now minimize the editor automatically. (less lag while playing).

- Pressing esc at any time will force shut off the GTA2.exe and un-minimize the editor at the same time now.

- Fixed crashes when no maps were found.

- Removed warning about "maplist.txt" at the first load. (now it shows info at the map list for what to do).
McLovin
Jaywalker
Jaywalker
Posts: 7
Joined: 12 Apr 2010, 18:04
GH nick: McLovin

Re: TradeMark's GTA2 Map Editor (0.5.272) (Only zone editor

Post by McLovin »

What is the differenz between MapEditor and Zone Editor ?

Isn't it possible to modify the maps yet?
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.5.272) (Only zone editor

Post by T.M. »

McLovin wrote:What is the differenz between MapEditor and Zone Editor ?
This is my zone editor:
Image
McLovin wrote:Isn't it possible to modify the maps yet?
Not with my editor, not yet. At this moment you can only edit the map zones (they are used in several things that you have to use to make a map fully functional).
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by T.M. »

I couldnt resist for making small release since almost nobody downloaded the previous one, fixed some rendering bug:

0.5.272 -> 0.5.273:
- Fixed bug in flats: didnt render properly if the script objects werent visible.
McLovin
Jaywalker
Jaywalker
Posts: 7
Joined: 12 Apr 2010, 18:04
GH nick: McLovin

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by McLovin »

Then Go Go Go! Need Map Editor too :lol:
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by T.M. »

Unfortunately the map editor is a secondary project, i am doing the things that nobody has done yet; adding objects in maps with graphical user interface. And lots of more things ;)
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by BenMillard »

Cool changes. Changelogs are usually an order of magnitude smaller than the amount of code. Such a lot of changes must be an amazing amount of work. :shock:

Searching for .sty Files
Please, please find the .sty file by looking in the gta2\data folder if it is not found in the folder the map was loaded from.

I don't want to install maps into my game just to preview them. DMA Editor allows me to do this but I have to choose the .sty manually.

Fullscreen
Removing the menu bar and statusbar with F11 is a neat interim solution. True fullscreen would be awesome though, since we could then take screenshots of exactly what we can see. And it would be at a typical monitor size.

At the moment it takes some cropping and resizing to get 4:3 shots at standard sizes from a 4:3 monitor. I could do full 1600x1200 on this monitor if an editor had a true fullscreen mode. I imagine it would work like a web browser.

Saved Image Formats
Please make the default output .bmp for easier editing by non-designers.

Minimising Successes & Issues
I'm very happy to confirm the CPU usage when idle and mimimised is 0%!

However, it sometimes doesn't Restore when I click it.

Other times it restores when I haven't clicked it. Happened a couple of times whilst typing this message in fact. Maybe related to using Shift or Ctrl with the cursor keys? Seems quite random. Actually popped up and loaded Zooka Arena at one point! Maybe it's still grabbing keyboard input when minimised?

(EDIT) This is actually happening a lot and is very annoying. I closed the editor because it popped up just as I was closing another maximised application. :(

Performance Ideas
I think CPU usage could be nearly 0% when the editor is open, so long as the scene isn't changing. It should only draw a frame if the new frame will be different to the previous frame. This means that even when weapon animations are turned on, it only tries drawing a few frames per second. (Until you start moving the camera, of course.)

I guess you could just check if the camera position and angle are the same as previous frame, selection is same and no animations have moved to their next state?
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by T.M. »

BenMillard wrote:Please, please find the .sty file by looking in the gta2\data folder if it is not found in the folder the map was loaded from.
Ah, forgot this totally, added to todo list!

BenMillard wrote:Fullscreen
Added to todo list.
BenMillard wrote:Saved Image Formats
Please make the default output .bmp for easier editing by non-designers.
Yeah i thought about that, i'll make that done when the settings can be saved too.
BenMillard wrote:However, it sometimes doesn't Restore when I click it.

Other times it restores when I haven't clicked it. Happened a couple of times whilst typing this message in fact. Maybe related to using Shift or Ctrl with the cursor keys? Seems quite random. Actually popped up and loaded Zooka Arena at one point! Maybe it's still grabbing keyboard input when minimised?
Yeah, it is 0% cpu because it is sleeping all the time except 3 times in second it reads the input, you just have to hold the click button for half a second to make it sure it opens it again. I dont know yet how to fix this.
BenMillard wrote:Performance Ideas
I think CPU usage could be nearly 0% when the editor is open, so long as the scene isn't changing. It should only draw a frame if the new frame will be different to the previous frame. This means that even when weapon animations are turned on, it only tries drawing a few frames per second. (Until you start moving the camera, of course.)
Yeah it actually is nearly zero cpu usage :? depends on your gfx card and cpu model. On my other GFX card i got nearly zero cpu usage, but now when i use the ATI card, my CPU usage is insanely high, i dont know a solution for this, the map editor doesnt calculate anything, it doesnt do anything for the 100% of cpu. Only problem comes when you use zone editor, there its normal to get 100-200% of cpu usage ;)

Optimizing the drawing like that would be waste of time, since after the tile animations are visible, there is less saved frames than it takes time to calculate when the frame should not be rendered again. It would just become overcomplicated and every time i add something new i have to fix that checking function... and when the sky also moves, its total waste of time really... if it was old game, then i would think about this, but todays computers are fast enough to not think about sparing frames in 3d apps.

Although, i may make it lower FPS when the window is not focused, that could be a solution to that problem.
User avatar
B-$hep
Immortal
Posts: 569
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by B-$hep »

Hi TM.
Nice progress.

2 questions:

1) when you will add tile animation?
2) do you have any plans to release or make your TODO list public?
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by T.M. »

Tile animation will be added when the map tiles can be edited, dont expect it to be done any time soon, i am getting busy again :(

Releasing my confusing/crypto-obfuscated/finglish TODO list wouldnt be any helpful, if you have any suggestions, just let me know.
User avatar
B-$hep
Immortal
Posts: 569
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by B-$hep »

I want to give you the compression code soon.
So you can add this if you know it's time to do this.

I can give both codes: in Pascal and C++.

At the moment im trying to make it faster and generate maps just like DMA editor.
So when you compare maps with some hex comparer then you will not see any differences.

That's my work atm.
To make it faster and better. The code is pretty ugly atm. Just have to find better ways to do things.

I will let you know.


So basically i can tell you that you will have it. So you don't have to start working from scratch with compression.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by T.M. »

Nice! I will use it as soon as my map editing works. Thanks!

Maybe you shouldnt bother with checking hidden surfaces removal, that would make it a lot faster i think?
User avatar
B-$hep
Immortal
Posts: 569
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by B-$hep »

No problems TM.
If you atleast credit me somewhere then it will be fine.

Btw. About hidden surfaces. I worked yesterday a bit on it (just for fun) and i got the very basic hidden surface removal to work. Only for LIDs though. But seems that my algorithm successfully removes hidden LIDs if they are inside buildings or just hidden behind other blocks.

It was easy to do, Just a bit logical thinking and it worked. Tried with other sides but it requires alot more time and thinking.
You must almost think about every case that can occurr with blocks and what get's hidden.
So hidden surfaces have low priority atm. Yes sure it will be faster.

As i said im doing my best with compression, it must work fast and efficiently. Because if we think about UMAPs from WIL, BIL, STE gmp's then they have over 20000-30000 blocks and thousands of columns. DMA editor takes also some time to compress these "FULL" and complete maps.

I will keep you informed.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by T.M. »

Of course i will credit you!

About the performance, how long it takes to compress a map (lets say bil.gmp) now with your code vs DMA editor?
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by Pyro »

An interesting piece of kit! Nice to see this coming along, may finally have an excuse to make a few more maps :shock:

Zone editing and map compressing are pretty nifty over the official map editor (I remember using Delfi's zone and map compressor when I moved to XP over Windows 98 SE where it worked beautifully), but since you won't have an actual editor any time soon I'll have to put up with the good old ways and not throwing a brick at the tile selector when they disappear :twisted:

If you ever actually get round to making it into a proper editor I will have to get you a very large drink or something :lol: The above is pretty much why I stopped making maps! Will keep my eye on this... ;)

Edit:

B-$hep - nice to know about the "hidden faces" working for you. You wouldn't believe how many maps I used to get back in the day to look at where they were rendered anyway by people who didn't select the option (oh, and some fun problems they could cause, especially solid cubes and what-not). I'm pretty good at optimising my maps with removing hidden surfaces but always good for extra help for parts I miss!

As for compressing, maybe I'm something I missed, but, I always thought the compression on the official editor was pretty quick anyway, even before Delfi made his map compression? Even when using my ancient Windows 98 machine it wouldn't take more then a few seconds on the largest of maps. If this is a programming thing you are on about then I apologise as I have no clue how the stuff works, steam power and magic for all I know :P

TradeMark - maybe this has been mentioned but does/will it support multiple CPU cores? Mind you, the official one was pretty light anyway so I could just be clutching at straws here. I'll download it later today and give it a whirl and see what I can make of it :)
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by T.M. »

Pyro wrote:TradeMark - maybe this has been mentioned but does/will it support multiple CPU cores? Mind you, the official one was pretty light anyway so I could just be clutching at straws here. I'll download it later today and give it a whirl and see what I can make of it :)
Maybe in some distant future :D Not the number one priority at this moment, since its quite light for CPU already, its more of an GFX card problem with optimizing.
User avatar
B-$hep
Immortal
Posts: 569
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by B-$hep »

Pyro wrote: (I remember using Delfi's zone and map compressor

As for compressing, maybe I'm something I missed, but, I always thought the compression on the official editor was pretty quick anyway, even before Delfi made his map compression? Even when using my ancient Windows 98 machine it wouldn't take more then a few seconds on the largest of maps. If this is a programming thing you are on about then I apologise as I have no clue how the stuff works, steam power and magic for all I know :P
Delfi wrote only a GMP optimizer that removed uncompressed chunk out of gmp's

He didn't write compressor just tool to optimize the maps by removing junk out of them.


But thanks Pyro, nice to see you around here.

TM I got the compression to work. I can edit maps and compress with my tool directly from UMAP and GTA2 is happy with my maps.

My compressed maps do not crash editor or GTA2.

But it's not meant for big maps like wil, ste or bil.

It still has bugs in it, it doesn't want to compress some stuff and its not very fast with big maps. Because i have the loops in the code that do alot of repetions that are unnecessary but this all works.

Im gonna review each part to figure out where is the bug that prevents saving columns at some stage and will rewrite it.

But with simple maps its fast.

Faster than DMA editor!!


I wanted to upload a video today but it takes alot of time. I will upload it later this week.
It shows exactly how it works.

But im very proud of it already, you will see from video how far it is.
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by Pyro »

B-$hep wrote:Delfi wrote only a GMP optimizer that removed uncompressed chunk out of gmp's

He didn't write compressor just tool to optimize the maps by removing junk out of them.
Ah I see now, thanks for the clarification! Also, will be fun seeing your video this week and hopefully be able to understand it :)

@TradeMark: I've had a go at using your map viewer/zone editor and have to say it looks nice, but using the zone editor is a bit fiddly. I thought the options would appear in the file menu at the top (such as Edit (or Display in your case) > Zones > Add/Edit/View Zones) rather than having to press random keys. For some reason also wanted to see a right click option in the map window where I could add things like that ;)

A few other things I'll mention on (maybe Ben has touched upon these earlier)...
  • Default movement keys are WASD rather than the normal arrow keys as I first expected it to be, gamer by any chance? :P
  • CPU usage idles around 27%-31% for me when using the program fully open (about 3%-6% when minimised - useful!) - although probably have a lot of fancy rendering stuff going on (if it helps, I have a quad-core AMD Athlon II X4 620 CPU at 2.6GHz, 2GB RAM, NVIDIA 9600 GSO graphics card running at 1680x1050 and using Windows XP 64-bit Edition)
  • How come there isn't an option just to load a GMP file on the open menu instead of having to use an MMP file first? If I try to open a GMP it throws up an error saying "This is not a standard MMP file!" and then goes on to throw multiple errors (one for not finding the STY file and the next one for not finding the GMP) and then crashing completely! Even specifying it in the maplist.txt (as mentioned to to in your readme) will throw up the same errors.
  • Some objects read from the MIS file are not placed on the map, or some are but placed incorrectly. See picture attached for details. In short, the bit in the middle on top of the roof where there are 2 power generators (the yellow box things) are not actually at that height. In fact they are sitting below that under the railing/guard (you can just about make it out in the picture, 3 dark lines running left to right). This problem does not happen with things like the weapons, which some are under the walkway (which is where they actually are)! Finally, the crane object does not render (see top right). Maybe other objects are like this too?
  • It would seem the "tick" options in your options always show even if something is disabled, can get confusing!
That's about all I can think of for now. Hopefully this can help you in some way to make it even better :)

PS - The picture below is what I am currently working on for my first multiplayer map in quite a number of years! I call it Bootcamp :)
gta2-bootcamp01.jpg
gta2-bootcamp01.jpg (93.58 KiB) Viewed 21876 times
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.5.273) (Only zone editor

Post by T.M. »

B-$hep wrote:TM I got the compression to work. I can edit maps and compress with my tool directly from UMAP and GTA2 is happy with my maps.
Hmm, what stuff does it have to do in order to compress a map? as far as i know, the compression method only saves the blocks between empty blocks from top/bottom, and creates unique block list that each top-down row uses. Did i miss something? Also i read the documents that slope type 63 has to be used in some cases, im not fully certain about that though (docs have lots of incorrect stuff).

Also would be nice if you could provide the source code, i might be able to optimize it, since i cant see real problems with speed at this moment.

I would check unique blocks by calculating checksum from the block-data and adding that into Map object (c++ stuff) with the checksum as key. Therefore you only need to add the blocks in array, and when every block is there, you just loop it through and create ID's for each item in the array for pointers to the rows of map data.
Pyro wrote:@TradeMark: I've had a go at using your map viewer/zone editor and have to say it looks nice, but using the zone editor is a bit fiddly. I thought the options would appear in the file menu at the top (such as Edit (or Display in your case) > Zones > Add/Edit/View Zones) rather than having to press random keys.
Ah, yeah i guess it should be something like File -> edit -> zones ? I'll change it to that next release. But the "add zones" etc. buttons are in the main render window for now. Maybe i add some text "press ctrl to create zone" or something.
Pyro wrote:For some reason also wanted to see a right click option in the map window where I could add things like that ;)
Been thinking about right click menu, but the problem is that right click is used to select zones, and im not going to change that because i see it easiest way since you cant mess up the other zones, because different keys select and edit the zones. (i always hated how i could mis-click some selection in other editors and then i have to do it again >_<). Maybe i add other keyboard configurations later ;)
Pyro wrote:Default movement keys are WASD rather than the normal arrow keys as I first expected it to be, gamer by any chance? :P
Well, since most shortkeys are at left side of the keyboard, i find it more useful to use WASD than arrow keys, also would feel weird to use mouse and arrow keys at same time... hands can rest on keyboard easier at WASD placement :)
Pyro wrote:CPU usage idles around 27%-31% for me when using the program fully open (about 3%-6% when minimised - useful!) - although probably have a lot of fancy rendering stuff going on (if it helps, I have a quad-core AMD Athlon II X4 620 CPU at 2.6GHz, 2GB RAM, NVIDIA 9600 GSO graphics card running at 1680x1050 and using Windows XP 64-bit Edition)
What is your FPS in the editor? And no, it doesnt have fancy rendering stuff :) Its really basic renderer, probably thats why its causing lots of CPU usage when its sending stuff to GPU all the time, im not sure whats causing it, but my editor doesnt do much calculations at all. Hmm, 64-bit windows :o so it actually works on 64-bit computers, good to know. BTW when zone editor is on, the CPU usage goes even higher (or was that where you recorded that CPU usage percents?) and this is caused by the GPU, not CPU. Its on my TODO list to fix that zone editor CPU usage for good.
Pyro wrote:How come there isn't an option just to load a GMP file on the open menu instead of having to use an MMP file first? If I try to open a GMP it throws up an error saying "This is not a standard MMP file!" and then goes on to throw multiple errors (one for not finding the STY file and the next one for not finding the GMP) and then crashing completely! Even specifying it in the maplist.txt (as mentioned to to in your readme) will throw up the same errors.
Ah, yeah, didnt make it into editor yet because nobody has mentioned it, and mostly when you make maps, you have to make .mmp file anyways, so it easies things a lot, also you can just click mmp file and open it directly in editor later, so its even faster to edit then ;)
"maplist.txt" should work though, maybe you entered the GMP and STY file in wrong places? or maybe you had some extra spaces there. Hard to guess, could you show your "maplist.txt" to me? Actually, i think the error can be fixed when you add a name for your map, maplist.txt supports map name too, i think its fourth "parameter". read the "readme maplist.txt" to see the format. I will investigate it ;)
Pyro wrote:Some objects read from the MIS file are not placed on the map, or some are but placed incorrectly. See picture attached for details. In short, the bit in the middle on top of the roof where there are 2 power generators (the yellow box things) are not actually at that height. In fact they are sitting below that under the railing/guard (you can just about make it out in the picture, 3 dark lines running left to right). This problem does not happen with things like the weapons, which some are under the walkway (which is where they actually are)! Finally, the crane object does not render (see top right). Maybe other objects are like this too?
Hmm, could you show the part of the script that places those generators? And perhaps send the map too? Sounds like there is a bug, but i cant fix it without map/script ;)
Yeah cranes arent supported yet, i have to re-write the object renderer/script reader to be more flexible than what it is now.
Pyro wrote:It would seem the "tick" options in your options always show even if something is disabled, can get confusing!
Yeah i think this is the most reported bug :D I will fix them! just wait ;)

Thanks for testing/commenting!
Post Reply