RTCED Suggestion: Import/Export to 2 color bitmap

Use this forum to discuss additional RTC utilities (other dungeon editors, graphics generators etc).

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

RTCED Suggestion: Import/Export to 2 color bitmap

Post 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. :)
Don't be scene or herd!
User avatar
andyboy_uk
On Master
Posts: 647
Joined: Thu Feb 20, 2003 1:51 am
Location: London, UK

Post 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.
Regards,

Andy
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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.
User avatar
andyboy_uk
On Master
Posts: 647
Joined: Thu Feb 20, 2003 1:51 am
Location: London, UK

Post 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.
:)
Regards,

Andy
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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.
Last edited by Gambit37 on Mon Jan 19, 2004 12:40 am, edited 1 time in total.
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post 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
User avatar
andyboy_uk
On Master
Posts: 647
Joined: Thu Feb 20, 2003 1:51 am
Location: London, UK

Post 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?
Regards,

Andy
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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. :)
User avatar
andyboy_uk
On Master
Posts: 647
Joined: Thu Feb 20, 2003 1:51 am
Location: London, UK

Post 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.
Regards,

Andy
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

Post 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...
Don't be scene or herd!
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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.
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

Post 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.
Don't be scene or herd!
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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!
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

Post by copperman »

:) I thought about the extra colours for other things too but 1 step @ a time.
Don't be scene or herd!
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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. ;)
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

Post by copperman »

:oops:
Don't be scene or herd!
User avatar
andyboy_uk
On Master
Posts: 647
Joined: Thu Feb 20, 2003 1:51 am
Location: London, UK

Post 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?
Regards,

Andy
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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? ;)
User avatar
andyboy_uk
On Master
Posts: 647
Joined: Thu Feb 20, 2003 1:51 am
Location: London, UK

Post by andyboy_uk »

Been very lax recently. But working on it today.
Regards,

Andy
Post Reply