Results 1 to 7 of 7

Thread: Feature Request: Flood Fill

  1. #1
    Lesser Wizard
    Join Date
    Nov 2006
    Location
    California
    Posts
    101

    Default Feature Request: Flood Fill

    Imagine that you have a large floor to add to a room or a desert scene.
    Right now you have to drop a tile, painstakingly draw a row, copy that row, etc. etc.

    It would be great to have a "flood fill" where you select some empty area on the screen - hit whatever key combo that represents flood fill and the whole area is fillled in (tiled neatly) with whatever object is selected.

    For bonus points you might have other kinds of fills like "random fill" that randomly places copies of the object in the selected area.
    "outline fill" that places tiled versions of the object on the outermost outline (for making rooms, etc.)

    Negative fill - fills the selected area with the current tile but removes tiles of that same kind ..

    etc.

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,345

    Default

    Added to the list, thanks
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Lesser Knight
    Join Date
    Dec 2006
    Location
    United States
    Posts
    47

    Default

    Can this sort of functionality be added through Lua scripting? (i.e. how extensible is the editor?) Of course, something like floodfill would be probably be best served written in C/C++. I ask this because I think one of the greatest features in a map editor that a friend of mine wrote is that functionality could be added via scripting (in this case, using Python.) Floodfill was implemented using this facility as were other things such as random tile placement (within a set of ground tiles, for instance.)

  4. #4
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,345

    Default

    Yes - I'm definitely trying to move in this direction. In fact, the next version moves some of the current editing commands to script.

    For instance, to add the suggestion of "R will reset the camera zoom", I did this in editor.lua: (won't work on old versions, the "editor_only" thing is new, it just helps make keybindings that you don't have to keep checking to see if the editor is active or not)

    Code:
    GetInputManager:AddBinding("r,editor_only", "OnEditorResetCameraScale", C_ENTITY_NONE);
    
    function OnEditorResetCameraScale(bKeyDown)
    		//let's reset the zoom to 1/1 with this key
    
    		GetCamera:SetScale(Vector2(1,1));
    		GetCamera:InstantUpdate(); //don't let the camera leisurely lerp to the target
    	
    	return true; //process any other remaining callbacks
    end
    So it is possible for people to add their own hotkeys or utilities. (or change keybindings they don't like)

    The mouse-wheel zoom code is also moved to script in the next version.

    Of course, in the editor mode the game logic is turned off (it can be unpaused but..) so it makes it hard to do something like monitor the mouse for mouse dragging in -script so I'll probably do the fill-tile thing in C++ for now.
    Seth A. Robinson
    Robinson Technologies

  5. #5
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,345

    Default

    The flood fill feature was added, thanks. (While dragging a selection, a pop-up will come up letting you know you can hit F to flood fill with whatever is in the copy buffer. If grid snap is enabled, it will use that for spacing, otherwise it will just use the selection total size)
    Seth A. Robinson
    Robinson Technologies

  6. #6
    Lesser Wizard
    Join Date
    Nov 2006
    Location
    California
    Posts
    101

    Thumbs up

    flood fill = works great!

  7. #7

    Default Class mouseEvent in floodfill

    Sorry for asking Question by posting reply.............
    i m doing a java program related to floodfill. I m facing some problem in tat since i m new to floodfill.
    hw can i import more than 1 picture into the paint program tat i do by using buffered image?
    and is there got any code related to the mouseEvent on the floofill. For example u choose certain color from the control panel after tat u click on the area u wan to paint wit and it will the fill tat certain area................
    does any1 noe hw to do?
    Pls help!!!!

Similar Threads

  1. Feature Request - Shadow Direction and Color
    By loken in forum Novashell Game Creation System
    Replies: 3
    Last Post: 01-12-2007, 08:10 PM
  2. Feature request - character based conversation dialogs
    By whisperstorm in forum Novashell Game Creation System
    Replies: 0
    Last Post: 11-24-2006, 06:53 AM
  3. Save feature...?
    By in forum Dungeon Scroll for PC and iPhone
    Replies: 2
    Last Post: 10-22-2004, 01:39 PM
  4. Feature request
    By Tuttle in forum Funeral Quest
    Replies: 5
    Last Post: 07-05-2003, 03:11 PM
  5. Feature Request
    By Fugazi in forum Funeral Quest
    Replies: 1
    Last Post: 11-25-2002, 04:44 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •