RTCED Suggestion: Import/Export to 2 color bitmap
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
RTCED Suggestion: Import/Export to 2 color bitmap
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!
- andyboy_uk
- On Master
- Posts: 647
- Joined: Thu Feb 20, 2003 1:51 am
- Location: London, UK
- andyboy_uk
- On Master
- Posts: 647
- Joined: Thu Feb 20, 2003 1:51 am
- Location: London, UK
- Gambit37
- Should eat more pies
- Posts: 13718
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
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.
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.
- cowsmanaut
- Moo Master
- Posts: 4378
- Joined: Fri Jun 30, 2000 12:53 am
- Location: canada
- andyboy_uk
- On Master
- Posts: 647
- Joined: Thu Feb 20, 2003 1:51 am
- Location: London, 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?
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
Andy
- Gambit37
- Should eat more pies
- Posts: 13718
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
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.
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.
- andyboy_uk
- On Master
- Posts: 647
- Joined: Thu Feb 20, 2003 1:51 am
- Location: London, 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.
And thanks for the compliment, Im trying to make it as rapid at developing advanced dungeons as I can.
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$
Regards,
Andy
Andy
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!
- Gambit37
- Should eat more pies
- Posts: 13718
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
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.
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.
- Gambit37
- Should eat more pies
- Posts: 13718
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
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!
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!
- andyboy_uk
- On Master
- Posts: 647
- Joined: Thu Feb 20, 2003 1:51 am
- Location: London, 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?
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
Andy
- Gambit37
- Should eat more pies
- Posts: 13718
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
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?
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?
- andyboy_uk
- On Master
- Posts: 647
- Joined: Thu Feb 20, 2003 1:51 am
- Location: London, UK