Page 1 of 1

RTCED Suggestion: Import/Export to 2 color bitmap

Posted: Sun Jan 18, 2004 10:21 pm
by copperman
How about an import bitmap feature for floor/wall layout. Make your layout in black and white and the ed can read this as White floors black walls. Then you can use nice painting tools to make floor layouts. :)

Posted: Sun Jan 18, 2004 10:25 pm
by andyboy_uk
It will be done. But not the next release, there is sooo much to go in this one already and it has some MASSIVE changes.

Posted: Sun Jan 18, 2004 11:08 pm
by Gambit37
I'd anticipate that using any kind of paint program to make wall/floor layouts would actually be more complicated than simply using the editor. All sorts of restraints would have to be placed on the bitmap and it's layout. Far easier to just stick with the editor drawing tools I think.

Posted: Sun Jan 18, 2004 11:40 pm
by andyboy_uk
Ahh well, Extra features never hurt anyone.

In the worst case I can make it a setting so that you dont see those menu options.
:)

Posted: Mon Jan 19, 2004 12:39 am
by Gambit37
But it's not really a very useful feature is it?

How easy is it to draw floor layouts in RTCEd? That's a rhetorical question.

How easy is it to draw floor layouts in Photoshop? Well, let's see. First you have to somehow generate the shape of your floor plan. You could create a path, a mask, a selection, or simply duplicate a square and drag it around... of course, these only work if you corectly set up a grid... then fill your area with black, and make everything else white. How long did that take -- 5 mins, 10? The save as bitmap, import into RTCEd, etc etc.

And how easy would this be in something like MS paint that doesn't have any useful tools whatsoever? Hmmm... half an hour, an hour, more?

I suspect all that would take seconds in RTCEd...

I simply can't see the benefit of supporting this. It's the same as the request someone made to be able to see the map in full 3D in the editor -- what's the point when RTC already does it?

You have to know when the effort to impement a feature outweighs it's usefulness. I think this request is a case in point.

Posted: Mon Jan 19, 2004 12:40 am
by cowsmanaut
well I must admit that alignement tools would be a very good edition since you do need to input the sizes of your graphics as well as their position in the screen.

this would be good for those adding custom graphics.

I don't think we need to have a paint tool put in there though. :)

moo

Posted: Mon Jan 19, 2004 1:07 am
by andyboy_uk
Well personally its not something I would use either, but I am more than happy to put it in if somebody is going to use it, especially as the effort to actually achieve and Export and Import to a BMP is approx 10 lines of code each way.

In fact, with a bitmap representation like the one being suggested, I could also have a little window floating around that showed you the whole level layout, and allowed you to scroll around on that. That brings the effort right down to practically nothing as I am going to have to write it for another section of the editor anyway.

I can quite easily make it a preference if you didnt want it to be on the level menu? Is that a good compromise?

Also cows, can you expand on the Alignment idea?

Posted: Mon Jan 19, 2004 1:12 am
by Gambit37
I think if you're going to put features in, then they should always be available. Old grumpies like me don't have to use them if we don't want them. ;)

Are you sure the code is that simple? I think what Kaspian wants is the ability to draw the bitmap and then for RTCEd to automatically assign walls and floors based on the colours in the bitmap. Is that really only ten lines of code?

I was only tring to point out that messing around in paint programs is just adding an extra level of complexity that isn't necessary gievn how easy it is to draw maps in RTCEd. :)

Posted: Mon Jan 19, 2004 1:23 am
by andyboy_uk
Yes it is pretty simple.

The export code would look something like this.. The reverse would just check each pixel for a color. Anything off perfect white would be classed as a wall. This isnt exact code but its pretty darn close.

Code: Select all

exportImage = createImage(levelSizeX%, levelSizeY)

for yAxis% = 0 to levelSizeY%
   for xAxis = 0 to levelSizeX%
    if levelLayout(workingOnLevel%, xAxis%, yAxis%) = 1 then 
      color 0,0,0 ; black for wall
      plot xAxis, yAxis
    end if

    if levelLayout(workingOnLevel%, xAxis%, yAxis%) = 0 then 
      color 255,255, 255 ; white for floor
      plot xAxis, yAxis
    end if  
  next
next 

SaveBuffer ImageBuffer(exportImage), filename$

And thanks for the compliment, Im trying to make it as rapid at developing advanced dungeons as I can.

Posted: Mon Jan 19, 2004 5:43 am
by copperman
Wow I didn't know people felt so strongly about this. This is an idea I had many years ago when playing DM/CSB back in the heady Amiga/ST days. Using e.g. Personal Paint 7 on UAE to make the basic layout of a, say 16 level dungeon would be much faster then with the editor. I'm not suggesting using MS Paint or Photoshop for this, they aren't really the tools but DPaint/PPaint are. I would rather "paint" my dungeon floor plans than "scribble" them as we do now a tile at a time. Import or code painting tools into the editor... hmm now let me think...

Posted: Mon Jan 19, 2004 12:59 pm
by Gambit37
Both Andy's and George's editors use a kind of 'paint' technique -- just keep the mouse button held down and drag around and it'll paint either walls or floors depending on which you clicked on first. It's because this is so easy that I couldn't understand why you'd need an import bitmap feature.

You may not have been aware of this! ;)

You're comment about the amiga has made me realise that you mean when making a bitmap, 1 pixel = 1 floor tile. I was thinking bigger, say 32 pixels. With 1 pixel tiles it would certainly be easier, but I still don't think it would be any quicker than using the editor.

Posted: Mon Jan 19, 2004 3:48 pm
by copperman
I am aware, as my post (I hoped) maked clear. :lol:
Ka5pian wrote:I would rather "paint" my dungeon floor plans than "scribble" them as we do now a tile at a time.

Posted: Sat Jan 24, 2004 5:44 pm
by Gambit37
I take it all back! :-)

I've been mapping Conflux 2 by hand and decided to try making one of the maps in PhotoShop. As a result, I realised that your painting suggestion is actually very good indeed!

If I set the canvas size so that 1 pixel = 1 floor tile, and set the grid to 1 pixel with Snap on, then you can paint maps really quickly and easily. You have to zoom in a lot obviously!

This will be a great way of planning maps, especially as one floor can equal one Photoshop layer, which means lining everything up (stairs, pits, etc) will be a breeze.

In fact, it would be even better if other colours could be used to represent simple obejcts such as stairs and pits.... if the editor could assign those too, the bulk of the drawing could all be done quickly in a paint package.

Sorry if I was negative before. It really is a good idea!

Posted: Sat Jan 24, 2004 6:35 pm
by copperman
:) I thought about the extra colours for other things too but 1 step @ a time.

Posted: Sat Jan 24, 2004 8:07 pm
by Gambit37
Please don't quote the entire message back as it's unnecessary and wastes bandwidth, especially when yours is the next post! Thanks. ;)

Posted: Sat Jan 24, 2004 8:20 pm
by copperman
:oops:

Posted: Sun Jan 25, 2004 11:50 am
by andyboy_uk
OK, There isnt such a problem with adding the extra colors as single items in the new editor (far nicer design)

I will have a seperate INI file so users can specify colors to be the following items.

STAIRS_DOWN
STAIRS_UP
PIT
PIT_INVISIBLE
PIT_FAKE

How do you want me to handle doors (as they could be useful)? I was thinking 1 color would be the DOORFRAME, a DEFAULT DOOR like a wooden one and another color would be the same but with a button.

Or is doors going too far.

Actually, sod it, what I might do it have a seperate file that maps colors to 1 or more object names and puts them down and you can add what you like. How does that sound?

Posted: Sun Jan 25, 2004 1:27 pm
by Gambit37
Ah, why not go the whole hog and spport multi-layered photoshop documents? :) :) :) :)

The colours in the INI file is a good idea, I'd go with that. Make sure the defaults are simple colours that any paint package can handle: pure red, yellow, green, blue, etc...

I wouldn't worry about mapping stuff in another file for now -- bnasic functionality is better to start with. We can go from there.

Anyway, how goes it with the new editor? ;)

Posted: Sun Jan 25, 2004 2:06 pm
by andyboy_uk
Been very lax recently. But working on it today.