Custom/Edited Maps (Thread Revamp!)

04/11/2011 03:29 pro4never#1
So I've been working recently on my own little project and part of that has been designing a map editor.. Due to my knowledge of how conquer maps work... I just kinda stole a bunch of the base structure ideas for the flat map background from there and as such my map designer should be able to be easily converted to work with conquer maps.

I've reached the point now where the BASE functionality is working (this is the first test version so obviously it WILL suck) but I'm also ready for some initial testing. I have no interest or talent with graphics myself so I thought I might open this up to the community.

I'd LOVE to see what you guys can whip up with this but mostly I'd just like your input on the tool itself. It's obviously quite basic in its current state and I need suggestions and bug reports.

[Only registered and activated users can see links. Click Here To Register...]


CUSTOM map (I did not use conversion tool. I made this by hand using CO textures)
[Only registered and activated users can see links. Click Here To Register...]


[Original Thread Contents]

04/11/2011 05:18 _tao4229_#2
don't want

useless

i do it with my mind only!
04/11/2011 05:29 Spirited42#3
I would love a tool like that.
I photoshop new maps... I'd love for them to become real maps.
04/11/2011 08:45 Opale#4
If I can afford such tools, hell yeah !

Editing whole maps ain't actually worth it
I recently started to set up everything correctly to edit maps, which means a huge puzzle with thousands of .dds pieces :

To edit those, we need to make new layers with our modifications, then select each single .dds layers, copy/paste, resplit each parts into one file, and save.. kinda a pain in the arse and a waste of time
And it's very limited because of dmap informations not being edited...
I guess only Zatoichi edited a whole map correctly yet ( and it looked awesome O.o ) so it would really be an interesting tool to play with.
04/11/2011 09:16 pro4never#5
Well....


[Only registered and activated users can see links. Click Here To Register...]

I can now load entire maps (and much faster now... not sure how I managed that but I aint complaining! lol)

Originally it was taking some ridiculous amount of time to load ape but now it's just a few seconds.


Obviously no map objects are loaded.


Next up, going to introduce mouse based movement (click/drag and scroll wheel). Then going to create a image exporter to create a full quality picture of the ENTIRE MAP.

Scroll zoom was easy, not bothered with drag stuff. Cleaned up some code but can't export to image just yet because google seems to REFUSE to give any nice guides on how to deal with WRITING image files.

Texture2D is limited to 2048 pixels so I can't use WriteToJpg or WriteToPng... so yah..
04/11/2011 11:10 |NeoX#6
Fuck P4N gogogo, id pay 30$ xD
04/11/2011 12:25 KraHen#7
Put the XNA window in a form IMO instead of those GUI elements inside which I don`t like :) Btw good job so far :)
04/11/2011 18:16 pro4never#8
Quote:
Originally Posted by KraHen View Post
Put the XNA window in a form IMO instead of those GUI elements inside which I don`t like :) Btw good job so far :)
It is...
04/11/2011 19:59 unknownone#9
I wouldn't pay because it's been done before. (Most notably by Hyberkill, who created a full editor for coordinate data etc).

Editing very large images in photoshop isn't very practical for resource usage, but nor is editing individual tiles. It would be preferable to edit a screen at a time or similar, and also be able to edit individual terrain objects/scenes etc, and then drag and place them onto the map. If you had such features like "export current screen to PS", or importing and placing scenes/terrain objects, you'd be ahead of what's been done already, and it'd probably be worth using then.

GL with your app anyway. I can probably provide you with some help if you need it.
04/11/2011 21:02 pro4never#10
Yah, I'm well aware simple viewers have been done a few times. To be honest this is my first real introduction to graphic programming. I've just started messing around with XNA in the last couple days.

Ideally I'd be planning on doing exactly what you're talking about.

Create a simple overlay displaying dmap data, height information and tile borders. Then allow the user to drag and drop custom or edited tiles onto that map and then give the program the ability to generate all required files for the map to work with the new generated maps. Edit gamemap.dat, create a new dmap file, pul file, ani file and the correct directories for the individual tile dds'.


Taking it that far would obviously be FAR more work than a simple viewer so I'm just starting with the basics (right now it doesn't even touch dmap files let alone map objects/scenes). Just gonna see how far I can go with this section of it and then possibly delve into the more complex stuff.

Knowing there is some form of interest in the field though does help with motivation on my end though. If no one even cares if such a program is made then there really isn't much reason past personal curiosity for me to continue with it.
04/12/2011 17:42 Korvacs#11
To be honest i would pay for it if i required a map editor, assuming the editor was complete, mainly because as far as im aware there isnt a complete, upto date, public one available, so why not charge for it, even as little as £5 would make you quite abit of cash.

Nice to see people developing tools ^_^, keep it up mate :D
04/12/2011 18:57 pro4never#12
Well I'm gonna take a crack at adding in dmap data and applying what unknown shared on how coord structures work in conquer later.

After that I can worry about working with map objects such as bridges, trees, etc.

Mainly right now I just want to be able to VIEW fully before I worry about editing or writing.

Part of that is just going to be me figuring out exactly how I want to deal with simple drawing. XNA is a great tool for complex things but it likes to make simple things... kind of a bitch.


IE: you can't just draw a simple line without a ton of work... yayyy
04/12/2011 19:54 unknownone#13
Drawing primitives can be a bit awkward, but at least the sequential coupling code smell has been mostly fixed in XNA 4, where you gotta call Begin(), End() all the time.

I'll just give you a heads up on one point so you don't make the mistake I did.

When you start drawing the objects (terrainobjects, scenes, effects, sprites) onto the map, you need to provide a Z-ordering algorithm to decide which is shown first. The algorithm applies to all the objects collectively, so you probably want to extract a common interface for each of these and apply the algorithm to a collection of it.

The way I designed my code was to draw each part separately (Eg, I would draw the map, then draw all terrain objects, then draw all scenes, etc), which led to broken z-ordering. I didn't give enough thought beforehand, and it was pretty awkward to apply z-ordering later on with that design.
04/12/2011 21:15 pro4never#14
Interesting. So basically to all of my objects/tiles assign a layer variable to determine which order they are drawn in? Or are you suggesting I draw them for all intensive purposes in a 3d environment from the start?

Regardless it's all rather interesting stuff seeing as this is really my first attempt at any graphics based coding of any kind (seriously... I've even avoided winforms up till now almost entirely)

Right now I've been doing almost exactly what you are describing as your first attempt. I group things into types (IE: Tiles, Lines, Overlays) and use that for my layering simply based on which is drawn first.


Right now I'm literally just creating a simple "tile" class which stores the texture for the tile and it's location information. I then create a simple viewing rectangle and check for tiles which intersect with that rectangle and then draw them in relation to my camera location. It's proven incredibly simple in that sense but I've already seen how much more complex it will start to get as I add in more types of objects and information to process.
04/12/2011 23:45 unknownone#15
You could do it by assigning a layer variable and adjusting it each time an obect moves, or just recalculate them each time. The way I done it was to implement the Z-ordering as an IComparer<> and use a sorted list to hold them. (A tree or graph would be better here for reordering). Could then just foreach through the list and draw in the order it iterates through.

The Z-ordering is based on the coordinate location of the asset and it's offset/size. You draw objects from the top of the screen downwards for obvious reasons. Often, the terrain objects are offet vertically from their defiend location to give the 3D effect that they appear in front/behind. You don't need a 3D environment to draw them anyway.