Custom/Edited Maps (Thread Revamp!)

01/11/2012 08:01 Spirited#31
Me gusta.
07/02/2012 19:55 funhacker#32
Quote:
Originally Posted by pro4never View Post

QUESTION!

How much do dds files piss people off? As it currently exists my map editor uses both dds and jpg copies. The jpgs are used in the editor portion (nasty workaround. Winforms cannot display dds images nor xna textures... Easiest to just batch convert them and be able to use them both.)

If people wanted I could just change it so that all through editing you worked with jpeg images (they are all flat terrain anyways. Worst outcome is you lose a bit of pic quality) and then it only switched back to dds when adding the map to the client.

I'd love some input... but up to you guys.

PS: not sure if I posted actual images of the editor here yet...
I think you'll find the following link interesting: [Only registered and activated users can see links. Click Here To Register...]

It doesn't allow for all kinds of DDS files and can return a few errors on a select few DDS files in the EO client that I know of, but about 99% of EO dds files load no problem with this :)
You could also learn about creating your project as a Windows Game, then adding the forms, then you can learn about using content pipeline on the fly for external files.

As for loading files using the DDSLib
Code:
DDSLib.DDSFromFile("textureFileName.dds", GraphicsDevice, false, out targetTexture);
Graphics device can be found using your XNA control I name mine with xpb prefix
example:

Code:
xpbXNAPictureBox.GraphicsDevice
Above won't work until after the XNA control has been initalised
07/02/2012 22:05 Zeroxelli#33
I had actually used a similar library to convert DDS files to streams to work with the new XNA Texture.LoadFromFile or w/e, and it still game me problems.

Maybe this one's different, I might try it later on. Anywho, thanks funhacker.
07/03/2012 05:44 funhacker#34
Quote:
Originally Posted by Zeroxelli View Post
I had actually used a similar library to convert DDS files to streams to work with the new XNA Texture.LoadFromFile or w/e, and it still game me problems.

Maybe this one's different, I might try it later on. Anywho, thanks funhacker.
Texture.LoadFromFile/Stream is useless now ever since 4.0
This however actually reads the raw data within a DDS file and converts it to a Texture file
07/03/2012 06:11 Zeroxelli#35
Quote:
Originally Posted by funhacker View Post
Texture.LoadFromFile/Stream is useless now ever since 4.0
This however actually reads the raw data within a DDS file and converts it to a Texture file
Yeah it is.. things were so much easier in 3.0 and 3.5. I'm not even sure why they changed it..

Anyway, thanks for that. I bookmarked it for later, it should really help me. :) Also, glad to see you back. Haven't seen much from you in years (I've been gone for a long time) but you were really a nice and helpful person back then. Did your mod app ever go through?
07/04/2012 23:31 pro4never#36
Quote:
Originally Posted by funhacker View Post
I think you'll find the following link interesting: [Only registered and activated users can see links. Click Here To Register...]

It doesn't allow for all kinds of DDS files and can return a few errors on a select few DDS files in the EO client that I know of, but about 99% of EO dds files load no problem with this :)
You could also learn about creating your project as a Windows Game, then adding the forms, then you can learn about using content pipeline on the fly for external files.

As for loading files using the DDSLib
Code:
DDSLib.DDSFromFile("textureFileName.dds", GraphicsDevice, false, out targetTexture);
Graphics device can be found using your XNA control I name mine with xpb prefix
example:

Code:
xpbXNAPictureBox.GraphicsDevice
Above won't work until after the XNA control has been initalised

That's what I'm using in this project. It's also reading the dds files from inside the wdf archives without extracting. I had only been converting to jpg for displaying inside the winform object but I also wrote a version that allows for tile selection from within the xna game itself. My concern was that I didn't really want to write any larger UI system past that which makes customization of the editor a bit more difficult.
07/05/2012 00:20 vincentvdb#37
this isn't for x64? On both of my computers the MapDesigner.exe won't open,, automaticly closes without seeíng a screen or something, (Checked in the task manager)
07/05/2012 00:25 Zeroxelli#38
Open a console (cmd) window and run it inside that, then you can see the error.

If I remember right, someone was complaining to me that the spriteFont for this project (I think) was missing? In which case, not much you can do unless he gives you the matching linked font.
07/05/2012 00:32 funhacker#39
Quote:
Originally Posted by pro4never View Post
That's what I'm using in this project. It's also reading the dds files from inside the wdf archives without extracting. I had only been converting to jpg for displaying inside the winform object but I also wrote a version that allows for tile selection from within the xna game itself. My concern was that I didn't really want to write any larger UI system past that which makes customization of the editor a bit more difficult.
If I understand you mean you didn't really didn't want to bother much with making the GUI for your editor thus you used a WinForms control (which uses GDI and doesn't support DDS) if that's correct see the following post:
[Only registered and activated users can see links. Click Here To Register...]
You don't even have to copy over any of your code, you can just take the "CustomControls" namespace folder and put that into your project, either add the using statement to your form(s) or just change the namespace for each control and then you will have an "XPictureBox" which is just an XNA window really, simple to use.

"XPictureBox.Invalidate();" or "XPictureBox.Refresh();" will call the "OnDraw" event handler
Or you can go a little more advanced and make the picture box act like an XNA Game class (only similar) by using the "XPictureBox.Initialise(int fpsLimit)"

I could upload an example of an editor that uses this control if needed but it's pretty simple
07/05/2012 01:25 pro4never#40
Interesting. I have no real interest in conquer though. This map editor is not something I ever plan to finish unless I have a reason to re-join conquer development.

Mostly just obsessed with SWG now and am making some tools for that (which actually comply with the game rules! *gasp*)